AnsweredAssumed Answered

Cube Hal cmsis_os bug, missing #define __CORTEX_M

Question asked by Joe on Nov 28, 2015
Latest reply on Jan 18, 2016 by CaCO3.CaCO3

Using STM32Cube_FW_F4_V1.9.0 and setup a project with CubeMX 4.11 and using Freertos.

I usually build with -Wundef. When compiling cmsis_os.c, I earn a:

core_cmFunc.h:501:12: warning: "__CORTEX_M" is not defined -Wundef

This is, because `#include "core_cmFunc.h"` obvouisly needs a e.g. `#include …` before so that the preprocessor symbol `__CORTEX_M` became defined. This appears for every source which tries to include cmsis_os.h (e.g. the cubemx generated freertos.c).