Debug / run with CX3

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

cross mob
MaSt_4567191
Level 4
Level 4
10 likes given 5 likes given First like received

I cannot make JTAG debug working for CX3, though I followed the instrinctions reported in the EZUSB user guide. t looks like that EZUSB can communicate with the segger but cannot make the CX3 ANR9 entering into debug mode

SEGGER J-Link GDB Server V6.56c Command Line Version

JLinkARM.dll V6.56c (DLL compiled Dec 11 2019 17:57:56)

Command line: -if jtag -device ARM9 -endian little -speed 4 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -s

-----GDB Server start settings-----

GDBInit file:                  none

GDB Server Listening port:     2331

SWO raw output listening port: 2332

Terminal I/O port:             2333

Accept remote connection:      localhost only

Generate logfile:              off

Verify download:               on

Init regs on start:            on

Silent mode:                   off

Single run mode:               on

Target connection timeout:     0 ms

------J-Link related settings------

J-Link Host interface:         USB

J-Link script:                 none

J-Link settings file:          none

------Target related settings------

Target device:                 ARM9

Target interface:              JTAG

Target interface speed:        4kHz

Target endian:                 little

Connecting to J-Link...

J-Link is connected.

Firmware: J-Link V10 compiled Dec 11 2019 17:11:27

Hardware: V10.10

S/N: 260108561

OEM: SEGGER-EDU

Feature(s): FlashBP, GDB

Checking target voltage...

Connecting to target failed. Connected correctly?

GDB Server will be closed...

Shutting down...

Could not connect to target.

Please check power, connection and settings.

This should drive to wrong connections from the J'Link probe to the hw but I checked this (the customer board is a replica of the econ danebola board and the JTAG lines go straight from/to the CX3 MCU. Any Idea on what may be wrong?

I have a question which is more related to eclipse: the default behavior of the run / Debug button is 'Debug Local C/C++ application' which results in errors (the elf file is considered as a windows application )

How can I change this behaviour? I deleted the C/C++ app from 'Debug as' list, but this did not help

Thanks much

0 Likes
1 Solution

Hello,

From the debug configurations, i can see that you are setting the  Initial Speed and JTAG/SWD Speed to 4KHz.

Please keep Initial Speed as Fixed at 1000KHz and JTAG/SWD speed at Auto.

Also, if you scroll down on the Startup tab, there is an option Pre-run reset and halt ; Please Uncheck this box before starting the debug.

Please follow section 3.1 of EzUsbSuiteUserGuide.pdf found in the path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware\EzUsbSuite_UG.pdf

The document mentions the correct debug configuration that needs to be followed.

Regards,
Yashwant

View solution in original post

0 Likes
11 Replies
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hello,

Could not connect to target.

Please check power, connection and settings.

->> This error occurs when there is an issue with the JTAG block of CX3 being powered wrongly or insufficiently.


Could you please share the customer board schematics?

Also, it is not recommended to use the "Local C/C++ application" option in eclipse to debug the CX3.

Please follow the method specified in EZUsb User Guide provided in the SDK to debug using Segger J-Link.


Also, if possible please share the debug configurations that you are doing when using Segger with CX3.


Regards,
Yashwant

0 Likes

Hello Yashwant

thank you for your quick reply. The JTAG I/F goes straight to the CX3

Here is the schematics Dropbox - BT406504_B1.pdf - Simplify your life

Here they are the degig info screenshosts (all five tabs, for sake of completeness

Dropbox - dbgconf1.PNG - Simplify your life

Dropbox - dbgconf2.PNG - Simplify your life

Dropbox - dbgconf3.PNG - Simplify your life

Dropbox - dbgconf4.PNG - Simplify your life

Dropbox - dbgconf5.PNG - Simplify your life

Today we'll continue investigating the isse. I'll keep you posted

Have a nice day

0 Likes

Hello,

From the debug configurations, i can see that you are setting the  Initial Speed and JTAG/SWD Speed to 4KHz.

Please keep Initial Speed as Fixed at 1000KHz and JTAG/SWD speed at Auto.

Also, if you scroll down on the Startup tab, there is an option Pre-run reset and halt ; Please Uncheck this box before starting the debug.

Please follow section 3.1 of EzUsbSuiteUserGuide.pdf found in the path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware\EzUsbSuite_UG.pdf

The document mentions the correct debug configuration that needs to be followed.

Regards,
Yashwant

0 Likes

About the rror I'll better explain: after setting up debug configuration with segger, I strat Run -> Debug and I get this

Dropbox - debugErr.PNG - Simplify your life

I suspect the EZSuite is trying to execetue the elf file as a W10 application which is obviously wrong

My question is how to drive eclipse to debug using the JLink debug conf

Thanks

0 Likes

some more news

- good: the MCU is alive and well; I can transmit over 2C using the I2CWrite funcion

- bad: I am using OpenOCD and Olimex JTAG, same outcome tyhan Segger

I probed with a scope the outputs of both JLing and Olimex and I cannot see any activity on nTSTS, TCK, TMS etc. which looks an issue in communication between the PC and the Segger /Olimex debuggers

0 Likes

I found this discussion in the segger forum

https://forum.segger.com/index.php/Thread/3860-ABANDONED-Jlink-pro-CX3-debugger-problems/?postID=136...

does the EZUSB example application put the system in some strange mode like asked by segger-niklas?

0 Likes

Hello,


Please refer to the following link which explains about the error that you have shared with us: Re: DeneBola (CX3) with J-Link for debugging

Regards,

Yashwant

0 Likes

Thanks much

I followed the link, interesting

I see that semihosting is enabled as well as SWO debug in the reported pictures. This conflicts with the documentation about EZUSB debugging (the 926EJS only supports ICE JTAG)

0 Likes

Hi,

I shared that link only for you to refer the piece of code that can be added to solve the issue you have with the error code.

Please just add the code snippet in the Startup Tab while following the EzUsbSuite_UG.pdf strictly.

pastedImage_0.png

Please don't bother about the other settings as prescribed in the link about the Semihosting and SWD and they should be left disabled.

Regards,

Yashwant

Thanks

can you elaborate what does it means writing 0x00080015 @0xe00052000? I will reverse engineer the example code

0 Likes

Hello,

So, the above string that you are mentioning refers to writing a value to the registers at run time when there is a modification in the code at run time or any variable is updated.


So, writing 0x00080015 @0xe00052000 would mean that the value 0x00080015 is being written at the location 0xe00052000 because of a modification to the code that you might have done while using the debugger.


Regards,

Yashwant

0 Likes