cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX FreeRTOS and __weak

Posted on September 13, 2017 at 14:49

When enabling the FreeRTOS idle hook STM32CubeMX generates a function with the following prototype in the freertos.c file:

__weak void vApplicationIdleHook( void )

However __weak isn't defined in any one of the included header files (I'm using GCC with Makefile target) so the file can't be compiled until defining the __weak as __attribute__((weak)) somewhere.

#idle-hook #freertos
1 ACCEPTED SOLUTION

Accepted Solutions
Jeanne Joly
Senior III
Posted on February 01, 2018 at 10:17

Hi

sweden

,

There is a post where I have just answered for the same topic. Please refer to it (

https://community.st.com/0D50X00009XkfyISAR

) and tell me if you still have issues.

BR. Jeanne

View solution in original post

4 REPLIES 4
Imen.D
ST Employee
Posted on September 13, 2017 at 17:41

Hi,

Which tools version are you using ?

Kind Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on September 14, 2017 at 09:58

STM32CubeMX v4.1 on Linux, STM32CubeL0 v1.0, STM32L IOC file is attached.

________________

Attachments :

freertos-test.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyRl&d=%2Fa%2F0X0000000b7i%2Ftr_9r_LmjEqa8bXEfgQvMx82hTOzf8zPbiZ.QjfT.qg&asPdf=false
Jeanne Joly
Senior III
Posted on February 01, 2018 at 10:17

Hi

sweden

,

There is a post where I have just answered for the same topic. Please refer to it (

https://community.st.com/0D50X00009XkfyISAR

) and tell me if you still have issues.

BR. Jeanne

Posted on February 01, 2018 at 10:49

Thanks,

Joly.Jeanne

‌, the problem with __weak seems to be gone: after removing all those duplicate filename definitions (a new bug?) from the Makefile I was able to compile the binary.