Forum: System Workbench for STM32

C99

When selecting the dialect of C as C99 (to have more recent C features) the default project (based on STM32F407) is not compiling, the first error is on this line of syscalls.c:

register char * stack_ptr asm(“sp”);

I guess the same thing will happen when selecting C11.

Also, not connected to C dialect (I’m writing here to not create another thread) there are many warnings that “STM32F40_41xxx” is redefined.

France

That is perfectly normal behavior: you ask to use C99 strict compatibility, without Gnu extension, that is without the asm mechanisms...

If you want to use C99 or C11 eatures, you should select gnu99 or gnu11; see C standards supported by GCCQuestion

Bernard


There were no gnu99 or gnu11 in the MCU GCC Compiler -> Dialect -> Language Standard combo-box, so I had to write -std=gnu99 in the Other dialect flags field which did the job.

Thanks for clarification.