i try to setup a FreeRTOS based project at CYBLE-416045-02 module. Right now, I have enabled FreeRTOS support and I'am able to create and run some Tasks. My next step is to create a Mutex!
1. To get this project to work, I have to include the following header files:
But why Alan Hawse says: "Notice that we didn't have to include any FreeRTOS header..."??? This statement is confusing for me. Mayby my issue is based in this point!
2. I try to create a semaphore:
xSemaphore = xSemaphoreCreateMutex();
The PSoC Creator says, "Undefined reference to xQueueCreateMutex".
But I can go to the definition of "xQueueCreateMutex" in "semphr.h":
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
#define xSemaphoreCreateMutex() xQueueCreateMutex( queueQUEUE_TYPE_MUTEX )
So the "xQueueCreateMutex" function should be included, if configSUPPORT_DYNAMIC_ALLOCATION = 1!
When I go into the FreeRTOSConfig.h I can see:
#define configSUPPORT_DYNAMIC_ALLOCATION 1
So why isn't the "semphr.h" not combined to the FreeRTOSConfig.h? Refer to Point 1, maybe I have forgotten something....otherwise "xQueueCreateMutex" should be defined.
Solved! Go to Solution.