2025-05-15 4:06 AM
Hello Experts,
I see that in cmsis_oc.c that the function osThreadIsSuspended is disabled. The variable INCLUDE_eTaskGetState is responsible for it.
But how do we enable INCLUDE_eTaskGetState to 1 by default?
I see in FreeRTOS.h header than the macro is set to 0.
Can i just force it to 1 in FreeRTOS.h? or do we need to enable any particular config parameters in the .ioc file ?
Kindly Help!
2025-05-15 7:47 AM
You should define INCLUDE_eTaskGetState in project file FreeRTOSConfig.h
Note that cmsis_os.c is CMSIS RTOS V1 and it would be better to use cmsis_os2.c for CMSIS RTOS V2.
2025-05-15 9:18 PM
Thanks for your reply, I used CMSIS RTOS v1 as i am following along some FreeRTOS tutorials which also use the same v1.
I defined the macro in FreeRTOSConfig.h like this:
But, i get a bunch of errors related to the osThreadGetState function:
Any suggestions ?
2025-05-16 5:14 AM
it works for me.
osThreadSuspended is defined in cmsis_os.h if INCLUDE_eTaskGetState is set to 1
check that INCLUDE_eTaskGetState is really defined to 1 in cmsis_os.h
2025-05-16 6:28 AM
In cmsis_os.h, I still see INCLUDE_eTaskGetState "grayed out", even though i have it defined in FreeRTOSConfig.h :( , I am not sure why!