Debugging FX3 with J-Link. CPU not starting

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

cross mob
LeGa_3963206
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi,

I'm trying to debug my FX3 program with J-Link but after download finishes nothing happens. Debugger not didn't stop "main".

At the same time if I try to debug some SDK example program (e.g. UsbUART) it works fine.

Here is J-Link output for my program:

Spoiler

SEGGER J-Link GDB Server V6.96 GUI Version

JLinkARM.dll V6.96 (DLL compiled Feb 19 2021 09:55:51)

-----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: 5000 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: 1000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link EDU Mini V1 compiled Feb 18 2021 11:25:23
Hardware: V1.00
S/N: 801018450
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...

J-Link found 1 JTAG device, Total IRLen = 4
JTAG ID: 0x07926069 (ARM9)
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0xE59FF028)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x00000000)
Received monitor command: regs
PC = 00000000, CPSR = 000000D3 (SVC mode, ARM FIQ dis. IRQ dis.)
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
USR: R8 =00000000, R9 =00000000, R10=00000000, R11 =00000000, R12 =00000000
R13=00000000, R14=00000000
FIQ: R8 =00000000, R9 =00000000, R10=00000000, R11 =00000000, R12 =00000000
R13=00000000, R14=00000000, SPSR=00000010
SVC: R13=00000000, R14=00000000, SPSR=00000010
ABT: R13=00000000, R14=00000000, SPSR=00000010
IRQ: R13=00000000, R14=00000000, SPSR=00000010
UND: R13=00000000, R14=00000000, SPSR=00000010
Reading all registers
Received monitor command: speed auto
Select auto target interface speed (2667 kHz)
Received monitor command: flash breakpoints 0
Flash breakpoints disabled

Downloading 9512 bytes @ address 0x00000100 - Verified OK
Downloading 16272 bytes @ address 0x40003000 - Verified OK
...
Downloading 16272 bytes @ address 0x40006F90 - Verified OK
Downloading 1688 bytes @ address 0x40030000 - Verified OK

Writing register (PC = 0x40014634)
Read 4 bytes @ address 0x40014634 (Data = 0xE59F1034)
Read 4 bytes @ address 0x00000000 (Data = 0xE59FF028)
Received monitor command: memU32 0xE0052000 = 0x00080014
Writing 0x00080014 @ address 0xE0052000
Received monitor command: sleep 1000
Sleep 1000ms
Reading all registers
Starting target CPU...

And debugger windows shows:

LeGa_3963206_0-1614254613564.png

Looks like it really running because I see device is recognized in my windows device manager.

But for some reason in doesn't stop neither at main, nor at any other breakpoint.

I'll greatly appreciate any help here

Things I checked so far:

1) Disabled entering to suspend mode

2) Added CPU frequency change at startup as per KBA229087

 

 

 

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

Hello,

As per my understanding, you are making use of Zegger J-Link for debugging FX3 firmware. Please correct me if my understanding is wrong.  

Please share snapshots of the Main, Debugger and startup tabs of debug configurations for us to review. By default, the execution should break at main() if all the settings are proper. Also, I understood that the execution stopped at main() while debugging SDK examples. Can you please share the J-Link output for any SDK example where debugging worked fine?

Best Regards,
Jayakrishna

View solution in original post

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

Hello,

As per my understanding, you are making use of Zegger J-Link for debugging FX3 firmware. Please correct me if my understanding is wrong.  

Please share snapshots of the Main, Debugger and startup tabs of debug configurations for us to review. By default, the execution should break at main() if all the settings are proper. Also, I understood that the execution stopped at main() while debugging SDK examples. Can you please share the J-Link output for any SDK example where debugging worked fine?

Best Regards,
Jayakrishna
0 Likes