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

cross mob
cx3develop
Level 2
Level 2
25 sign-ins First like given 5 questions asked

Hello,

 

I have been trying to debug cx3 application by using j-link, but i  face a problem as below.

i already checked Debug Configurations refer to EzUsbSute_UG.pdf

i need a idea to solve it.

 

cx3develop_0-1664430410653.png

cx3develop_2-1664430502708.png

 

 

 

SEGGER J-Link GDB Server V7.80c Command Line Version

JLinkARM.dll V7.80c (DLL compiled Sep 27 2022 16:01:16)

Command line: -if jtag -device ARM9 -endian little -speed 1000 -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 device parameters: none
Target interface: JTAG
Target interface speed: 1000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Pro V4 compiled Sep 22 2022 15:00:37
Hardware: V4.00
S/N: 174300553
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 1.86 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 = 0x78ADE3C3)
Read 4 bytes @ address 0x00000000 (Data = 0x78ADE3C3)
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 (8000 kHz)
Received monitor command: flash breakpoints 0
Flash breakpoints disabled
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Downloading 8992 bytes @ address 0x00000100ERROR: Read memory error @ address 0x00000100, word access: Memory access timeout.
- Verify failed
Downloading 16224 bytes @ address 0x40003000 - Verify failed
Downloading 6988 bytes @ address 0x40006F60 - Verify failed
Downloading 12 bytes @ address 0x40008AAC - Verify failed
Downloading 12 bytes @ address 0x40008AB8 - Verify failed
            ... skip
Downloading 148 bytes @ address 0x400252AC - Verify failed
Downloading 208 bytes @ address 0x40025340 - Verify failed
Downloading 208 bytes @ address 0x40025410 - Verify failed
Downloading 628 bytes @ address 0x400254E0 - Verify failed
Downloading 232 bytes @ address 0x40025754 - Verify failed
Downloading 1632 bytes @ address 0x40030000 - Verify failed
Writing register (PC = 0x40010f2c)
WARNING: Failed to read memory @ address 0x40010F2C
Reading 64 bytes @ address 0x40005C80
WARNING: Failed to read memory @ address 0x40005C80
WARNING: Failed to read memory @ address 0x40005C90
Reading 64 bytes @ address 0x40005C80
WARNING: Failed to read memory @ address 0x40005C80
WARNING: Failed to read memory @ address 0x40005C90
WARNING: Failed to read memory @ address 0x40005C84
Received monitor command: memU32 0xE0052000 = 0x00080015
Writing 0x00080015 @ address 0xE0052000
Setting breakpoint @ address 0x40005C84, Size = 4, BPHandle = 0x0000
WARNING: No more breakpoint resources left
ERROR: Failed to set breakpoint at 0x40005C84

0 Likes
1 Solution
cx3develop
Level 2
Level 2
25 sign-ins First like given 5 questions asked

Hi,

I have solved the problem, so I share the solution.

Initially, the data at 0x0 address was well read as 0x78ADE1C3, but for some reason it was set to 8000 kHz,
After that, all data read/program was found to be not normal.

The time point at which it changed to 8000 kHz seemed to be the initial reset and halt operation.
So, when I set the IDE Debug Configuration as below, it was successfully debugged.

- unchecked 'Initial Reset and Halt' 

cx3develop_0-1664868949449.png

Thank you

View solution in original post

0 Likes
5 Replies
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

The settings for JLINK GDB Debugging on the Eclipse IDE seem fine.

Could you let us know if the CX3 Denebola kit is used or a custom board? If it is a custom board, could you share the schematics with us?

What version of Jlink adapter is being used?
Also I see that the target voltage is shown as 1.86V. Is it possible to set the target voltage to 3.3V and check if the issue is seen?

Best Regards,
AliAsgar

0 Likes

Hi,

Thank you for reply. 

I use our custom board. and JTAG interface is connected by hand jumper. Because we cannot put a connector for jtag on the board because of small space.

 

I have connected these pins to jtag interface.

cx3develop_0-1664493154931.png

USB_1V8_1 -> VTref (1)
USB_TCK1 -> TCK (9)
USB_TMS1 -> TMS (7)
USB_TRST#1 -> nTRST (3)
USB_TDO1 -> TDO (13)
USB_TDI1 -> TDI (5)
GND1 -> RTCK (11), GND (4,6,8, 10,12,14,16,18, 20)
RESET# -> RESET (15)

 

Jlink adapter version is 4.3, i think it is very old. and my CX3 on the board uses 1.8V.

Thank you in advance.

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

It is not recommended to add an external pull up to the JTAG lines of CX3. The lines are internally pulled up. Could you try removing the external pull ups and check if the issue is seen?

Best Regards,
AliAsgar

0 Likes

Hi, AliAsgar

 

I tried to remove these external pull up (UR4 ~ UR8) but the issue is seen still. 

 

SEGGER J-Link GDB Server V7.80c Command Line Version

JLinkARM.dll V7.80c (DLL compiled Sep 27 2022 16:01:16)

Command line: -if jtag -device ARM9 -endian little -speed 1000 -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 device parameters: none
Target interface: JTAG
Target interface speed: 1000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Pro V4 compiled Sep 22 2022 15:00:37
Hardware: V4.00
S/N: 174300553
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 1.95 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 = 0x78ADE1C3)
Read 4 bytes @ address 0x00000000 (Data = 0x78ADE1C3)
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 (8000 kHz)
Received monitor command: flash breakpoints 0
Flash breakpoints disabled
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Downloading 8992 bytes @ address 0x00000100ERROR: Read memory error @ address 0x00000100, word access: Memory access timeout.
- Verify failed
Downloading 16224 bytes @ address 0x40003000 - Verify failed
Downloading 6420 bytes @ address 0x40006F60 - Verify failed
Downloading 12 bytes @ address 0x40008874 - Verify failed
Downloading 12 bytes @ address 0x40008880 - Verify failed

Skip...

 

Thank you in advance

0 Likes
cx3develop
Level 2
Level 2
25 sign-ins First like given 5 questions asked

Hi,

I have solved the problem, so I share the solution.

Initially, the data at 0x0 address was well read as 0x78ADE1C3, but for some reason it was set to 8000 kHz,
After that, all data read/program was found to be not normal.

The time point at which it changed to 8000 kHz seemed to be the initial reset and halt operation.
So, when I set the IDE Debug Configuration as below, it was successfully debugged.

- unchecked 'Initial Reset and Halt' 

cx3develop_0-1664868949449.png

Thank you

0 Likes