OpenOCD + ARM-USB-OCD + LPC-P2148 Not working. [Solved]

Hi All,

Hopefully someone can come to my rescue. I’m not even really sure where to start looking for the answer to this problem. I’m using the Olimex Eclipse + OpenOCD for dummies CD that came with the ARM-USB-OCD debugger.

At first I installed this on my PC, and had no luck. Then I tried my Laptop, downloaded the demo files from the Olimex website http://www.olimex.com/dev/soft/arm/proj … se_web.rar And hey presto! It worked. Little blinking LED’s.

Unfortunately, still no luck with the PC. Oh well I say, will just have to do all the work on the laptop. Set it up on the desk, get settled for a long session of coding… But no, now it’s not working either!!! I can’t get my head around it. How could it just stop working?

Below is the error output (From OpenOCD) when I try and run the P2148_flash demo provided:

Info:    openocd.c:82 main(): Open On-Chip Debugger (2006-08-31 15:00 CEST)
Warning: arm7_9_common.c:785 arm7_9_halt(): target was already halted
Info:    server.c:67 add_connection(): accepted 'gdb' connection from 0
Error:   arm7_9_common.c:1756 arm7_9_read_memory(): memory read caused data abort
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Error:   armv4_5.c:558 armv4_5_run_algorithm(): timeout waiting for algorithm to complete, trying to halt target
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Warning: arm7_9_common.c:622 arm7_9_poll(): DBGACK set while target was in unknown state. Reset or initialize target before resuming
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Warning: arm7_9_common.c:622 arm7_9_poll(): DBGACK set while target was in unknown state. Reset or initialize target before resuming
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Warning: arm7_9_common.c:622 arm7_9_poll(): DBGACK set while target was in unknown state. Reset or initialize target before resuming
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Warning: arm7_9_common.c:622 arm7_9_poll(): DBGACK set while target was in unknown state. Reset or initialize target before resuming
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Warning: arm7_9_common.c:622 arm7_9_poll(): DBGACK set while target was in unknown state. Reset or initialize target before resuming
Error:   arm7_9_common.c:560 arm7_9_execute_sys_speed(): timeout waiting for SYSCOMP & DBGACK, last DBG_STATUS: 5
Warning: lpc2000.c:433 lpc2000_erase(): lpc2000 prepare sectors returned 578820490
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 0x71
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x52
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x63
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x6d
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x64
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x2c
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x63
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x31
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x38
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x39
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x35
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x64
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x31
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x39
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x65
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x65
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x39
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x65
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x38
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
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 0x37
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Warning: lpc2000.c:555 lpc2000_write(): lpc2000 prepare sectors returned 536870928
Error:   gdb_server.c:213 gdb_put_packet(): unknown character 0x24 in reply, dropping connection
Error:   gdb_server.c:213 gdb_put_packet(): unknown character 0x71 in reply, dropping connection
Error:   gdb_server.c:213 gdb_put_packet(): unknown character 0x52 in reply, dropping connection
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x63
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x6d
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x64
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x2c
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x63
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x31
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x38
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x39
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x35
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x64
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x31
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x39
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x65
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x65
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x39
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x65
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x38
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x30
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 0x37
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error:   arm7_9_common.c:943 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Error:   armv4_5.c:558 armv4_5_run_algorithm(): timeout waiting for algorithm to complete, trying to halt target
Warning: lpc2000.c:555 lpc2000_write(): lpc2000 prepare sectors returned 1242717792
Warning: gdb_server.c:195 gdb_put_packet(): negative reply, retrying
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: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
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:249 gdb_get_packet(): negative acknowledgment, but no packet pending
Warning: gdb_server.c:249 gdb_get_packet(): negative acknowledgment, but no packet pending
Warning: gdb_server.c:249 gdb_get_packet(): negative acknowledgment, but no packet pending
Warning: gdb_server.c:246 gdb_get_packet(): acknowledgment received, but no packet pending
Error:   gdb_server.c:213 gdb_put_packet(): unknown character 0x24 in reply, dropping connection
Error:   gdb_server.c:213 gdb_put_packet(): unknown character 0x71 in reply, dropping connection
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x52
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x63
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x6d
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x64
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x2c
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x66
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x35
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x66
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x35
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x35
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x34
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x35
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x66
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x38
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x31
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x63
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x37
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 0x32
Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x33
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

Doesn’t seem particularily helpful to me but maybe it is to someone else? Or if there’s somewhere else I should be looking for clues please let me know.

Cheers,

-Shane.

Hello Shane,

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-08-31 15:00 CEST)

You have an very old OpenOCD :!:

Take a look here: http://www.yagarto.de/

Here you will find a new version for windows and some tutorials how

to work with OpenOCD and the toolchain.

Before you try to use Eclipse, please test if Insight is working.

At this page http://www.yagarto.de/howto/yagarto1/index.html you will

find some small examples and a howto for Insight.

Best regards,

Michael

I had problems with ARM-USB-OCD on a LPC-P2148 too, I had to increase the “jtag_speed” value in lpc2xxx_armusbocd.cfg. The default value is 2, I am using 5 now.

BTW I used the versions present in the Olimex CD, so it is the same you are using.

Mifi,

Cheers for pointing me in the direction of the Yagarto page and howto. Got all that installed and have been able to run the demo programs without any hassles what-so-ever. Thanks.

Now I just need to get my poor noob mind around getting my own projects going :slight_smile:

It is a shame the Olimex stuff doesn’t work straight out of the box though!

-Shane.

Hey Mifi,

The examples on the Yagarto page are great for RAM debug, just wondering if you could point me to anywhere to work out how to use Eclipse/Insight for ROM loading/debug?

Cheers,

-Shane.