Hello How to write inline assembly code in c file and access cpu R0-R31 registers? I write something like: __asm{
STRB R0,[R2,0#02]
}
but i face errors: expected [ or ]. Thanks.
Hello I'm facing some new problem, when i write inline assembly code in my c code, the compiler removes it, and if i define volatile variables before assembly, compiler compiles again the assembly segment and generates more assembly code than i expect.
c code: volatile uint32_t r0; . . __asm { mov r0,#0x50000008 } . . .
assembles to (inline assembly segment): STR .. LDR .. STR ..
i didn't face this issue before. how should i fix this? Thanks.