ROMSTART=80000000
ROMWIDTH=32
ROMSIZE=00015400;85ko do not change !
;size of the generated eboot.nb0,eboot.nb1,...
;size of the EBOOT section, limited by the internal SRAM. The size must be 80ko to be upadatable by FirstBoot
MODULES
; Name Path Memory Type
; ------ ---------------------------------------------- -----------
nk.exe $(_TARGETPLATROOT)\target\$(_TGTCPU)\$(WINCEDEBUG)\eboot.exe EBOOT
回singlerace :
1:这个cpu在设置一个BMS引脚的情况下可以将接在cs0(0x1000,0000)的NOR FLASH直接映射在0地址,上电后可立即执行flash.
2:cpu内部是有一个bootloader,但是放在了ROM中,无法改变
3:照您所说,执行完开启后需立即执行mov pc, r2,我试过,如下:
ACTIVATEMMU
; The 1st Level Section Descriptors are setup. Initialize the MMU and turn it on.
;
mov r1, #1
mcr p15, 0, r1, c3, c0, 0 ; Set up access to domain 0.
mov r0, #0 ; ********I PLUS
mcr p15, 0, r0, c8, c7, 0 ; Flush the instruction and data TLBs.
mcr p15, 0, r0, c7, c10, 4 ; Drain the write and fill buffers.********I
mov r1, #0x78 ; Bits [6:3] must be written as 1's.
orr r1, r1, #0x1 ; Enable MMU.
orr r1, r1, #0x1000 ; Enable IC.
orr r1, r1, #0x0800 ; Enable BTB.
;orr r1, r1, #0x50000 ;16,18bit SBO
orr r1, r1, #0x4 ; Enable DC.
ldr r2, =VirtualStart ; Get virtual address of 'VirtualStart' label.
cmp r2, #0 ; Make sure no stall on "mov pc,r2" below.
beq STALL2
; Enable the MMU.
;
nop
nop
nop
mcr p15, 0, r1, c1, c0, 0 ; MMU ON: All memory accesses are now virtual.
nop
nop
nop
; Jump to the virtual address of the 'VirtualStart' label.
;
mov pc, r2 ;
nop
nop
nop
; *************************************************************************
; *************************************************************************
; The MMU and caches are now enabled and we're running in a virtual
; address space.
;
ALIGN
VirtualStart
; ALIGNRAM 2
; Set up a supervisor mode stack.
;
; NOTE: These values must match the OEMAddressTable and .bib file entries for
; the bootloader.
;
LDR r3,=0x01000000
LDR r4,=0x9FFFF430 (此处是点灯程序,如我在19楼所说的那样换成了虚拟地址
0x9FFFF430,试过灯还没亮,不知这样是否正确??)
STR r3,[r4]