undefined symbol ossemaphorecreate
Why the API for FreeRTOS middleware keeps changing every now and then? You barely start to wrap your head around an API, a new one gets released.
I had to generate the initialization code from CubeMX, as it makes life much easier especially if you want to add new components or modify a lot of GPIOs for a given project.
Many of my projects were built with CMSIS_V1, but I don't know why that option is greyed out in CubeMX for STM32L552. I spent hours trying to build the project until I realized most of the API calls to create semaphore were invalid.
Now, in the new API, the way to create a binary semaphore is like this:
osSemaphoreId_t osSemaphoreHandle;
const osSemaphoreAttr_t osSemaphore_attributes =
{
.name = "osSemaphore"
};
osSemaphoreHandle = osSemaphoreNew(1, 1, &osSemaphore_attributes);To release semaphore from ISR:
osSemaphoreRelease(osSemaphoreHandle);You may refer to the example project at the Cube repository at:
\STM32Cube_FW_L5_V1.4.0\Projects\NUCLEO-L552ZE-Q\Applications\FreeRTOS\FreeRTOS_SemaphoreFromISR
Anyways, I noticed that the following are no longer needed in this port:
xHigherPriorityTaskWoken = pdFALSE;
xSemaphoreGiveFromISR(xSemaphore, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);I was wondering if that's the correct way to do it with ISR in the new API.
By the way, is there any new documentation that outlines all of the new API features, changes, and a guide on how to use them with examples like this one: UM1722?
Zaher
