Home > other >  STM32 program decompiling, why the PC + 2=the current address
STM32 program decompiling, why the PC + 2=the current address

Time:09-25

0 x080001d6 F44F6000 MOV r0, # 0 x800
0 x080001da LDR r1, 4908/PC, # 32; @ 0 x080001fc
0 x080001dc 6008 STR r0, [r1, # 0 x00]
17: delay_ms (300);
0 x080001de F44F7096 MOV r0, # 0 x12c
0 x080001e2 F000F964 BL w. delay_ms (0 x080004ae)


In CM3 on manual "PC is always equal to the current instruction address + 4, whether it is 16 or 32 bit instruction", then the PC=0 x080001da + 4=0 x080001de, then execute the LDR r1, [PC, # 32], the PC + 0 x20, namely 0 x080001fe saved to r1, why is 0 x080001fc? I don't think a day, want to understand, I hope you help solve

CodePudding user response:

A past cough cough cough cough cough cough at night

CodePudding user response:

PC= 0 x080001da + 4, red the address should be wrong, in multiples of four
  • Related