Announcements

Learn how to optimise USB-C for your designs at 18 May's USB-C PD Webinar.
Click here to register.

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

lock attach
Attachments are accessible only for community members.
evarady
Level 1
Level 1
First reply posted First question asked Welcome!

I'm trying to debug firmware written for a board with a CYUSB3035 FX3 IC using openOCD and a Digilent HS2 JTAG adapter. Because the bundled config is written for an older version of openOCD and a different interface, I have modified the config accordingly. I make sure the device is in bootloader mode, but when I run `openocd -f <my.cfg> -c init`I encounter errors. It's a custom board, but the hardware seems alright since I've gotten the bulk loop example and several others to work on the board.

The modified config file is as follows (I have attached a zipped copy)

#
# OpenOCD configuration file for Cypress FX3 (ARM926EJ-S).
#
# FX3 has a standard ARM JTAG TAP and can work with a standard ARM926EJ-S configuration.
#
# The interface selected below is the CY7C65215 based JTAG debug probe. If another
# debug probe is being used, just replace the "interface cy7c65215" line with the
# appropriate interface name.
#

gdb_port 3333

adapter driver ftdi
ftdi_device_desc "Digilent USB Device"
ftdi_vid_pid 0x0403 0x6014

ftdi_channel 0
ftdi_layout_init 0x00e8 0x60eb

reset_config none

transport select jtag

######################################
# Target:    CYPRESS FX3 ARM926EJ-S
######################################

if { [info exists CHIPNAME] } {
	set _CHIPNAME $CHIPNAME
} else {
	set  _CHIPNAME fx3
}

if { [info exists ENDIAN] } {
	set _ENDIAN $ENDIAN
} else {
	set _ENDIAN little
}

if { [info exists CPUTAPID] } {
	set _CPUTAPID $CPUTAPID
} else {
	set _CPUTAPID 0x07926069
}


#delays on reset lines
adapter srst delay 200
jtag_ntrst_delay 200

adapter speed 1000

reset_config trst_and_srst srst_pulls_trst

jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

jtag_rclk 3

######################
# Target configuration
######################

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME 

adapter speed 1000

 

Is there an error in the way I've connected to or configured the hardware, or is there some mistake or omission in my configuration?

If I ground TSRST I get the following errors, and if I attempt to attach gdb I get further errors

 

Open On-Chip Debugger 0.11.0+dev-00103-gff755a575-dirty (2021-04-20-10:11)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
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 15
Error: unknown EmbeddedICE version (comms ctrl: 0xffffffff)
Info : fx3.cpu: hardware has 2 breakpoint/watchpoint units
Warn : WARNING: unknown debug reason: 0xf
Warn : ThumbEE -- incomplete support
Info : starting gdb server for fx3.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: Couldn't calculate PC of next instruction, current opcode was 0x00000000

 

If I leave it pulled up I get repeated errors till I try to attach a debugger and then it complains about not being halted. If I load a program into memory and try to enter commands into gdb I get further errors about the CPU not being halted. it seems similar to this question . Any help you could provide would be much appreciated

Error: unknown EmbeddedICE version (comms ctrl: 0x00400000)
Info : fx3.cpu: hardware has 2 breakpoint/watchpoint units
Info : accepting 'gdb' connection on tcp/3333
Error: timed out while waiting for target halted
Error executing event gdb-attach on target fx3.cpu:

Warn : GDB connection 1 on target fx3.cpu 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 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 not halted
Warn : target not halted
Info : Halt timed out, wake up GDB.
Warn : target not halted
Warn : target not halted
Info : target fx3.cpu was not halted when step was requested

 

3 Replies
Meghavi
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 10 likes received

Hi,

Kindly confirm if you have followed all the steps from section 3.2 of EZ-USB Suite User Guide.

Can you please try to test the firmware in the FX3 SDK and check if it works? 

Also, please let us know which firmware are you using to debug.

Regards

0 Likes
lock attach
Attachments are accessible only for community members.

Thanks for your quick reply. I went through the instructions in the EZ-USB Suite User Guide. I am not very experienced in using eclipse, but I do not think it is working, I have attached a screenshot.

I have tested the bulkloop firmware, and the FX3MassStorage demo, both work.

I am specifically trying to debug the FX3MassStorage demo

I have also tried grounding the TSRST pin, but this doesn't help

0 Likes
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

Please let us know if you are using FX3 SDK version 1.3.4 for developing and debugging firmware for FX3. If not, then please download FX3 SDK 1.3.4 and let us know if you are still facing the same issue.

If you are using SDK 1.3.4 itself, then please try the following:

1. Try debugging the firmware on a different OS (Windows) to check if the issue is only on Linux PC.

2. Share snapshots of all the tabs of debug configurations for us to review.

Best Regards,
Jayakrishna
0 Likes