Skip to main content
Associate
October 1, 2026
Question

mx_wifi component does not compile with CMSIS-RTOS v2 (MX_WIFI_USE_CMSIS_OS == 1) — CMSIS layer still uses RTOS v1 API

Hi,
I'm developing an STM32 application that utilizes mx wifi component from  B-U585I-IOT02A board support package, i am trying to configure it to utilize CMSIS_OS but it fails to build out of the box then.
Symptom. Setting MX_WIFI_USE_CMSIS_OS == 1 does not compile against a CMSIS-RTOS v2 environment. The component's CMSIS layer declares and uses CMSIS-RTOS v1 identifiers that do not exist in the v2 shim (cmsis_os.h here only forwards to cmsis_os2.h, osCMSIS = 0x20001U):

/* mx_wifi_cmsis_os.h */
#define LOCK_DECLARE(A)  osMutexId A          /* v2 type is osMutexId_t            */
#define FIFO_DECLARE(Q)  osMessageQId Q       /* line 187: v1 type, v2 has none    */
void *fifo_get(osMessageQId queue, uint32_t timeout);          /* line 238        */
osThreadId thread_new(const char *name, void (*thread)(void const *), ...); /* 250 */

/* LOCK_INIT's osCMSIS >= 0x20000U branch still calls v1 macros: */
osMutexDef(MUTEX); (A) = osMutexNew(osMutex(MUTEX));           /* osMutexDef/osMutex are v1 */

/* core/mx_rtos_abs.c:65 — same v1 parameter type */
void *fifo_get(osMessageQId queue, uint32_t timeout) { ... }


So the osCMSIS >= 0x20000U branches inside the macros call osMutexNew/osMessageQueueNew (v2 functions) but build them from v1 definition macros and v1 type names - the layer is a hybrid that matches neither API.
Steps to reproduce
1. FreeRTOS + CMSIS_RTOS_V2 wrapper only (no CMSIS-RTOS v1 headers on the include path).
2. Set MX_WIFI_USE_CMSIS_OS to 1 in mx_wifi_conf.h.
3. Build → unresolved osMessageQId, osMutexDef, osMessageQDef, v1 thread signature.
In the basic BARE OS mode MX_WIFI_USE_CMSIS_OS = 0, mx wifi component works, but it utilizes polling, which is not desired for my application
The question is: Are there some things in the configuration that I am missing or I should patch the module myself, so that it builds with the CMSIS RTOS?