cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible that you change „asm“ to „__asm“ in generated code?

seren
Associate II

That way it would compile with compiler setting -std=c99.

Currently when I generate Code for STM32L451 with MX in STM32CubeIDE 1.6.0, syscalls.c contains

register char * stack_ptr asm("sp");

This does not work with c99. Changing it to

register char * stack_ptr __asm("sp");

works.

Since I don’t want to change generated code, my current workaround is to define asm as __asm as a symbol in the project properties.

0 REPLIES 0