Hi,

I started development on TMS470R1A384 and have problem with endianness 
in OpenOCD. Please consider following scenario:
- generated big-endian elf file
- OpenOCD configured:
        target create TMS470 arm7tdmi -endian big -chain-position 0
        RAM mapped at 0x00000000 - 0x00007FFFF
- Eclipse/GDB configured
   Initialize commands:
        target remote localhost:3333

   Run commands:
        monitor reset init
        load
        continue
- I added LOG_INFO to arm7_9_common.c line 238:

                        if ((retval = target->type->read_memory(target, 
breakpoint->address, 
4, 1, (u8 *)&verify)) != ERROR_OK)
                        {
                                return retval;
                        }
                        LOG_INFO("verify=%08x arm7_9->arm_bkpt=%08x", verify, 
arm7_9->arm_bkpt);
                        if (verify != arm7_9->arm_bkpt)
                        {
                                LOG_ERROR("Unable to set 32 bit software 
breakpoint at address %08x 
- check that memory is read/writable", breakpoint->address);
                                return ERROR_OK;
                        }



Breakpoint is set on main(), address 0x00000150. Here is log from gdb:

        target remote localhost:3333
        0xac090000 in ?? ()
        monitor reset init
        JTAG device found: 0x3100e02f (Manufacturer: 0x017, Part:       0x100e, 
Version: 0x3)
        target state: halted
        target halted in ARM state due to debug-request, current mode:          
Supervisor
        cpsr: 0xa00000d3 pc: 0x00000000
        load
        Loading section .text, size 0x164 lma 0x0
        Start address 0x0, load size 356
        Transfer rate: 7 KB/sec, 356 bytes/write.
        continue
        verify=eedeeede arm7_9->arm_bkpt=deeedeee
        Unable to set 32 bit software breakpoint at address 00000150 - check 
that memory is read/writable

        Breakpoint 1, main () at main.c:13
        13          x -= 10;
        mon mdw 0x150 0x10
        0x00000150: deeedeee e243300a e50b3010 eafffffe 51eb851f 6c0efaa6 
a888bbbe 22f8b274
        0x00000170: 7018fa3f 38c25b4b c34a3bee a3145ca5 408ce3fa 5ae1a1a3 
dd74aeff 471cb75b


Problems:
- cannot set software breakpoint at specified address - somewhere is 
mismatch in converting between endiannesses
- after pressing F5 (step), message:
        Cannot find bounds of current function
- "Disassembly window": instead of presenting disassembled memory view 
starting from address 0x00000150 it shows view from address 0x50010000
- Breakpoint on address 0x00000000. Instruction expected on disassembled 
window:
        b     _start
   it shows:
        0x00000000 <_boot>:     cdple 14, 14, cr13, cr14, cr14, {7}

   After pressing F5 (step) it jumps to address 0x04000000.
- however if I start stepping in telnet session, PC register changes 
it's value correctly

I compiled latest sources from SVN.

Regards,
Krzysztof
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to