Hi, I am trying to write a really simple syntax in Arm Development Studio to write a value on two of the registers, R0 and R1.In command line and Registers section, I can see no change in any of the values.I tried using other registers in FP or even System registers, nothing changed!Here is my code:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
printf("!!!Hello World!!!"); // prints !!!Hello World!!!
// Inline assembly to set R0 and R1 with known values.
__asm volatile (
"mov r0, #0x1234 \n\t" // Load R0 with 0x1234
"mov r1, #0x5678 \n\t" // Load R1 with 0x5678
);
// Infinite loop to allow time for inspection.
while (1) {
}
return 0;
From the disassembly view I see that your code is at __main, which is the C-library initialization code (this is called before the code reaches main() ).
Set a breakpoint on your inline assembly - does it ever reach that?