.extern main .global _start .extern __end_data
b _start .equ ImageSize,__end_data-0x0AFE0100 .long ImageSize
_start: ldr r1,=StackInit ldr sp,[r1] and sp, sp, #0xFFFFFFFC // to ensure sp not be odd b main
.equ StackInitValue, __end_data+0x1000 // 4K
StackInit: .long StackInitValue .global JumpToKernel JumpToKernel: mov pc, r0 .global JumpToKernel0x JumpToKernel0x: mov r8, r0 mov r0, r1 mov r1, r2 mov r2, r3 mov r3, r4 mov pc, r8 .section ".data.boot" .section ".bss.boot"
//**************************end*****************************//
下面是lds文件 SECTIONS { . = 0x0AFE00F8; .text : { *(.text) *(.fixup) *(.rodata) *(.rodata.*) } .data : { *(.data) } .bss : { *(.bss) } __end_data = .; }
为什么这里是0x0AFE00F8,而不是0x0AFE0100?flashloader跳转到0x0AFE0100开始执行.而看bin文件发现前面8个字节也确实不是ARM指令,为0x000000EAC73F0000
|