Can't start debugger (Error: can't add breakpoint: target running)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RoFl_4496141
Level 1
Level 1
First like given

I'm trying to do the bring-up for our board and I'm afraid I'm stumped.

I can see the board in the Control Center and I can attempt to load a program to RAM, but then it fails to enumerate again. So I tried to debug the code.

I'm having pretty much the same symptons as this old post:

[FX3 Debug] Error: can't add breakpoint: target running

... but I can't move forward.

Here's my console dump:

Open On-Chip Debugger 0.8.0 (2014-12-03-15:43)

Licensed under GNU GPL v2

For bug reports, read

    http://openocd.sourceforge.net/doc/doxygen/bugs.html

Warn : Adapter driver 'cy7c65215' did not declare which transports it allows; assuming legacy JTAG-only

Info : only one transport option; autoselect 'jtag'

adapter_nsrst_delay: 200

jtag_ntrst_delay: 200

adapter speed: 1000 kHz

trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst

RCLK - adaptive

adapter speed: 1000 kHz

Info : clock speed 1000 kHz

Error: JTAG scan chain interrogation failed: all ones

Error: Check JTAG interface, timings, target power, etc.

Error: Trying to use configured scan chain anyway...

Error: fx3.cpu: IR capture error; saw 0x0f not 0x01

Warn : Bypassing JTAG setup events due to errors

Info : Embedded ICE version 0

Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)

Info : fx3.cpu: hardware has 2 breakpoint/watchpoint units

Info : accepting 'gdb' connection from 3333

undefined debug reason 7 - target needs reset

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Error: Target not halted

Warn : target not halted

Error: JTAG scan chain interrogation failed: all ones

Error: Check JTAG interface, timings, target power, etc.

Error: Trying to use configured scan chain anyway...

Error: fx3.cpu: IR capture error; saw 0x0f not 0x01

Warn : Bypassing JTAG setup events due to errors

Warn : srst pulls trst - can not reset into halted mode. Issuing halt after reset.

Error: timed out while waiting for target halted

TARGET: fx3.cpu - Not halted

in procedure 'reset'

Info : Halt timed out, wake up GDB.

Error: timed out while waiting for target halted

in procedure 'halt'

Warn : target not halted

Warn : target not halted

Warn : target not halted

Warn : target not halted

Warn : target not halted

Warn : target not halted

Warn : target not halted

Warn : target not halted

Warn : target fx3.cpu is not halted

Error: can't add breakpoint: target running

Info : dropped 'gdb' connection

But I can't debug, execution doesn't stop at main, arm-none-eabi-gdb is terminated (exit value 0) as does openocd.exe (exit value 1). We have an on board CY7C65215-32LTXIT and it's both wired and programmed exactly as the one in the Explorer Board. Still, I can't debug (but I have no problems whatsoever in the Explorer Board).

Since I also have the "target not halted" I checked the schematic and even measured connectivity for TRST and everything seems to be sound. I don't have an oscilloscope at hand*, so I wanted to see if there's something else I could test.

Any ideas?

Even if it's just a JTAG problem, I'm still at a loss as to why it wouldn't enumerate. I made a small app that does nothing beyond basic clock config and RTOS start, and it still doesn't enumerate.

* As I write this, I'm suspecting the error on "Error: JTAG scan chain interrogation failed: all ones".

0 Likes
3 Replies
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hi,

Since you're using a custmized board similar to CYUSBKIT-003, could you test with firmware in the SDK in order to rule out the hardware issue?

If the JTAG debugging still cannot work, alternatively you can try to use uartprint to debug.


Regards,
Eddie

You know... I'd been assuming that if it didn't enumerate something "bigger" had to be wrong. But I did manage to set up uartprint and it's working... now I have a way to move forward.

I can solve the JTAG more calmly. And maybe uartprint gives some insight as to what's wrong with JTAG.

Very much appreciated!

0 Likes
RoFl_4496141
Level 1
Level 1
First like given

An update:

I managed to get UartPrint working (quite easily, in fact) and was able to move forward.

I still can't debug (as in step-by-step, breakpoints, etc) using JTAG though. Granted, I haven't looked too deep.
0 Likes