这是将两个程序写进nandflash的程序片段,
//设置断点分别烧写两个程序
//4K 从第0块开始 bootloader
size = WrFileToNF((CHAR *)0x30100000L,0x1000,0,1,BlockPage,PageSize);
//读出bootloader检查
RdFileFromNF((CHAR *)0x30200000L,0x1000,0,1,BlockPage,PageSize);
//128K 从第二块开始 应用软件
size = WrFileToNF((CHAR *)0x30100000L,0x20000,1,10,BlockPage,PageSize);
//读出应用软件检查
RdFileFromNF((CHAR *)0x30200000L,0x20000,1,10,BlockPage,PageSize);
我想问下,那个0x30100000是怎么来的,为什么不是0x30000000,而且两次都是0x30100000,
下面这段是从flash 到sdram的拷贝,
bl ReadNandID
mov r6, #0
ldr r0, =0xec73
cmp r5, r0
beq %F1
ldr r0, =0xec75
cmp r5, r0
beq %F1
mov r6, #1
1
bl ReadNandStatus
mov r8, #0
ldr r9, =__ENTRY
2
ands r0, r8, #0x1f
bne %F3
mov r0, r8
bl CheckBadBlk
cmp r0, #0
addne r8, r8, #32
bne %F4
3
mov r0, r8
mov r1, r9
bl ReadNandPage
add r9, r9, #512
add r8, r8, #1
4
cmp r8, #256 ;128K
bcc %B2
拷到__ENTRY去,我想问下这时这个地址是多少,0x30100000吗,
怎么算出来的, |