Skip to main content
ccox
Associate
March 10, 2015
Question

osMailQDef error in cmsis_os.h

  • March 10, 2015
  • 1 reply
  • 766 views
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

    This topic has been closed for replies.

    1 reply

    Amel NASRI
    ST Technical Moderator
    March 11, 2015
    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 "Best Answer" on the reply which solved your issue or answered your question.