Unable to debug using olimex for dummies cd, olimex OCD USB

Hello,

I just received an LPC-H2148 and an ARM-USB-OCD from Olimex. I ran the install cd and followed the instrutions contained in the HOW_TO_INSTALL.txt file.

When I hit the debug button in eclipse I get the following error message:

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)

Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered

Error: arm7_9_common.c:972 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure

Error: target.c:1054 handle_target(): couldn’t poll target, exiting

No need to say that I cannot debug the program.

Any idea what’s wrong?

Thanks!

jeanseb:
Hello,

I just received an LPC-H2148 and an ARM-USB-OCD from Olimex. I ran the install cd and followed the instrutions contained in the HOW_TO_INSTALL.txt file.

When I hit the debug button in eclipse I get the following error message:

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)

Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered

Error: arm7_9_common.c:972 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure

Error: target.c:1054 handle_target(): couldn’t poll target, exiting

No need to say that I cannot debug the program.

Any idea what’s wrong?

Thanks!

  1. Since you are getting communications errors, you may be running the JTAG interface at too high a speed for your target. You configure that in the OpenOCD configuration file, with a higher value giving a lower JTAG clock rate.

  2. Since you are apparently getting some JTAG communication you probably have the DBG_E jumper installed, but it may be worth checking.

  3. You are using a really really ancient version of OpenOCD, since it is from more than one year ago.

–Dave

dshuman:

jeanseb:
Hello,

I just received an LPC-H2148 and an ARM-USB-OCD from Olimex. I ran the install cd and followed the instrutions contained in the HOW_TO_INSTALL.txt file.

When I hit the debug button in eclipse I get the following error message:

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)

Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered

Error: arm7_9_common.c:972 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure

Error: target.c:1054 handle_target(): couldn’t poll target, exiting

No need to say that I cannot debug the program.

Any idea what’s wrong?

Thanks!

  1. Since you are getting communications errors, you may be running the JTAG interface at too high a speed for your target. You configure that in the OpenOCD configuration file, with a higher value giving a lower JTAG clock rate.

  2. Since you are apparently getting some JTAG communication you probably have the DBG_E jumper installed, but it may be worth checking.

  3. You are using a really really ancient version of OpenOCD, since it is from more than one year ago.

–Dave

Hello Dave,

Thanks for your quick answer.

I am currently running with the following speed:

jtag_speed 2

Is this supposed to be fast?

I’ve checked and the DBG_E jumper is installed.

What do you recommend for updating openOCD? Should I just download the executable and install it over top my current installation? The Olimex CD automatised that for me so I’m not quite sure.

Alternativelly, do you recommend I switch to another tool chain, like Yagarto?

Thanks!

dshuman:

jeanseb:
Hello,

I just received an LPC-H2148 and an ARM-USB-OCD from Olimex. I ran the install cd and followed the instrutions contained in the HOW_TO_INSTALL.txt file.

When I hit the debug button in eclipse I get the following error message:

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)

Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered

Error: arm7_9_common.c:972 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure

Error: target.c:1054 handle_target(): couldn’t poll target, exiting

No need to say that I cannot debug the program.

Any idea what’s wrong?

Thanks!

  1. Since you are getting communications errors, you may be running the JTAG interface at too high a speed for your target. You configure that in the OpenOCD configuration file, with a higher value giving a lower JTAG clock rate.

  2. Since you are apparently getting some JTAG communication you probably have the DBG_E jumper installed, but it may be worth checking.

  3. You are using a really really ancient version of OpenOCD, since it is from more than one year ago.

–Dave

Hello Dave,

After my last post I did increase the speed number from 2 to 3 (did not update OpenOCD). After a few trial I got to step in the code.

Though after a few seconds I got the following error:

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)

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

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

Info: server.c:367 server_loop(): dropped ‘gdb’ connection

Any idea?

jeanseb:

dshuman:

jeanseb:
Hello,

I just received an LPC-H2148 and an ARM-USB-OCD from Olimex. I ran the install cd and followed the instrutions contained in the HOW_TO_INSTALL.txt file.

When I hit the debug button in eclipse I get the following error message:

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)

Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered

Error: arm7_9_common.c:972 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure

Error: target.c:1054 handle_target(): couldn’t poll target, exiting

No need to say that I cannot debug the program.

Any idea what’s wrong?

Thanks!

  1. Since you are getting communications errors, you may be running the JTAG interface at too high a speed for your target. You configure that in the OpenOCD configuration file, with a higher value giving a lower JTAG clock rate.

  2. Since you are apparently getting some JTAG communication you probably have the DBG_E jumper installed, but it may be worth checking.

  3. You are using a really really ancient version of OpenOCD, since it is from more than one year ago.

–Dave

Hello Dave,

Thanks for your quick answer.

I am currently running with the following speed:

jtag_speed 2

Is this supposed to be fast?

I’ve checked and the DBG_E jumper is installed.

What do you recommend for updating openOCD? Should I just download the executable and install it over top my current installation? The Olimex CD automatised that for me so I’m not quite sure.

Alternativelly, do you recommend I switch to another tool chain, like Yagarto?

Thanks!

A jtag_speed of 2 is relatively fast, but what constitutes too fast is determined by the clock speed of your target. Your JTAG clock speed needs to be 6 times slower than your target clock speed, or you will get errors.

I do not know of any specific problems with the OpenOCD version that you are using, but if you want to get help, it is usually best to be using the same version as most other users.

Since I work from Windows, I use the latest version of OpenOCD that is available on the YAGARTO web site. I do not necessarily use the rest of the tool set there, since I prefer different tools, but the OpenOCD available there is probably the best one to use on Windows.

I had to use jtag_speed = 5, it failed with the default setting (3).