IDE: KEIL(4.74.00)
MCU: STM32F103VET6
问题:地址为0x08000138的那一行执行结果 为什么是0x08000164 ?
0x0800012E 0800 DCW 0x0800
HardFault_Handler:
0x08000130 F000F802 BL.W __scatterload (0x08000138)
0x08000134 F000F83A BL.W __rt_entry (0x080001AC)
0x08000138 A00A ADR r0,{pc}+4 ; @0x08000164
0x0800013A E8900C00 LDM r0,{r10-r11}
0x0800013E 4482 ADD r10,r10,r0
0x08000140 4483 ADD r11,r11,r0
0x08000142 F1AA0701 SUB r7,r10,#0x01
0x08000146 45DA CMP r10,r11
0x08000148 D101 BNE 0x0800014E
0x0800014A F000F82F BL.W __rt_entry (0x080001AC)
0x0800014E F2AF0E09 ADR.W lr,{pc}-0x07 ; @0x08000147
0x08000152 E8BA000F LDM r10!,{r0-r3}
0x08000156 F0130F01 TST r3,#0x01
0x0800015A BF18 IT NE
0x0800015C 1AFB SUBS r3,r7,r3
0x0800015E F0430301 ORR r3,r3,#0x01
0x08000162 4718 BX r3
0x08000164 3274 DCW 0x3274
0x08000166 0000 DCW 0x0000
0x08000168 3294 DCW 0x3294
0x0800016A 0000 DCW 0x0000
0x0800016C 3A10 SUBS r2,r2,#0x10
0x0800016E BF24 ITT CS
0x08000170 C878 LDM r0!,{r3-r6}
0x08000172 C178 STM r1!,{r3-r6}
0x08000174 D8FA BHI __scatterload_copy (0x0800016C)
0x08000176 0752 LSLS r2,r2,#29
0x08000178 BF24 ITT CS
0x0800017A C830 LDM r0!,{r4-r5}
0x0800017C C130 STM r1!,{r4-r5}
0x0800017E BF44 ITT MI
0x08000180 6804 LDR r4,[r0,#0x00]
0x08000182 600C STR r4,[r1,#0x00]
0x08000184 4770 BX lr
0x08000186 0000 MOVS r0,r0
0x08000188 2300 MOVS r3,#0x00
0x0800018A 2400 MOVS r4,#0x00
0x0800018C 2500 MOVS r5,#0x00
0x0800018E 2600 MOVS r6,#0x00
0x08000190 3A10 SUBS r2,r2,#0x10
0x08000192 BF28 IT CS
0x08000194 C178 STM r1!,{r3-r6}
0x08000196 D8FB BHI 0x08000190
0x08000198 0752 LSLS r2,r2,#29
0x0800019A BF28 IT CS
0x0800019C C130 STM r1!,{r4-r5}
0x0800019E BF48 IT MI
0x080001A0 600B STR r3,[r1,#0x00]
0x080001A2 4770 BX lr
0x080001A4 B51F PUSH {r0-r4,lr}
0x080001A6 BD1F POP {r0-r4,pc}
0x080001A8 B510 PUSH {r4,lr}
0x080001AA BD10 POP {r4,pc}
0x080001AC F003F8DC BL.W __user_setup_stackheap (0x08003368)
0x080001B0 4611 MOV r1,r2
0x080001B2 F7FFFFF7 BL.W __rt_lib_init (0x080001A4)
0x080001B6 F001FDA7 BL.W main (0x08001D08)
0x080001BA F003F8FA BL.W exit (0x080033B2)
0x080001BE B403 PUSH {r0-r1}
0x080001C0 F7FFFFF2 BL.W __rt_lib_shutdown (0x080001A8)
0x080001C4 BC03 POP {r0-r1}
0x080001C6 F003F8FF BL.W _sys_exit (0x080033C8)
0x080001CA 0000 MOVS r0,r0
151: LDR R0, =SystemInit
0x080001CC 4809 LDR r0,[pc,#36] ; @0x080001F4
152: BLX R0
0x080001CE 4780 BLX r0
153: LDR R0, =__main
0x080001D0 4809 LDR r0,[pc,#36] ; @0x080001F8
154: BX R0
155: ENDP
156:
157: ; Dummy Exception Handlers (infinite loops which can be modified)
158:
159: NMI_Handler PROC
160: EXPORT NMI_Handler [WEAK]
0x080001D2 4700 BX r0
161: B .
162: ENDP
163: HardFault_Handler\
164: PROC
165: EXPORT HardFault_Handler [WEAK]
0x080001D4 E7FE B NMI_Handler (0x080001D4)
166: B .
167: ENDP
168: MemManage_Handler\
169: PROC
170: EXPORT MemManage_Handler [WEAK]
0x080001D6 E7FE B HardFault_Handler (0x080001D6)
You mean the MDK Keil appears incorrect? The Assembly code is generated auomaticly by MDK
Hello zhqy2016,
I can confirm that this is a bug which will be fixed in the next release. Thanks for reporting this.
Kind regards,
Christopher