STM32CUBEMX supports FreeRTOS by default.
/* User code BEGIN Variables */osmailqdef (mail, 6, uint8_t);/* User code END Variables */
The Cmsis-rtos document has a description of the message queue management, which, by definition, always has an error:
.. \SRC\FREERTOS.C (*): Error: #151: A typedef name is redeclared as a parameter
Osmailqdef (mail, 6, uint8_t);
.. \SRC\FREERTOS.C: Error: #260-D: Explicit type is missing ("int" assumed)
Osmailqdef (mail, 6, uint8_t);
.. \SRC\FREERTOS.C (as of): Error: #92: identifier-list parameters May is used in a function definition
Osmailqdef (mail, 6, uint8_t);
Flip through FreeRTOS's documentation to see if it doesn't explicitly support mailbox.
Looking at Cmsis.h, we find that the macro definition has an IF condition:
#if 0/* Mail Queue Management Functions is not supported in this Cmsis_os version, 'll be added in the next release
*/
It is well written that the current version does not support mail queue management.
But at the head of the file there are:
#define OSFEATURE_MAILQ 1 ///< Mail Queues: 1=available, 0=not available
Inconsistencies.
In addition, here the macro is a statement of multiple statements, dropped a '; '.
struct OS_MAILQ_CB *os_mailq_cb_# #name; \
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Cmsis-rtos v1.02 does not support mail Queue?