Skip to main content
davidt.jones-19
Associate
November 24, 2014
Question

Errors caused by OS header files

  • November 24, 2014
  • 3 replies
  • 1059 views
Posted on November 24, 2014 at 20:57

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 &sharp1: ''option CH_DBG_ENABLE_STACK_CHECK not supported by this port''

Caused by:

--- ''chconf.h'' (included by ch.h) lines 389:391 ---

&sharpif !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)

&sharpdefine CH_DBG_ENABLE_STACK_CHECK       TRUE

&sharpendif

--- ''chcore.h'' (included by ch.h) lines 39:41 ---

&sharpif CH_DBG_ENABLE_STACK_CHECK

&sharperror ''option CH_DBG_ENABLE_STACK_CHECK not supported by this port''

&sharpendif

Error &sharp2: ''STM32_MAC_PHY_TIMEOUT requires the realtime counter service''

Caused by:

--- ''hal_lld.h'' (included by ''hal.h'') line 43 ---

&sharpdefine HAL_IMPLEMENTS_COUNTERS FALSE

--- ''mac_lld.h'' (included by ''mac.h'' (included by ''hal.h'')) lines 152:154 ---

&sharpif !defined(STM32_MAC_PHY_TIMEOUT) || defined(__DOXYGEN__)

&sharpdefine STM32_MAC_PHY_TIMEOUT       100

&sharpendif

and lines 192:194

&sharpif (STM32_MAC_PHY_TIMEOUT > 0) && !HAL_IMPLEMENTS_COUNTERS

&sharperror ''STM32_MAC_PHY_TIMEOUT requires the realtime counter service''

&sharpendif

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''

#headers #spc560p #studio #spc5
    This topic has been closed for replies.

    3 replies

    Erwan YVIN
    ST Technical Moderator
    November 25, 2014
    Posted on November 25, 2014 at 11:03

    Hello David ,

    SPC5Studio is not compliant with Mingw.

    Mingw is for Win32 application.

    SPC560Pxx OS-Less CAN Test Application is an embedded application for POWERPC in Vle Mode compiled by hightec compiler.

         Best Regards

                          Erwan

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
    davidt.jones-19
    Associate
    November 25, 2014
    Posted on November 25, 2014 at 14:54

    Erwan,

    That is good to know, and explains some of my other errors.  However, the errors I explicitly mentioned are conflicts between header files on the same dependency chain, regardless of the compiler used.  How do I solve those?

    David

    Erwan YVIN
    ST Technical Moderator
    November 27, 2014
    Posted on November 27, 2014 at 13:47

    Hello David ,

    Error 1 :

    ********

    SPC560Pxx OS-Less CAN Test Application is a OS-Less Application.

    it should contain chconf.h

    For Chibios Application,

    chconf.h is regenerated from your GUI.

    CH_DBG_ENABLE_STACK_CHECK is a bad settings in your ChibiOS/RT Portable Kernel Component 

    Please uncheck Enable Stack Check,  regenerate and recompile.

    Error 2 :

    ********

    STM32_MAC_PHY_TIMEOUT is for STM32 only not SPC56

    it should be included in SPC56 applications

                Best Regards

                

                             Erwan

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.