Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 137208

Forum Post: DM814x custom board UBOOT problem

$
0
0

Hi,

I'm having a problem booting a custom board using DM814x. I've been able to use JTAG and xds100v2 to get the exact error. The board hang in the SPL uboot step. I have set a hardware breakpoint in the s_init(u32 in_ddr) method from my board.c file, the same from the ti8148 demoboard. Then when the code returns from the method starts the relocate. I have done a step by step

From the arch/arm/cpu/arm_cortexa8/start.S

#ifndef CONFIG_SKIP_LOWLEVEL_INIT
    bl    cpu_init_crit
#endif

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
relocate:                @ relocate U-Boot to RAM
    adr    r0, _start        @ r0 <- current position of code
    ldr    r1, _TEXT_BASE        @ test if we run from flash or RAM
    cmp    r0, r1            @ don't reloc during debug
    beq    stack_setup

    ldr    r2, _armboot_start
    ldr    r3, _bss_start
    sub    r2, r3, r2        @ r2 <- size of armboot
    add    r2, r0, r2        @ r2 <- source end address

copy_loop:                @ copy 32 bytes at a time
    ldmia    r0!, {r3 - r10}        @ copy from source address [r0]
    stmia    r1!, {r3 - r10}        @ copy to   target address [r1]
    cmp    r0, r2            @ until source end addreee [r2]
    ble    copy_loop
#endif    /* CONFIG_SKIP_RELOCATE_UBOOT */

and in the dissasembly window:

402f0474:   E51F2038 LDR             R2, _armboot_start
402f0478:   E51F3038 LDR             R3, _bss_start
402f047c:   E0432002 SUB             R2, R3, R2
402f0480:   E0802002 ADD             R2, R0, R2
402f0484:   E8B007F8 LDMFD           R0!, {R3, R4, R5, R6, R7, R8, R9, R10}
402f0488:   E8A107F8 STMEA           R1!, {R3, R4, R5, R6, R7, R8, R9, R10}

This instructions makes the PC to jump to 0x00020010 then to 0x4031D010
From the datasheet 4.3.1.1 ROM Exception Vectors I can read:

20010h Data abort PC = 4030 D010h

I've saved the registers:

PC:     0x4031D010
LR:     0x402F0490
CPSR:   0x90000197
R0:     0x402F0420
R1:     0x80700000
R2:     0x4031494C
R3:     0xEA000012
R4-R10: 0xE59FF014
R11:    0x00027C94
R12:    0x00000005
R13:    0x00000000
R14:    0x402F0490

What it means?? Maybe the 1GB RAM timings are wrong then the relocate can't be made??

Any hint is welcome!

Regards


Viewing all articles
Browse latest Browse all 137208

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>