cancel
Showing results for 
Search instead for 
Did you mean: 

osMailQDef error in cmsis_os.h

ccox
Associate II
Posted on March 10, 2015 at 19:09

The definition of the osMailQDef macro is incorrect in cmsis_os.h; it is missing a semicolon. Here is the original version:

#if defined (osObjectsExternal)  // object is external

#define osMailQDef(name, queue_sz, type) \

extern struct os_mailQ_cb *os_mailQ_cb_##name \

extern osMailQDef_t os_mailQ_def_##name

#else                            // define the object

#define osMailQDef(name, queue_sz, type) \

struct os_mailQ_cb *os_mailQ_cb_##name \

const osMailQDef_t os_mailQ_def_##name =  \

{ (queue_sz), sizeof (type), (&os_mailQ_cb_##name) }

#endif

Here is the corrected version:

#if defined (osObjectsExternal)  // object is external

#define osMailQDef(name, queue_sz, type) \

extern struct os_mailQ_cb *os_mailQ_cb_##name; \

extern osMailQDef_t os_mailQ_def_##name

#else                            // define the object

#define osMailQDef(name, queue_sz, type) \

struct os_mailQ_cb *os_mailQ_cb_##name; \

const osMailQDef_t os_mailQ_def_##name =  \

{ (queue_sz), sizeof (type), (&os_mailQ_cb_##name) }

#endif

1 REPLY 1
Amel NASRI
ST Employee
Posted on March 11, 2015 at 14:43

Thanks Charles.

Reported issue will be fixed in coming releases of Cube packages.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.