I find one problem (maybe bug) in CMSIS working with FreeRTOS. Working on the STMCubeIDE and programing F103RB (NUCLEO). I create the Queues. Properties "Item Size" set it to "20" (number). I want to convey a structure of this size. Default propertis is "uint16_t" (character string).
During operation, only the first 4 bytes of the structure are transferred.I debug program and find problem and repear this.
In the file cmsis.os.c replase line 766with
const osMessageQDef_t os_messageQ_def_##name = \ { (queue_sz), sizeof (type), NULL, NULL }
to
const osMessageQDef_t os_messageQ_def_##name = \ { (queue_sz), type, NULL, NULL }
Delete "sizeof()"After the change, program work good.Is this actually some library bug? I'm not a specialist and maybe I'm doing something wrong.
You can open an issue on GitHub.
42Bastian Schick said:open an issue on GitHub
+1
See: https://developer.arm.com/tools-and-software/embedded/cmsis
But you might also want to raise an issue that this is not mentioned at https://www.keil.com/pack/doc/CMSIS/General/html/index.html - which is what I get as the 1st hit for "CMSIS" in Google.
Aleksander said:CMSIS working with FreeRTOS
Are you sure it is ARM/Keil's code you're looking at, or something from FreeRTOS ?
I don't know whose side the problem is, MCSI or FreeRTOS. Maybe FreeRTOS is using the wrong function. It is partially covered here forums.freertos.org/.../7597
So, read the thread you mention again. It explains it.
Aleksander said:I don't know whose side the problem is
Usually, each source file has a comment at the top with copyright & licence details - this will tell you whose file it is.