C40_Ip Flash Drive example DEBUG

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

C40_Ip Flash Drive example DEBUG

4,885 次查看
karmegancjk
Contributor III

Hi,

1. I am working on the C40_Ip example driver. When I go to debug, it does not enter debug mode.

Hardware: S32K344 (MR-CANHUBK344)

IDE : S32DS 3.5.14

Debug TOOL: J-link (Hardware v9.0)

RTD Version: S32K3_RTD_4_0_0_D2311

Here I attached the screenshots of the console output while debugging the C40_Ip example

0 项奖励
回复
3 回复数

4,846 次查看
IsaulO
NXP Employee
NXP Employee

Hi @karmegancjk @,

Please verify that the configurations and paths of the executables are correct. You can refer the following link for guidance:
S32 Design Studio for S32 Platform V3.4/V3.5 + SEGGER J-LINK Plus

Additionally, this issue could be related to the host PC, have you tried changing the port number?
You can check if any other application is using gdb server's port. To do this you can run the following command in the Windows command line: netstat -ano

Let me know if this helps or if you need further assistance.

 

BR,
IsaulO.

0 项奖励
回复

4,829 次查看
karmegancjk
Contributor III

Hi,

Thanks for the update. I have verified that the debugger configurations and paths of the executables are correct.

1. The GDB server upgrade and configured the setting   as per the following link(https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/S32-Design-Studio-for-S32-Platform-V3-...)however i am getting errors ,

those errors are 

                "Failed to open listener port 2331",

                "J-link GDB server failed "

2.is there any points to consider while working on Flash memory  for Flash driver development

3. while entering debug  system stay in only  "Starting target CPU"  debugger not move on the next step. 

SEGGER J-Link GDB Server V7.96l Command Line Version

JLinkARM.dll V7.96l (DLL compiled Jun 12 2024 18:55:26)

