OpenOCD LPC2368 Flash Programming

Has anyone been able to use the OpenOCD environment to program the flash in the LPC2368 processors?

I have tried the parport wiggler clone and the Olimex ARM-USB-OCD adapter with the Eclipse/OpenOCD environment. I can download and debug out of Ram as well as debug out flash using the Flashmagic tool to download the code. I have tried changing the flash bank speed setting and jtag_speed, as well as using rev1.15 and 1.30 but I still get the same results.

Info: openocd.c:84 main(): Open On-Chip Debugger (2007-01-31 12:00 CET)

Warning: embeddedice.c:175 embeddedice_build_reg_cache(): EmbeddedICE version 7 detected, EmbeddedICE handling might be broken

Warning: arm7_9_common.c:842 arm7_9_halt(): target was already halted

Info: server.c:67 add_connection(): accepted ‘gdb’ connection from 0

Warning: gdb_server.c:195 gdb_put_packet(): negative reply, retrying

Warning: gdb_server.c:195 gdb_put_packet(): negative reply, retrying

Warning: gdb_server.c:195 gdb_put_packet(): negative reply, retrying

Error: gdb_server.c:213 gdb_put_packet(): unknown character 0x24 in reply, dropping connection

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x5a

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x31

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x2c

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x35

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x2c

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x23

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x62

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33

Error: gdb_server.c:213 gdb_put_packet(): unknown character 0x24 in reply, dropping connection

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x5a

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x31

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x2c

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x35

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x2c

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x23

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x62

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33

Warning: gdb_server.c:195 gdb_put_packet(): negative reply, retrying

Warning: gdb_server.c:195 gdb_put_packet(): negative reply, retrying

Warning: gdb_server.c:195 gdb_put_packet(): negative reply, retrying

Error: gdb_server.c:213 gdb_put_packet(): unknown character 0x24 in reply, dropping connection

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x76

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x43

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x6f

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x6e

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x74

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x3f

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x23

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x39

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending

Hello ???,

try to use the new version of OpenOCD, r131 which can be found here:

http://www.yagarto.de/

Here a patch for the EmbeddedICE version 7 was added.

Best regards,

mifi

mifi,

Thanks for the quick reply. I have downloaded and tried the r131. And still get the results. Should I get the Warning: embeddedice.c:175 embeddedice_build_reg_cache(): EmbeddedICE version 7 detected, EmbeddedICE handling might be broken message? I don’t get it with the 115 revision.

Craig

Hi Craig,

this is a good question, but this was the part wich was added:

case 7:

WARNING(“EmbeddedICE version 7 detected, EmbeddedICE handling might be broken”);

reg_list[EICE_DBG_CTRL].size = 6;

reg_list[EICE_DBG_STAT].size = 5;

arm7_9->has_monitor_mode = 1;

break;

I think Dominic must handle this. But I could create a new version

if Dominic has a patch. This is no problem.

Regards,

Michael

Hi Michael,

It appears that if I do the commands through telnet they work, but using the Eclipse/GDB I get the errors mentioned earlier.

Telnet:

telnet> halt

telnet>flash erase 0 0 26

telnet>flash write 0 myfile.bin 0

Eclipse Debug

target remote localhost:3333

monitor halt

monitor flash erase 0 0 26

monitor flash write 0 myfile.bin 0

Best Regards,

Craig

Hello,

the “Warning:” about EmbeddedICE version 7 is intentional - I couldn’t find any documentation for this new version, and therefor don’t know about possible sideeffects.

I’m not sure about the reason for the errors you see when trying to programm from within Eclipse. I’ll see if I can reproduce this problem.

Regards,

Dominic