AnsweredAssumed Answered

Errors caused by OS header files

Question asked by jones.david.008 on Nov 24, 2014
Latest reply on Nov 27, 2014 by Erwan Y
I installed SPC5 Studio v3.0 and MinGW compiler, and I am trying to run the SPC560Pxx OS-Less CAN Test Application.  The main.c file refers to two includes ("components.h" and "can_lld_cfg.h").  I have included -IC paths to those headers and their subsequent included headers.  The problem is I am getting two performance errors, each error is caused by one header contradicting another.


Error #1: "option CH_DBG_ENABLE_STACK_CHECK not supported by this port"
Caused by:

--- "chconf.h" (included by ch.h) lines 389:391 ---
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK       TRUE
#endif

--- "chcore.h" (included by ch.h) lines 39:41 ---
#if CH_DBG_ENABLE_STACK_CHECK
#error "option CH_DBG_ENABLE_STACK_CHECK not supported by this port"
#endif


Error #2: "STM32_MAC_PHY_TIMEOUT requires the realtime counter service"
Caused by:

--- "hal_lld.h" (included by "hal.h") line 43 ---
#define HAL_IMPLEMENTS_COUNTERS FALSE

--- "mac_lld.h" (included by "mac.h" (included by "hal.h")) lines 152:154 ---
#if !defined(STM32_MAC_PHY_TIMEOUT) || defined(__DOXYGEN__)
#define STM32_MAC_PHY_TIMEOUT       100
#endif

and lines 192:194
#if (STM32_MAC_PHY_TIMEOUT > 0) && !HAL_IMPLEMENTS_COUNTERS
#error "STM32_MAC_PHY_TIMEOUT requires the realtime counter service"
#endif


I don't know how to solve these contradictions without editing the SPC5 Studio supplied header files.  Also, I noticed I had to download the following files from online, since they did not appear to come with the product, although part of the header dependency chain:
       
  • "board.h"
  •    
  • "chconf.h"
  •    
  • "halconf.h"
  •    
  • "mac_lld.h"
  •    
  • "mcuconf.h"

Outcomes