标签:
STM32CubeMX默认支持Freertos。
/* USER CODE BEGIN Variables */ osMailQDef(mail, 6, uint8_t); /* USER CODE END Variables */
..\Src\freertos.c(52): error: #151: a typedef name may not be redeclared as a parameter
osMailQDef(mail, 6, uint8_t);
..\Src\freertos.c(52): error: #260-D: explicit type is missing ("int" assumed)
osMailQDef(mail, 6, uint8_t);
..\Src\freertos.c(52): error: #92: identifier-list parameters may only be used in a function definition
osMailQDef(mail, 6, uint8_t);
翻阅Freertos的文档,看它没明确说是否支持Mailbox。
查看cmsis.h,发现macro定义有个if条件:
#if 0 /* Mail Queue Management Functions are not supported in this cmsis_os version, will be added in the next release */
但是在文件前头却有:
#define osFeature_MailQ 1 ///< Mail Queues: 1=available, 0=not available前后矛盾。
另外,这里宏是多个语句声明,落了个‘;‘。
struct os_mailQ_cb *os_mailQ_cb_##name; \
版权声明:本文为博主原创文章,未经博主允许不得转载。
cmsis-rtos v1.02不支持Mail Queue?
标签:
原文地址:http://blog.csdn.net/fengyu09/article/details/47174673