I have some ARM assembly code that needs some porting to a Keil environment intended to run on an M0.
I am getting some errors for
register uint32_t *mp __asm("r0") = < pointer> ;
This is complaining saying that mp is not initialized. Any clues?
I have some ARM assembly code
Actually, no, you don't. What you have there is C code using a compiler-specific extension that just so happens to use the keyword '__asm'. That's by no means assembly code, much less ARM or Cortex-M0 assembly.
What is your assembler code actually doing, beyond this somewhat out of context assignment of a pointer into R0? Do you have other code depending of something being in R0, or could you just use the register directive and let the compiler make the assignment decisions?
If this is just syntactic sugar, I'd be keen on fixing it right here!
GNU/GCC ?
Why not let the compiler do the job in C, then if you think you've got a better handle on the algorithm implement it completely in assembler in a .s file
View all questions in Keil forum