AnsweredAssumed Answered

CUBE MX CMSIS-RTOS Incompatibilities

Question asked by montero.gustavo on Aug 21, 2015
Latest reply on Mar 20, 2017 by Vito Marolda
I'm just starting with cube MX and free KEIL toolchain for STM32M0, wich includes free ARM CMSIS RTOS, and I have to say that I'm a little disappointed so far with RTOS implementation in MX.
The only OS support is for FreeRTOS with a CMSIS wrapper, which, at a first glace, looked great, because I thought that I could code as if using actual CMSIS RTOS with the hope of moving to actual CMSIS in the future, on a future version of MX with CMSIS RTOS support.
I decided to go on this direction after trying to use Keil CMSIS RTOS with MX generated project. I made it work, but with some patches to MX generated code, and with some conflicts with clocks and tick configuration, so I preferred to keep MX code unchanged and use It's supported RTOS.
But soon I found out that Cube RTOS wrapper is quite incomplete and incompatible with CMSIS.
So far I've found that osThreadDef macro is not compatible (not exactly the samearguments), osMailAlloc does not block waiting for allocation, osSignalWait does not block waiting for the specified signals (allways returns on any signal), and don't know yet how many other incompatibilities I will find.
I am writing a module with patched versions of this functions, but I don't know what to do, if to go on with this or abandon Cube and MX and write my oun code with Keil CMSIS-RTOS.

I wonder if in the near future versions of Cube, MX, and Keil packages will come out with better integration of both toolchains.

Outcomes