This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can we check the register value in inline-assembly in c?

Dear all,

I'm trying to check the register values in inline-assembly in c as the below code.
In especially, R0 and R1 values what I want to know which value is loaded to register.
But as you can see that code, that is a In-line assembly.

Is there any way to check the register which values are loaded?

main.c

...
__asm void ST0(void)
{
   MOVS  R0,#0
   LDR   R1,[R0]     ; Get initial MSP value
   MOV   SP, R1
   LDR   R1,[R0, #4] ; Get initial PC value
   BX    R1
}
...

int main (void)
{


  ST0();
  return 0;
}