山东群英会开奖结果

(玩电子) 电子技术学习与研究
当前位置:单片机教程网 >> MCU设计实例 >> 浏览文章

CORTEX-M0启动过程(反汇编分析)

作者:佚名   来源:本站原创   点击数:x  更新时间:2014年08月17日   【字体:

第1 页共15 页

========================================================================
** ELF Header Information
File Name: .\obj\NUC120_HOT_Project.axf
Machine class: ELFCLASS32 (32-bit)
Data encoding: ELFDATA2LSB (Little endian)
Header version: EV_CURRENT (Current version)
Operating System ABI: none
ABI Version: 0
File Type: ET_EXEC (Executable) (2)
Machine: EM_ARM (ARM)
Image Entry point: 0x000001f1
Flags: EF_ARM_HASENTRY (0x05000002)
ARM ELF revision: 5 (ABI version 2)
Built with
ARM C/C++ Compiler, 4.1 [Build 567]
ARM Assembler, 4.1 [Build 567]
ARM Linker, 4.1 [Build 567]
Header size: 52 bytes (0x34)
Program header entry size: 32 bytes (0x20)
Section header entry size: 40 bytes (0x28)
Program header entries: 1
Section header entries: 16
Program header offset: 18288 (0x00004770)
Section header offset: 18320 (0x00004790)
Section header string table index: 15
========================================================================
** Program header #0 (PT_LOAD) [PF_X + PF_W + PF_R + PF_ARM_ENTRY]
Size : 2228 bytes (1108 bytes in file)
Virtual address: 0x00000000 (Alignment 8)
========================================================================
** Section #1 'ER_RO' (SHT_PROGBITS) [SHF_ALLOC + SHF_EXECINSTR]
Size : 1084 bytes (alignment 4)
Address: 0x00000000
$d.realdata
第2 页共15 页
RESET
__Vectors
0x00000000: 20000478 x.. DCD 536872056
0x00000004: 000001f1 .... DCD 497 RESET向量:上电后,将该值加载到PC,开始运行
0x00000008: 00000211 .... DCD 529
0x0000000c: 00000213 .... DCD 531
0x00000010: 00000000 .... DCD 0
0x00000014: 00000000 .... DCD 0
0x00000018: 00000000 .... DCD 0
0x0000001c: 00000000 .... DCD 0
0x00000020: 00000000 .... DCD 0
0x00000024: 00000000 .... DCD 0
0x00000028: 00000000 .... DCD 0
0x0000002c: 00000215 .... DCD 533
0x00000030: 00000000 .... DCD 0
0x00000034: 00000000 .... DCD 0
0x00000038: 00000217 .... DCD 535
0x0000003c: 00000219 .... DCD 537
0x00000040: 0000021b .... DCD 539
0x00000044: 0000021b .... DCD 539
0x00000048: 0000021b .... DCD 539
0x0000004c: 0000021b .... DCD 539
0x00000050: 0000021b .... DCD 539
0x00000054: 0000021b .... DCD 539
0x00000058: 0000021b .... DCD 539
0x0000005c: 0000021b .... DCD 539
0x00000060: 0000021b .... DCD 539
0x00000064: 0000021b .... DCD 539
0x00000068: 0000021b .... DCD 539
0x0000006c: 0000021b .... DCD 539
0x00000070: 0000021b .... DCD 539
0x00000074: 0000021b .... DCD 539
0x00000078: 0000021b .... DCD 539
0x0000007c: 0000021b .... DCD 539
0x00000080: 0000021b .... DCD 539
0x00000084: 0000021b .... DCD 539
0x00000088: 0000021b .... DCD 539
0x0000008c: 0000021b .... DCD 539
0x00000090: 0000021b .... DCD 539
0x00000094: 0000021b .... DCD 539
0x00000098: 0000021b .... DCD 539
0x0000009c: 0000021b .... DCD 539
0x000000a0: 0000021b .... DCD 539
0x000000a4: 0000021b .... DCD 539
0x000000a8: 0000021b .... DCD 539
0x000000ac: 0000021b .... DCD 539
0x000000b0: 0000021b .... DCD 539
0x000000b4: 0000021b .... DCD 539
0x000000b8: 0000021b .... DCD 539
第3 页共15 页
0x000000bc: 0000021b .... DCD 539
$t
!!!main
__main
0x000000c0: f000f802 .... BL __scatterload ; 0xc8
0x000000c4: f000f840 ..@. BL __rt_entry ; 0x148
!!!scatter
__scatterload
__scatterload_rt2
__scatterload_rt2_thumb_only
0x000000c8: a00c .. ADR r0,{pc}+0x34 ; 0xfc
0x000000ca: c830 0. LDM r0!,{r4,r5}
0x000000cc: 3808 .8 SUBS r0,r0,#8
0x000000ce: 1824 $. ADDS r4,r4,r0
0x000000d0: 182d -. ADDS r5,r5,r0
0x000000d2: 46a2 .F MOV r10,r4
0x000000d4: 1e67 g. SUBS r7,r4,#1
0x000000d6: 46ab .F MOV r11,r5
__scatterload_null
0x000000d8: 4654 TF MOV r4,r10
0x000000da: 465d ]F MOV r5,r11
0x000000dc: 42ac .B CMP r4,r5
0x000000de: d101 .. BNE 0xe4 ; __scatterload_null + 12
0x000000e0: f000f832 ..2. BL __rt_entry ; 0x148
0x000000e4: 467e ~F MOV r6,pc
0x000000e6: 3e0f .> SUBS r6,r6,#0xf
0x000000e8: cc0f .. LDM r4!,{r0-r3}
0x000000ea: 46b6 .F MOV lr,r6
0x000000ec: 2601 .& MOVS r6,#1
0x000000ee: 4233 3B TST r3,r6
0x000000f0: d000 .. BEQ 0xf4 ; __scatterload_null + 28
0x000000f2: 1afb .. SUBS r3,r7,r3
0x000000f4: 46a2 .F MOV r10,r4
0x000000f6: 46ab .F MOV r11,r5
0x000000f8: 4333 3C ORRS r3,r3,r6
0x000000fa: 4718 .G BX r3
$d
0x000000fc: 00000320 ... DCD 800
0x00000100: 00000340 @... DCD 832
$t
!!handler_copy
__scatterload_copy
0x00000104: 3a10 .: SUBS r2,r2,#0x10
0x00000106: d302 .. BCC 0x10e ; __scatterload_copy + 10
0x00000108: c878 x. LDM r0!,{r3-r6}
0x0000010a: c178 x. STM r1!,{r3-r6}
第4 页共15 页
0x0000010c: d8fa .. BHI __scatterload_copy ; 0x104
0x0000010e: 0752 R. LSLS r2,r2,#29
0x00000110: d301 .. BCC 0x116 ; __scatterload_copy + 18
0x00000112: c830 0. LDM r0!,{r4,r5}
0x00000114: c130 0. STM r1!,{r4,r5}
0x00000116: d501 .. BPL 0x11c ; __scatterload_copy + 24
0x00000118: 6804 .h LDR r4,[r0,#0]
0x0000011a: 600c .` STR r4,[r1,#0]
0x0000011c: 4770 pG BX lr
0x0000011e: 0000 .. MOVS r0,r0
!!handler_zi
__scatterload_zeroinit
0x00000120: 2300 .# MOVS r3,#0
0x00000122: 2400 .$ MOVS r4,#0
0x00000124: 2500 .% MOVS r5,#0
0x00000126: 2600 .& MOVS r6,#0
0x00000128: 3a10 .: SUBS r2,r2,#0x10
0x0000012a: d301 .. BCC 0x130 ; __scatterload_zeroinit + 16
0x0000012c: c178 x. STM r1!,{r3-r6}
0x0000012e: d8fb .. BHI 0x128 ; __scatterload_zeroinit + 8
0x00000130: 0752 R. LSLS r2,r2,#29
0x00000132: d300 .. BCC 0x136 ; __scatterload_zeroinit + 22
0x00000134: c130 0. STM r1!,{r4,r5}
0x00000136: d500 .. BPL 0x13a ; __scatterload_zeroinit + 26
0x00000138: 600b .` STR r3,[r1,#0]
0x0000013a: 4770 pG BX lr
.ARM.Collect$$libinit$$00000000
__rt_lib_init
0x0000013c: b51f .. PUSH {r0-r4,lr}
0x0000013e: 46c0 .F MOV r8,r8
0x00000140: 46c0 .F MOV r8,r8
.ARM.Collect$$libinit$$00000006
.ARM.Collect$$libinit$$00000008
.ARM.Collect$$libinit$$0000000A
.ARM.Collect$$libinit$$0000000D
.ARM.Collect$$libinit$$0000000F
.ARM.Collect$$libinit$$00000011
.ARM.Collect$$libinit$$00000013
.ARM.Collect$$libinit$$00000015
.ARM.Collect$$libinit$$00000017
.ARM.Collect$$libinit$$00000019
.ARM.Collect$$libinit$$0000001B
.ARM.Collect$$libinit$$0000001D
.ARM.Collect$$libinit$$0000001F
.ARM.Collect$$libinit$$00000021
.ARM.Collect$$libinit$$00000028
.ARM.Collect$$libinit$$0000002A
.ARM.Collect$$libinit$$0000002C
.ARM.Collect$$libinit$$0000002E
.ARM.Collect$$libinit$$0000002F
第5 页共15 页
__rt_lib_init_alloca_1
__rt_lib_init_argv_1
__rt_lib_init_atexit_1
__rt_lib_init_clock_1
__rt_lib_init_cpp_1
__rt_lib_init_exceptions_1
__rt_lib_init_fp_trap_1
__rt_lib_init_getenv_1
__rt_lib_init_heap_1
__rt_lib_init_lc_collate_1
__rt_lib_init_lc_ctype_1
__rt_lib_init_lc_monetary_1
__rt_lib_init_lc_numeric_1
__rt_lib_init_lc_time_1
__rt_lib_init_rand_1
__rt_lib_init_return
__rt_lib_init_signal_1
__rt_lib_init_stdio_1
__rt_lib_init_user_alloc_1
0x00000142: bd1f .. POP {r0-r4,pc}
.ARM.Collect$$libshutdown$$00000000
__rt_lib_shutdown
0x00000144: b510 .. PUSH {r4,lr}
.ARM.Collect$$libshutdown$$00000003
.ARM.Collect$$libshutdown$$00000006
.ARM.Collect$$libshutdown$$00000009
.ARM.Collect$$libshutdown$$0000000B
.ARM.Collect$$libshutdown$$0000000E
.ARM.Collect$$libshutdown$$0000000F
__rt_lib_shutdown_fp_trap_1
__rt_lib_shutdown_heap_1
__rt_lib_shutdown_return
__rt_lib_shutdown_signal_1
__rt_lib_shutdown_stdio_1
__rt_lib_shutdown_user_alloc_1
0x00000146: bd10 .. POP {r4,pc}
.ARM.Collect$$rtentry$$00000000
.ARM.Collect$$rtentry$$00000002
.ARM.Collect$$rtentry$$00000004
__rt_entry
__rt_entry_presh_1
__rt_entry_sh
0x00000148: f000f936 ..6. BL __user_setup_stackheap ; 0x3b8
0x0000014c: 4611 .F MOV r1,r2
.ARM.Collect$$rtentry$$00000009
.ARM.Collect$$rtentry$$0000000A
__rt_entry_li
__rt_entry_postsh_1
第6 页共15 页
0x0000014e: f7fffff5 .... BL __rt_lib_init ; 0x13c
.ARM.Collect$$rtentry$$0000000C
.ARM.Collect$$rtentry$$0000000D
__rt_entry_main
__rt_entry_postli_1
0x00000152: f000f87f .... BL main ; 0x254
0x00000156: f000f94e ..N. BL exit ; 0x3f6
.ARM.Collect$$rtexit$$00000000
__rt_exit
0x0000015a: b403 .. PUSH {r0,r1}
.ARM.Collect$$rtexit$$00000002
.ARM.Collect$$rtexit$$00000003
__rt_exit_ls
__rt_exit_prels_1
0x0000015c: f7fffff2 .... BL __rt_lib_shutdown ; 0x144
.ARM.Collect$$rtexit$$00000004
__rt_exit_exit
0x00000160: bc03 .. POP {r0,r1}
0x00000162: f000f953 ..S. BL _sys_exit ; 0x40c
0x00000166: 0000 .. MOVS r0,r0
.text
SystemCoreClockUpdate
0x00000168: b570 p. PUSH {r4-r6,lr}
0x0000016a: 481c .H LDR r0,[pc,#112] ; [0x1dc] = 0x50000200
0x0000016c: 6900 .i LDR r0,[r0,#0x10]
0x0000016e: 0746 F. LSLS r6,r0,#29
0x00000170: 0f76 v. LSRS r6,r6,#29
0x00000172: 2e05 .. CMP r6,#5
0x00000174: d900 .. BLS 0x178 ; SystemCoreClockUpdate + 16
0x00000176: 2604 .& MOVS r6,#4
0x00000178: 2e02 .. CMP r6,#2
0x0000017a: d003 .. BEQ 0x184 ; SystemCoreClockUpdate + 28
0x0000017c: 00b0 .. LSLS r0,r6,#2
0x0000017e: 4918 .I LDR r1,[pc,#96] ; [0x1e0] = 0x20000004
0x00000180: 580d .X LDR r5,[r1,r0]
0x00000182: e01e .. B 0x1c2 ; SystemCoreClockUpdate + 90
0x00000184: 4815 .H LDR r0,[pc,#84] ; [0x1dc] = 0x50000200
0x00000186: 6a00 .j LDR r0,[r0,#0x20]
0x00000188: 0400 .. LSLS r0,r0,#16
0x0000018a: 0f84 .. LSRS r4,r0,#30
0x0000018c: 2c01 ., CMP r4,#1
0x0000018e: d900 .. BLS 0x192 ; SystemCoreClockUpdate + 42
0x00000190: 1e64 d. SUBS r4,r4,#1
0x00000192: 4a12 .J LDR r2,[pc,#72] ; [0x1dc] = 0x50000200
0x00000194: 6a12 .j LDR r2,[r2,#0x20]
0x00000196: 0312 .. LSLS r2,r2,#12
0x00000198: 0fd2 .. LSRS r2,r2,#31
0x0000019a: d001 .. BEQ 0x1a0 ; SystemCoreClockUpdate + 56
第7 页共15 页
0x0000019c: 4a11 .J LDR r2,[pc,#68] ; [0x1e4] = 0x1518000
0x0000019e: e000 .. B 0x1a2 ; SystemCoreClockUpdate + 58
0x000001a0: 4a11 .J LDR r2,[pc,#68] ; [0x1e8] = 0xb71b00
0x000001a2: 4b0e .K LDR r3,[pc,#56] ; [0x1dc] = 0x50000200
0x000001a4: 6a1b .j LDR r3,[r3,#0x20]
0x000001a6: 05db .. LSLS r3,r3,#23
0x000001a8: 0ddb .. LSRS r3,r3,#23
0x000001aa: 1c9b .. ADDS r3,r3,#2
0x000001ac: 4610 .F MOV r0,r2
0x000001ae: 4358 XC MULS r0,r3,r0
0x000001b0: 4a0a .J LDR r2,[pc,#40] ; [0x1dc] = 0x50000200
0x000001b2: 6a12 .j LDR r2,[r2,#0x20]
0x000001b4: 0492 .. LSLS r2,r2,#18
0x000001b6: 0ed2 .. LSRS r2,r2,#27
0x000001b8: 1c91 .. ADDS r1,r2,#2
0x000001ba: f000f84d ..M. BL __aeabi_uidiv ; 0x258
0x000001be: 40e0 .@ LSRS r0,r0,r4
0x000001c0: 4605 .F MOV r5,r0
0x000001c2: 4806 .H LDR r0,[pc,#24] ; [0x1dc] = 0x50000200
0x000001c4: 6980 .i LDR r0,[r0,#0x18]
0x000001c6: 0700 .. LSLS r0,r0,#28
0x000001c8: 0f00 .. LSRS r0,r0,#28
0x000001ca: 1c41 A. ADDS r1,r0,#1
0x000001cc: 4628 (F MOV r0,r5
0x000001ce: f000f843 ..C. BL __aeabi_uidiv ; 0x258
0x000001d2: 4906 .I LDR r1,[pc,#24] ; [0x1ec] = 0x20000000
0x000001d4: 6008 .` STR r0,[r1,#0]
0x000001d6: bd70 p. POP {r4-r6,pc}
SystemInit
0x000001d8: 4770 pG BX lr
$d
0x000001da: 0000 .. DCW 0
0x000001dc: 50000200 ...P DCD 1342177792
0x000001e0: 20000004 ... DCD 536870916
0x000001e4: 01518000 ..Q. DCD 22118400
0x000001e8: 00b71b00 .... DCD 12000000
0x000001ec: 20000000 ... DCD 536870912
$t
.text
Reset_Handler
0x000001f0: 480d .H LDR r0,[pc,#52] ; [0x228] = 0x50000100
0x000001f2: 490e .I LDR r1,[pc,#56] ; [0x22c] = 0x59
0x000001f4: 6001 .` STR r1,[r0,#0]
0x000001f6: 490e .I LDR r1,[pc,#56] ; [0x230] = 0x16
0x000001f8: 6001 .` STR r1,[r0,#0]
0x000001fa: 490e .I LDR r1,[pc,#56] ; [0x234] = 0x88
第8 页共15 页
0x000001fc: 6001 .` STR r1,[r0,#0]
0x000001fe: 4a0e .J LDR r2,[pc,#56] ; [0x238] = 0x50000024
0x00000200: 490e .I LDR r1,[pc,#56] ; [0x23c] = 0x5aa5
0x00000202: 6011 .` STR r1,[r2,#0]
0x00000204: 2100 .! MOVS r1,#0
0x00000206: 6001 .` STR r1,[r0,#0]
0x00000208: 480d .H LDR r0,[pc,#52] ; [0x240] = 0x1d9
0x0000020a: 4780 .G BLX r0
0x0000020c: 480d .H LDR r0,[pc,#52] ; [0x244] = 0xc1
0x0000020e: 4700 .G BX r0
NMI_Handler
0x00000210: e7fe .. B NMI_Handler ; 0x210
HardFault_Handler
0x00000212: e7fe .. B HardFault_Handler ; 0x212
SVC_Handler
0x00000214: e7fe .. B SVC_Handler ; 0x214
PendSV_Handler
0x00000216: e7fe .. B PendSV_Handler ; 0x216
SysTick_Handler
0x00000218: e7fe .. B SysTick_Handler ; 0x218
Default_Handler
ACMP_IRQHandler
ADC_IRQHandler
BOD_IRQHandler
CAN0_IRQHandler
EINT0_IRQHandler
EINT1_IRQHandler
GPAB_IRQHandler
GPCDE_IRQHandler
I2C0_IRQHandler
I2C1_IRQHandler
I2S_IRQHandler
PDMA_IRQHandler
PS2_IRQHandler
PWMA_IRQHandler
PWMB_IRQHandler
PWRWU_IRQHandler
RTC_IRQHandler
SPI0_IRQHandler
SPI1_IRQHandler
SPI2_IRQHandler
SPI3_IRQHandler
TMR0_IRQHandler
TMR1_IRQHandler
TMR2_IRQHandler
TMR3_IRQHandler
UART02_IRQHandler
UART1_IRQHandler
第9 页共15 页
USBD_IRQHandler
WDT_IRQHandler
0x0000021a: e7fe .. B Default_Handler ; 0x21a
__user_initial_stackheap
0x0000021c: 480a .H LDR r0,[pc,#40] ; [0x248] = 0x20000078
0x0000021e: 490b .I LDR r1,[pc,#44] ; [0x24c] = 0x20000478
0x00000220: 4a09 .J LDR r2,[pc,#36] ; [0x248] = 0x20000078
0x00000222: 4b0b .K LDR r3,[pc,#44] ; [0x250] = 0x20000078
0x00000224: 4770 pG BX lr
$d
0x00000226: 0000 .. DCW 0
0x00000228: 50000100 ...P DCD 1342177536
0x0000022c: 00000059 Y... DCD 89
0x00000230: 00000016 .... DCD 22
0x00000234: 00000088 .... DCD 136
0x00000238: 50000024 $..P DCD 1342177316
0x0000023c: 00005aa5 .Z.. DCD 23205
0x00000240: 000001d9 .... DCD 473
0x00000244: 000000c1 .... DCD 193
0x00000248: 20000078 x.. DCD 536871032
0x0000024c: 20000478 x.. DCD 536872056
0x00000250: 20000078 x.. DCD 536871032
$t
.text
main
0x00000254: bf00 .. NOP
0x00000256: e7fe .. B 0x256 ; main + 2
.text
__aeabi_uidiv
__aeabi_uidivmod
0x00000258: 2200 ." MOVS r2,#0
0x0000025a: 0903 .. LSRS r3,r0,#4
0x0000025c: 428b .B CMP r3,r1
0x0000025e: d32c ,. BCC 0x2ba ; __aeabi_idiv + 78
0x00000260: 0a03 .. LSRS r3,r0,#8
0x00000262: 428b .B CMP r3,r1
0x00000264: d311 .. BCC 0x28a ; __aeabi_idiv + 30
0x00000266: 2300 .# MOVS r3,#0
0x00000268: 469c .F MOV r12,r3
0x0000026a: e04e N. B 0x30a ; __aeabi_idiv + 158
__aeabi_idiv
__aeabi_idivmod
0x0000026c: 4603 .F MOV r3,r0
0x0000026e: 430b .C ORRS r3,r3,r1
0x00000270: d43c <. BMI 0x2ec ; __aeabi_idiv + 128
0x00000272: 2200 ." MOVS r2,#0
0x00000274: 0843 C. LSRS r3,r0,#1
0x00000276: 428b .B CMP r3,r1
0x00000278: d331 1. BCC 0x2de ; __aeabi_idiv + 114
第10 页共15 页
0x0000027a: 0903 .. LSRS r3,r0,#4
0x0000027c: 428b .B CMP r3,r1
0x0000027e: d31c .. BCC 0x2ba ; __aeabi_idiv + 78
0x00000280: 0a03 .. LSRS r3,r0,#8
0x00000282: 428b .B CMP r3,r1
0x00000284: d301 .. BCC 0x28a ; __aeabi_idiv + 30
0x00000286: 4694 .F MOV r12,r2
0x00000288: e03f ?. B 0x30a ; __aeabi_idiv + 158
0x0000028a: 09c3 .. LSRS r3,r0,#7
0x0000028c: 428b .B CMP r3,r1
0x0000028e: d301 .. BCC 0x294 ; __aeabi_idiv + 40
0x00000290: 01cb .. LSLS r3,r1,#7
0x00000292: 1ac0 .. SUBS r0,r0,r3
0x00000294: 4152 RA ADCS r2,r2,r2
0x00000296: 0983 .. LSRS r3,r0,#6
0x00000298: 428b .B CMP r3,r1
0x0000029a: d301 .. BCC 0x2a0 ; __aeabi_idiv + 52
0x0000029c: 018b .. LSLS r3,r1,#6
0x0000029e: 1ac0 .. SUBS r0,r0,r3
0x000002a0: 4152 RA ADCS r2,r2,r2
0x000002a2: 0943 C. LSRS r3,r0,#5
0x000002a4: 428b .B CMP r3,r1
0x000002a6: d301 .. BCC 0x2ac ; __aeabi_idiv + 64
0x000002a8: 014b K. LSLS r3,r1,#5
0x000002aa: 1ac0 .. SUBS r0,r0,r3
0x000002ac: 4152 RA ADCS r2,r2,r2
0x000002ae: 0903 .. LSRS r3,r0,#4
0x000002b0: 428b .B CMP r3,r1
0x000002b2: d301 .. BCC 0x2b8 ; __aeabi_idiv + 76
0x000002b4: 010b .. LSLS r3,r1,#4
0x000002b6: 1ac0 .. SUBS r0,r0,r3
0x000002b8: 4152 RA ADCS r2,r2,r2
0x000002ba: 08c3 .. LSRS r3,r0,#3
0x000002bc: 428b .B CMP r3,r1
0x000002be: d301 .. BCC 0x2c4 ; __aeabi_idiv + 88
0x000002c0: 00cb .. LSLS r3,r1,#3
0x000002c2: 1ac0 .. SUBS r0,r0,r3
0x000002c4: 4152 RA ADCS r2,r2,r2
0x000002c6: 0883 .. LSRS r3,r0,#2
0x000002c8: 428b .B CMP r3,r1
0x000002ca: d301 .. BCC 0x2d0 ; __aeabi_idiv + 100
0x000002cc: 008b .. LSLS r3,r1,#2
0x000002ce: 1ac0 .. SUBS r0,r0,r3
0x000002d0: 4152 RA ADCS r2,r2,r2
0x000002d2: 0843 C. LSRS r3,r0,#1
0x000002d4: 428b .B CMP r3,r1
0x000002d6: d301 .. BCC 0x2dc ; __aeabi_idiv + 112
0x000002d8: 004b K. LSLS r3,r1,#1
0x000002da: 1ac0 .. SUBS r0,r0,r3
0x000002dc: 4152 RA ADCS r2,r2,r2
第11 页共15 页
0x000002de: 1a41 A. SUBS r1,r0,r1
0x000002e0: d200 .. BCS 0x2e4 ; __aeabi_idiv + 120
0x000002e2: 4601 .F MOV r1,r0
0x000002e4: 4152 RA ADCS r2,r2,r2
0x000002e6: 4610 .F MOV r0,r2
0x000002e8: 4770 pG BX lr
0x000002ea: e05d ]. B 0x3a8 ; __aeabi_idiv + 316
0x000002ec: 0fca .. LSRS r2,r1,#31
0x000002ee: d000 .. BEQ 0x2f2 ; __aeabi_idiv + 134
0x000002f0: 4249 IB RSBS r1,r1,#0
0x000002f2: 1003 .. ASRS r3,r0,#32
0x000002f4: d300 .. BCC 0x2f8 ; __aeabi_idiv + 140
0x000002f6: 4240 @B RSBS r0,r0,#0
0x000002f8: 4053 S@ EORS r3,r3,r2
0x000002fa: 2200 ." MOVS r2,#0
0x000002fc: 469c .F MOV r12,r3
0x000002fe: 0903 .. LSRS r3,r0,#4
0x00000300: 428b .B CMP r3,r1
0x00000302: d32d -. BCC 0x360 ; __aeabi_idiv + 244
0x00000304: 0a03 .. LSRS r3,r0,#8
0x00000306: 428b .B CMP r3,r1
0x00000308: d312 .. BCC 0x330 ; __aeabi_idiv + 196
0x0000030a: 22fc ." MOVS r2,#0xfc
0x0000030c: 0189 .. LSLS r1,r1,#6
0x0000030e: ba12 .. REV r2,r2
0x00000310: 0a03 .. LSRS r3,r0,#8
0x00000312: 428b .B CMP r3,r1
0x00000314: d30c .. BCC 0x330 ; __aeabi_idiv + 196
0x00000316: 0189 .. LSLS r1,r1,#6
0x00000318: 1192 .. ASRS r2,r2,#6
0x0000031a: 428b .B CMP r3,r1
0x0000031c: d308 .. BCC 0x330 ; __aeabi_idiv + 196
0x0000031e: 0189 .. LSLS r1,r1,#6
0x00000320: 1192 .. ASRS r2,r2,#6
0x00000322: 428b .B CMP r3,r1
0x00000324: d304 .. BCC 0x330 ; __aeabi_idiv + 196
0x00000326: 0189 .. LSLS r1,r1,#6
0x00000328: d03a :. BEQ 0x3a0 ; __aeabi_idiv + 308
0x0000032a: 1192 .. ASRS r2,r2,#6
0x0000032c: e000 .. B 0x330 ; __aeabi_idiv + 196
0x0000032e: 0989 .. LSRS r1,r1,#6
0x00000330: 09c3 .. LSRS r3,r0,#7
0x00000332: 428b .B CMP r3,r1
0x00000334: d301 .. BCC 0x33a ; __aeabi_idiv + 206
0x00000336: 01cb .. LSLS r3,r1,#7
0x00000338: 1ac0 .. SUBS r0,r0,r3
0x0000033a: 4152 RA ADCS r2,r2,r2
0x0000033c: 0983 .. LSRS r3,r0,#6
0x0000033e: 428b .B CMP r3,r1
0x00000340: d301 .. BCC 0x346 ; __aeabi_idiv + 218
第12 页共15 页
0x00000342: 018b .. LSLS r3,r1,#6
0x00000344: 1ac0 .. SUBS r0,r0,r3
0x00000346: 4152 RA ADCS r2,r2,r2
0x00000348: 0943 C. LSRS r3,r0,#5
0x0000034a: 428b .B CMP r3,r1
0x0000034c: d301 .. BCC 0x352 ; __aeabi_idiv + 230
0x0000034e: 014b K. LSLS r3,r1,#5
0x00000350: 1ac0 .. SUBS r0,r0,r3
0x00000352: 4152 RA ADCS r2,r2,r2
0x00000354: 0903 .. LSRS r3,r0,#4
0x00000356: 428b .B CMP r3,r1
0x00000358: d301 .. BCC 0x35e ; __aeabi_idiv + 242
0x0000035a: 010b .. LSLS r3,r1,#4
0x0000035c: 1ac0 .. SUBS r0,r0,r3
0x0000035e: 4152 RA ADCS r2,r2,r2
0x00000360: 08c3 .. LSRS r3,r0,#3
0x00000362: 428b .B CMP r3,r1
0x00000364: d301 .. BCC 0x36a ; __aeabi_idiv + 254
0x00000366: 00cb .. LSLS r3,r1,#3
0x00000368: 1ac0 .. SUBS r0,r0,r3
0x0000036a: 4152 RA ADCS r2,r2,r2
0x0000036c: 0883 .. LSRS r3,r0,#2
0x0000036e: 428b .B CMP r3,r1
0x00000370: d301 .. BCC 0x376 ; __aeabi_idiv + 266
0x00000372: 008b .. LSLS r3,r1,#2
0x00000374: 1ac0 .. SUBS r0,r0,r3
0x00000376: 4152 RA ADCS r2,r2,r2
0x00000378: d2d9 .. BCS 0x32e ; __aeabi_idiv + 194
0x0000037a: 0843 C. LSRS r3,r0,#1
0x0000037c: 428b .B CMP r3,r1
0x0000037e: d301 .. BCC 0x384 ; __aeabi_idiv + 280
0x00000380: 004b K. LSLS r3,r1,#1
0x00000382: 1ac0 .. SUBS r0,r0,r3
0x00000384: 4152 RA ADCS r2,r2,r2
0x00000386: 1a41 A. SUBS r1,r0,r1
0x00000388: d200 .. BCS 0x38c ; __aeabi_idiv + 288
0x0000038a: 4601 .F MOV r1,r0
0x0000038c: 4663 cF MOV r3,r12
0x0000038e: 4152 RA ADCS r2,r2,r2
0x00000390: 105b [. ASRS r3,r3,#1
0x00000392: 4610 .F MOV r0,r2
0x00000394: d301 .. BCC 0x39a ; __aeabi_idiv + 302
0x00000396: 4240 @B RSBS r0,r0,#0
0x00000398: 2b00 .+ CMP r3,#0
0x0000039a: d500 .. BPL 0x39e ; __aeabi_idiv + 306
0x0000039c: 4249 IB RSBS r1,r1,#0
0x0000039e: 4770 pG BX lr
0x000003a0: 4663 cF MOV r3,r12
0x000003a2: 105b [. ASRS r3,r3,#1
0x000003a4: d300 .. BCC 0x3a8 ; __aeabi_idiv + 316
第13 页共15 页
0x000003a6: 4240 @B RSBS r0,r0,#0
0x000003a8: b501 .. PUSH {r0,lr}
0x000003aa: 2000 . MOVS r0,#0
0x000003ac: 46c0 .F MOV r8,r8
0x000003ae: 46c0 .F MOV r8,r8
0x000003b0: bd02 .. POP {r1,pc}
.text
__use_two_region_memory
0x000003b2: 4770 pG BX lr
__rt_heap_escrow$2region
0x000003b4: 4770 pG BX lr
__rt_heap_expand$2region
0x000003b6: 4770 pG BX lr
.text
__user_setup_stackheap
0x000003b8: 4675 uF MOV r5,lr
0x000003ba: f000f823 ..#. BL __user_libspace ; 0x404
0x000003be: 46ae .F MOV lr,r5
0x000003c0: 0005 .. MOVS r5,r0
0x000003c2: 4669 iF MOV r1,sp
0x000003c4: 4653 SF MOV r3,r10
0x000003c6: 08c0 .. LSRS r0,r0,#3
0x000003c8: 00c0 .. LSLS r0,r0,#3
0x000003ca: 4685 .F MOV sp,r0
0x000003cc: b018 .. ADD sp,sp,#0x60
0x000003ce: b520 . PUSH {r5,lr}
0x000003d0: f7ffff24 ..$. BL __user_initial_stackheap ; 0x21c
0x000003d4: bc60 `. POP {r5,r6}
0x000003d6: 2700 .' MOVS r7,#0
0x000003d8: 0849 I. LSRS r1,r1,#1
0x000003da: 46b6 .F MOV lr,r6
0x000003dc: 2600 .& MOVS r6,#0
0x000003de: c5c0 .. STM r5!,{r6,r7}
0x000003e0: c5c0 .. STM r5!,{r6,r7}
0x000003e2: c5c0 .. STM r5!,{r6,r7}
0x000003e4: c5c0 .. STM r5!,{r6,r7}
0x000003e6: c5c0 .. STM r5!,{r6,r7}
0x000003e8: c5c0 .. STM r5!,{r6,r7}
0x000003ea: c5c0 .. STM r5!,{r6,r7}
0x000003ec: c5c0 .. STM r5!,{r6,r7}
0x000003ee: 3d40 @= SUBS r5,r5,#0x40
0x000003f0: 0049 I. LSLS r1,r1,#1
0x000003f2: 468d .F MOV sp,r1
0x000003f4: 4770 pG BX lr
.text
exit
0x000003f6: 4604 .F MOV r4,r0
0x000003f8: 46c0 .F MOV r8,r8
0x000003fa: 46c0 .F MOV r8,r8
0x000003fc: 4620 F MOV r0,r4
第14 页共15 页
0x000003fe: f7fffeac .... BL __rt_exit ; 0x15a
0x00000402: 0000 .. MOVS r0,r0
.text
__user_libspace
__user_perproc_libspace
__user_perthread_libspace
0x00000404: 4800 .H LDR r0,[pc,#0] ; [0x408] = 0x20000018
0x00000406: 4770 pG BX lr
$d
0x00000408: 20000018 ... DCD 536870936
$t
.text
_sys_exit
0x0000040c: 4901 .I LDR r1,[pc,#4] ; [0x414] = 0x20026
0x0000040e: 2018 . MOVS r0,#0x18
0x00000410: beab .. BKPT #0xab
0x00000412: e7fe .. B 0x412 ; _sys_exit + 6
$d
0x00000414: 00020026 &... DCD 131110
$t
.text
__I$use$semihosting
__use_no_semihosting_swi
0x00000418: 4770 pG BX lr
0x0000041a: 0000 .. MOVS r0,r0
$d.realdata
Region$$Table$$Base
0x0000041c: 0000043c <... DCD 1084
0x00000420: 20000000 ... DCD 536870912
0x00000424: 00000018 .... DCD 24
0x00000428: 00000104 .... DCD 260
0x0000042c: 00000454 T... DCD 1108
0x00000430: 20000018 ... DCD 536870936
0x00000434: 00000460 `... DCD 1120
0x00000438: 00000120 ... DCD 288
Region$$Table$$Limit
** Section #2 'ER_RW' (SHT_PROGBITS) [SHF_ALLOC + SHF_WRITE]
Size : 24 bytes (alignment 4)
Address: 0x20000000
** Section #3 'ER_ZI' (SHT_NOBITS) [SHF_ALLOC + SHF_WRITE]
Size : 1120 bytes (alignment 8)
Address: 0x20000018
** Section #4 '.debug_abbrev' (SHT_PROGBITS)
Size : 1476 bytes
第15 页共15 页
** Section #5 '.debug_frame' (SHT_PROGBITS)
Size : 552 bytes
** Section #6 '.debug_info' (SHT_PROGBITS)
Size : 1980 bytes
** Section #7 '.debug_line' (SHT_PROGBITS)
Size : 652 bytes
** Section #8 '.debug_loc' (SHT_PROGBITS)
Size : 72 bytes
** Section #9 '.debug_macinfo' (SHT_PROGBITS)
Size : 1944 bytes
** Section #10 '.debug_pubnames' (SHT_PROGBITS)
Size : 143 bytes
** Section #11 '.symtab' (SHT_SYMTAB)
Size : 3920 bytes (alignment 4)
String table #12 '.strtab'
Last local symbol no. 136
** Section #12 '.strtab' (SHT_STRTAB)
Size : 4056 bytes
** Section #13 '.note' (SHT_NOTE)
Size : 28 bytes (alignment 4)
** Section #14 '.comment' (SHT_PROGBITS)
Size : 2148 bytes
** Section #15 '.shstrtab' (SHT_STRTAB)
Size : 156 bytes
 
1. 上电复位后,从地址0x0000_0004 处获得Reset_Handler 的地址0x0000_01f0 并跳转到该处执行。
2. Reset_Handler
1 向0x5000_0100 方连续写入0x59,0x16,0x88,实现特殊寄存器解锁。
2 向0x5000_0024 写入0x5AA5,禁止POR 电路。
3 向0x5000_0100 方连续写入0x00,实现特殊寄存器上锁。
4 调用SystemInit 子程序,地址位于0x000001d8 本程序实际为空。
5 跳转到__main,地址位于0x000000c0。
3. __main
1 调用__scatterload 子程序,地址位于0x000000c8。
__scatterload_rt2
__scatterload_rt2_thumb_only
0x000000c8: a00c .. ADR r0,{pc}+0x34 ; 0xfc
0x000000ca: c830 0. LDM r0!,{r4,r5}
0x000000cc: 3808 .8 SUBS r0,r0,#8
0x000000ce: 1824 $. ADDS r4,r4,r0
0x000000d0: 182d -. ADDS r5,r5,r0
0x000000d2: 46a2 .F MOV r10,r4
0x000000d4: 1e67 g. SUBS r7,r4,#1
0x000000d6: 46ab .F MOV r11,r5
__scatterload_null
0x000000d8: 4654 TF MOV r4,r10
0x000000da: 465d ]F MOV r5,r11
0x000000dc: 42ac .B CMP r4,r5
0x000000de: d101 .. BNE 0xe4 ; __scatterload_null + 12
0x000000e0: f000f832 ..2. BL __rt_entry ; 0x148
0x000000e4: 467e ~F MOV r6,pc
0x000000e6: 3e0f .> SUBS r6,r6,#0xf
0x000000e8: cc0f .. LDM r4!,{r0-r3}
0x000000ea: 46b6 .F MOV lr,r6
0x000000ec: 2601 .& MOVS r6,#1
0x000000ee: 4233 3B TST r3,r6
0x000000f0: d000 .. BEQ 0xf4 ; __scatterload_null + 28
0x000000f2: 1afb .. SUBS r3,r7,r3
0x000000f4: 46a2 .F MOV r10,r4
0x000000f6: 46ab .F MOV r11,r5
0x000000f8: 4333 3C ORRS r3,r3,r6
0x000000fa: 4718 .G BX r3
$d
0x000000fc: 00000320 ... DCD 800
0x00000100: 00000340 @... DCD 832
$t
!!handler_copy
__scatterload_copy
0x00000104: 3a10 .: SUBS r2,r2,#0x10
0x00000106: d302 .. BCC 0x10e ; __scatterload_copy + 10
0x00000108: c878 x. LDM r0!,{r3-r6}
0x0000010a: c178 x. STM r1!,{r3-r6}
0x0000010c: d8fa .. BHI __scatterload_copy ; 0x104
0x0000010e: 0752 R. LSLS r2,r2,#29
0x00000110: d301 .. BCC 0x116 ; __scatterload_copy + 18
0x00000112: c830 0. LDM r0!,{r4,r5}
0x00000114: c130 0. STM r1!,{r4,r5}
0x00000116: d501 .. BPL 0x11c ; __scatterload_copy + 24
0x00000118: 6804 .h LDR r4,[r0,#0]
0x0000011a: 600c .` STR r4,[r1,#0]
0x0000011c: 4770 pG BX lr
0x0000011e: 0000 .. MOVS r0,r0
!!handler_zi
__scatterload_zeroinit
0x00000120: 2300 .# MOVS r3,#0
0x00000122: 2400 .$ MOVS r4,#0
0x00000124: 2500 .% MOVS r5,#0
0x00000126: 2600 .& MOVS r6,#0
0x00000128: 3a10 .: SUBS r2,r2,#0x10
0x0000012a: d301 .. BCC 0x130 ; __scatterload_zeroinit + 16
0x0000012c: c178 x. STM r1!,{r3-r6}
0x0000012e: d8fb .. BHI 0x128 ; __scatterload_zeroinit + 8
0x00000130: 0752 R. LSLS r2,r2,#29
0x00000132: d300 .. BCC 0x136 ; __scatterload_zeroinit + 22
0x00000134: c130 0. STM r1!,{r4,r5}
0x00000136: d500 .. BPL 0x13a ; __scatterload_zeroinit + 26
0x00000138: 600b .` STR r3,[r1,#0]
0x0000013a: 4770 pG BX lr
2 跳转到__rt_entry,地址位于0x00000148。
3 调用__user_setup_stackheap 子程序,地址位于0x000003b8。实现用户堆栈初始化。
4 调用__user_setup_stackheap 子程序,地址位于0x000003b8。实现用户堆栈初始化。
5 调用__rt_lib_init 子程序,地址位于0x0000013c。实现驱动库初始化。本程序实际为空。
6 在__rt_entry_main,地址位于0x00000152 处跳转到main,地址位于0x00000254。
7 在main 处开始执行真正用户自己的程序。本程序为空循环。
 
发表评论】【告诉好友】【收藏此文】【关闭窗口

文章评论

尊十彩票注册 山东群英会购买平台 海南4+1玩法 河南快3 百万彩票 海南4+1开奖 黑龙江快乐十分 湖北快3代理 智慧彩票投注预测APP pk10怎么玩