Command line: -if jtag -device S32K344 -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
-----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: S32K344
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 V9 compiled Dec 13 2022 11:14:50
Hardware: V9.70
S/N: 69744905
Feature(s): RDI, GDB, FlashDL, FlashBP, JFlash
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 = 8
JTAG ID: 0x0996001D (Cortex-M7)
Initializing CPU registers...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
GDB client (conn. 820) requested target.xml from GDB Server
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x00000000
Read register 'r1' (4 bytes) from hardware: 0x00000000
Read register 'r2' (4 bytes) from hardware: 0x00000000
Read register 'r3' (4 bytes) from hardware: 0x00000000
Read register 'r4' (4 bytes) from hardware: 0x00000000
Read register 'r5' (4 bytes) from hardware: 0x00000000
Read register 'r6' (4 bytes) from hardware: 0x00000000
Read register 'r7' (4 bytes) from hardware: 0x00000000
Read register 'r8' (4 bytes) from hardware: 0x00000000
Read register 'r9' (4 bytes) from hardware: 0x00000000
Read register 'r10' (4 bytes) from hardware: 0x00000000
Read register 'r11' (4 bytes) from hardware: 0x00000000
Read register 'r12' (4 bytes) from hardware: 0x00000000
Read register 'sp' (4 bytes) from hardware: 0x00000000
Read register 'lr' (4 bytes) from hardware: 0x00000000
Read register 'pc' (4 bytes) from hardware: 0x00000000
Read register 'xpsr' (4 bytes) from hardware: 0x00000001
Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
Read 2 bytes @ address 0x00000000 (Data = 0x0000)
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 = 0x00402420)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 20020000, MSP= 20020000, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = 00402420
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Security extension regs:
MSP_S = 00000000, MSPLIM_S = 00000000
PSP_S = 00000000, PSPLIM_S = 00000000
MSP_NS = 20020000, MSPLIM_NS = 00000000
PSP_NS = 00000000, PSPLIM_NS = 00000000
CONTROL_S 00, FAULTMASK_S 00, BASEPRI_S 00, PRIMASK_S 00
CONTROL_NS 00, FAULTMASK_NS 00, BASEPRI_NS 00, PRIMASK_NS 00

Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x00000000
Read register 'r1' (4 bytes) from hardware: 0x00000000
Read register 'r2' (4 bytes) from hardware: 0x00000000
Read register 'r3' (4 bytes) from hardware: 0x00000000
Read register 'r4' (4 bytes) from hardware: 0x00000000
Read register 'r5' (4 bytes) from hardware: 0x00000000
Read register 'r6' (4 bytes) from hardware: 0x00000000
Read register 'r7' (4 bytes) from hardware: 0x00000000
Read register 'r8' (4 bytes) from hardware: 0x00000000
Read register 'r9' (4 bytes) from hardware: 0x00000000
Read register 'r10' (4 bytes) from hardware: 0x00000000
Read register 'r11' (4 bytes) from hardware: 0x00000000
Read register 'r12' (4 bytes) from hardware: 0x00000000
Read register 'sp' (4 bytes) from hardware: 0x00000220
Read register 'lr' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'pc' (4 bytes) from hardware: 0x20244000
Read register 'xpsr' (4 bytes) from hardware: 0x00000001
Received monitor command: speed auto
Select auto target interface speed (4000 kHz)
Received monitor command: flash breakpoints 1
Flash breakpoints enabled
Received monitor command: semihosting enable
Semi-hosting enabled (Handle on breakpoint instruction hit)
Received monitor command: semihosting IOClient 1
Semihosting I/O set to TELNET Client
Read 4 bytes @ address 0x00402420 (Data = 0xF04FB672)
Read 2 bytes @ address 0x00402420 (Data = 0xB672)
Downloading 16272 bytes @ address 0x00400000 - Verified OK
Downloading 16224 bytes @ address 0x00403F90 - Verified OK
Downloading 4316 bytes @ address 0x00407EF0 - Verified OK
Downloading 164 bytes @ address 0x00408FCC - Verified OK
Downloading 4 bytes @ address 0x00409070 - Verified OK
Received monitor command: clrbp
Received monitor command: reset
Comparing flash [....................] Done.
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x00402420)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 20020000, MSP= 20020000, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = 00402420
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Security extension regs:
MSP_S = 00000000, MSPLIM_S = 00000000
PSP_S = 00000000, PSPLIM_S = 00000000
MSP_NS = 20020000, MSPLIM_NS = 00000000
PSP_NS = 00000000, PSPLIM_NS = 00000000
CONTROL_S 00, FAULTMASK_S 00, BASEPRI_S 00, PRIMASK_S 00
CONTROL_NS 00, FAULTMASK_NS 00, BASEPRI_NS 00, PRIMASK_NS 00

Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x00000000
Read register 'r1' (4 bytes) from hardware: 0x00000000
Read register 'r2' (4 bytes) from hardware: 0x00000000
Read register 'r3' (4 bytes) from hardware: 0x00000000
Read register 'r4' (4 bytes) from hardware: 0x00000000
Read register 'r5' (4 bytes) from hardware: 0x00000000
Read register 'r6' (4 bytes) from hardware: 0x00000000
Read register 'r7' (4 bytes) from hardware: 0x00000000
Read register 'r8' (4 bytes) from hardware: 0x00000000
Read register 'r9' (4 bytes) from hardware: 0x00000000
Read register 'r10' (4 bytes) from hardware: 0x00000000
Read register 'r11' (4 bytes) from hardware: 0x00000000
Read register 'r12' (4 bytes) from hardware: 0x00000000
Read register 'sp' (4 bytes) from hardware: 0x00000220
Read register 'lr' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'pc' (4 bytes) from hardware: 0x20244000
Read register 'xpsr' (4 bytes) from hardware: 0x00000001
Starting target CPU...

here i attached the screenshots for your reference ,how to solve this issue.

标记 (1)
0 项奖励
回复

4,654 次查看
IsaulO
NXP Employee
NXP Employee

Hi @karmegancjk ,

1.Theses error are related to each other, if you have another active debugging session on S32DS or the J-Link GDB Server application open, the system throws these errors, please verify that the port number (2331) is not already used, if so, you can change it, terminate the session in S32DS or kill the process number in the Windows Command line.

IsaulO_1-1739304046511.png

IsaulO_2-1739304055613.png

2.No special considerations are required for these RTD Example Projects, you should be able to work with these examples without problems.

3.Have you encountered this issue with another RTD example? we can't replicate the issue, but it could be related with the startup in 0x00402420.

BR.

0 项奖励
回复