It's macro which is evaluated by the compiler LEX you can't change it with ANY DIRECTIVE
The problem is you are using a C++ compiler and compiling C code which is fine but you can't change the LEX analyser
You are using arm-none-eabi-g++ it would work with arm-none-eabi-gcc
It's in the GCC FAQ
Language Detection: gcc treats .c files as C and .cpp files as C++ . Conversely,
g++ treats both .c and .cpp files as C++ unless forced otherwise
The problem is you are using a C++ compiler and compiling C code which is fine but you can't change the LEX analyser
You are using arm-none-eabi-g++ it would work with arm-none-eabi-gcc
It's in the GCC FAQ
Language Detection: gcc treats .c files as C and .cpp files as C++ . Conversely,
g++ treats both .c and .cpp files as C++ unless forced otherwise
Statistics: Posted by LdB — Fri Apr 24, 2026 1:15 am









