load_image problems

Hello,

I’m trying to use load_image to load a binary I created. My RAM starts at address 0x00000000 and ends at address 0x00200000. My binary needs to be loaded at 0x8000.

So, I’ve entered the command (in the telnet interface):

load_image exec 0x8000 bin, where exec is my binary

Here is a hex dump of my binary (very small):

      1 0000000: 04f0 1fe5 0880 0000 ffff ffea 0dc0 a0e1  ................
      2 0000010: 00d8 2de9 04b0 4ce2 2030 9fe5 0020 a0e3  ..-...L. 0... ..
      3 0000020: 0020 c3e5 1430 9fe5 0030 d3e5 0130 83e2  . ...0...0...0..
      4 0000030: ff30 03e2 0420 9fe5 0030 c2e5 f8ff ffea  .0... ...0......
      5 0000040: 4481 0000 0a                             D....

Here is a hex dump of the memory location 0x8000 after the load:

> mdw 0x8000 17  
0x00008000: fffff004 ffff8008 ffffffff ffffc00d ffffd800 ffffb004 ffff3020 ffff2000 
0x00008020: ffff2000 ffff3014 ffff3000 ffff3001 ffff30ff ffff2004 ffff3000 fffffff8 
0x00008040: ffff8144

So, as you can see, OpenOCD seems to be treating the memory as 16 bits wide, setting the 16 MS bits to ffff (or leaving them at that value).

I’ve got an Olimex Cirrus Logic EP9302 board with 32MB of RAM and an Olimex ARM-JTAG-TINY dongle.

Here’s my OpenOCD config file, for reference, though I don’t think it’s the problem:

telnet_port 4444
gdb_port 3333
daemon_startup reset

interface ft2232
reset_config trst_only

jtag_device 4 0x1 0xf 0xe

ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0004

target arm920t little reset_halt 0 arm920t

Any ideas what could be wrong?

Thanks in advance!