I'm planning to do a bootloader for a Cortex-M1 processor but i'm having serious problems.
First of all, the Keil says it expect a ")" when writing this type of inline assembly:
I tried this with V6.12:
void a(int sp, int pc)
: /* no output */
: "r" (sp), "r" (pc)
and it works. Adding "sp" to the clobber list gives a warning though.
I'm using the Keil 5 that contains the compiler versión 5.06. Do you think that could be the problema?
I did it as you suggested and i get the same problem.
It says it expect a ) so it seems that it's not understanding i'm using assembly.
Any idea of what is happening.
Check the manual. You are trying GNU syntax. ARMCC syntax is different!
Thanks Bastian, that was the problem.
More over. In order to change the stack pointer and the program counter you have to make a separate assembly file, because inline assembly doesn't have direct access to those registers. FYI
View all questions in Cortex-M / M-Profile forum