|
vxworks 移植 2410 。AXD调试bootrom的时候出错了,希望大家多多帮忙
[复制链接]
AXD调试bootrom:
修改target\h\tool\gnu\defs.arm
#CC_OPTIM_DRIVER = -O2 -fno-builtin -fvolatile
#CC_OPTIM_NORMAL = -O2 -fno-builtinbbs
#CC_OPTIM_TARGET = -O2 -fno-builtin -fvolatilebbs
CC_OPTIM_DRIVER = -gdwarf -fno-builtin -fvolatile
CC_OPTIM_NORMAL = -gdwarf -fno-builtin
CC_OPTIM_TARGET = -gdwarf -fno-builtin -fvolatile
我试了多种办法 最接近的就是
裸板情况下:
1 在AXD下写配置脚本初始化2410的sdram
2 load image bootrom_uncmp
对了 我还改了个地址
/*#define ROM_TEXT_ADRS ROM_BASE_ADRS*/ /* gx 原先定义的是 0x00000000*/
#define ROM_TEXT_ADRS 0x33e00000
不然的话
在 ldr pc, L$_HiPosn 就会跑飞掉、因为
L$_HiPosn:
.long ROM_TEXT_ADRS + HiPosn - FUNC(romInit)
0x00000000 + 0x33e000ac-0x33e00000 = 0xac 这是原来的,我现在flash里没东西、
0x33e00000 + 0x33e000ac-0x33e00000 = 0x33e000ac 这是现在的的,这样刚好就找到了程序中 HiPosn: 的标号段。
可是现在仅仅是只能看开始的那段汇编啊~ 我现在进入c函数,看到的都是反汇编,现在出了错误了根本就不知道怎么回事情,请教下,有什么办法么???
romStart [0xe1a0c00d] mov r12,r13
33e001cc [0xe92dd810] stmfd r13!,{r4,r11,r12,r14,pc}
33e001d0 [0xe24cb004] sub r11,r12,#4
33e001d4 [0xe24dd008] sub r13,r13,#8
33e001d8 [0xe1a04000] mov r4,r0
33e001dc [0xe59f30b4] ldr r3,0x33e00298 ; = #0x33e0035c
33e001e0 [0xe50b3018] str r3,[r11,#-0x18]
33e001e4 [0xe59f30b0] ldr r3,0x33e0029c ; = #0x33e002ac
33e001e8 [0xe59f10b0] ldr r1,0x33e002a0 ; = #0x33e00000
33e001ec [0xe0612003] rsb r2,r1,r3
33e001f0 [0xe28235cf] add r3,r2,#0x33c00000
33e001f4 [0xe2833602] add r3,r3,#0x200000
33e001f8 [0xe3a005cf] mov r0,#0x33c00000
33e001fc [0xe2800602] add r0,r0,#0x200000
33e00200 [0xe59f1098] ldr r1,0x33e002a0 ; = #0x33e00000
33e00204 [0xe3a02702] mov r2,#0x80000
33e00208 [0xe1a0e00f] mov r14,pc
33e0020c [0xe1a0f003] mov pc,r3
33e00210 [0xe2043002] and r3,r4,#2
33e00214 [0xe3530000] cmp r3,#0
33e00218 [0x0a000017] beq 0x33e0027c ; (romStart + 0xb4)
33e0021c [0xe59f207c] ldr r2,0x33e002a0 ; = #0x33e00000
33e00220 [0xe2423c02] sub r3,r2,#0x200
33e00224 [0xe283120d] add r1,r3,#0xd0000000
33e00228 [0xe1a02121] mov r2,r1,lsr #2
33e0022c [0xe51b3018] ldr r3,[r11,#-0x18]
33e00230 [0xe3a00203] mov r0,#0x30000000
33e00234 [0xe1a01002] mov r1,r2
33e00238 [0xe3a02000] mov r2,#0
33e0023c [0xe1a0e00f] mov r14,pc
33e00240 [0xe1a0f003] mov pc,r3
33e00244 [0xe59f2058] ldr r2,0x33e002a4 ; = #0x34000000
33e00248 [0xe262330d] rsb r3,r2,#0x34000000
33e0024c [0xe1a02123] mov r2,r3,lsr #2
33e00250 [0xe51b3018] ldr r3,[r11,#-0x18]
33e00254 [0xe59f0048] ldr r0,0x33e002a4 ; = #0x34000000
33e00258 [0xe1a01002] mov r1,r2
33e0025c [0xe3a02000] mov r2,#0
33e00260 [0xe1a0e00f] mov r14,pc
33e00264 [0xe1a0f003] mov pc,r3
33e00268 [0xe3a03c07] mov r3,#0x700
33e0026c [0xe2833203] add r3,r3,#0x30000000
33e00270 [0xe3a02000] mov r2,#0
33e00274 [0xe1a01002] mov r1,r2
33e00278 [0xe5c31000] strb r1,[r3,#0]
33e0027c [0xe59f3024] ldr r3,0x33e002a8 ; = #0x33e004c8
33e00280 [0xe50b3014] str r3,[r11,#-0x14]
33e00284 [0xe51b3014] ldr r3,[r11,#-0x14]
33e00288 [0xe1a00004] mov r0,r4
33e0028c [0xe1a0e00f] mov r14,pc
33e00290 [0xe1a0f003] mov pc,r3 ;就是在这句跑飞的 !!!!!!!!!!!
33e00294 [0xe91ba810] ldmdb r11,{r4,r11,r13,pc}
33e00298 [0x33e0035c] mvncc r0,#0x70000001
33e0029c [0x33e002ac] mvncc r0,#0xc000000a
33e002a0 [0x33e00000] mvncc r0,#0
33e002a4 [0x34000000] strcc r0,[r0],#-0
33e002a8 [0x33e004c8] mvncc r0,#0xc8000000
copyLongs [0xe1a0c00d] mov r12,r13 ;看来马上是要进 copyLongs 了!!!!!!!!
|
|