S32K148 JLINK debug error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K148 JLINK debug error

4,162 Views
YiWang
Contributor I

Until yesterday, I was able to debug flash by Jlink using S32DS, but today I can’t flash using a new program.

In the S32DS, “Break at address” 0xdeadbeee “with no debug information available, or outside of program code.” Is displayed, and when I open Diassembly, I get a lot of error messages.

How can I use S32DS to debug flash in S32K148 via JLINK again?

 

The console imformation is shown as follows:

Command line: -if swd -device S32K148 -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: S32K148
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled May 7 2021 16:26:12
Hardware: V9.60
S/N: 69668228
Feature(s): RDI, GDB, FlashDL, FlashBP, JFlash
Checking target voltage...
Target voltage: 3.01 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x00000000 (Data = 0xFFFF)
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 = 0xFFFFFFFE)
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= FFFFFFFC, MSP= FFFFFFFC, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = FFFFFFFE
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Received monitor command: speed auto
Select auto target interface speed (2000 kHz)
Received monitor command: flash breakpoints 1
Flash breakpoints enabled
Received monitor command: semihosting enable
Semi-hosting enabled (Handle on BKPT)
Received monitor command: semihosting IOClient 1
Semihosting I/O set to TELNET Client
Received monitor command: SWO DisableTarget 0xFFFFFFFF
SWO disabled successfully.
Received monitor command: SWO EnableTarget 0 0 0x1 0
Failed to enable SWO. Could not measure target CPU frequency.
Read 4 bytes @ address 0xFFFFFFFE (Data = 0x00000000)
Read 2 bytes @ address 0xFFFFFFFE (Data = 0x0000)
Downloading 1024 bytes @ address 0x00000000 - Verified OK
Downloading 16 bytes @ address 0x00000400 - Verified OK
Downloading 10548 bytes @ address 0x00000410 - Verified OK
Downloading 680 bytes @ address 0x00002D44 - Verified OK
WARNING: CPU could not be halted
ERROR: Failed to download RAMCode.
Failed to prepare for programming.
Failed to download RAMCode!
Can not read register 16 (XPSR) while CPU is running
Can not read register 20 (CFBP) while CPU is running
Can not read register 0 (R0) while CPU is running
Can not read register 1 (R1) while CPU is running
Can not read register 2 (R2) while CPU is running
Can not read register 3 (R3) while CPU is running
Can not read register 4 (R4) while CPU is running
Can not read register 5 (R5) while CPU is running
Can not read register 6 (R6) while CPU is running
Can not read register 7 (R7) while CPU is running
Can not read register 8 (R8) while CPU is running
Can not read register 9 (R9) while CPU is running
Can not read register 10 (R10) while CPU is running
Can not read register 11 (R11) while CPU is running
Can not read register 12 (R12) while CPU is running
Can not read register 14 (R14) while CPU is running
Can not read register 15 (R15) while CPU is running
Can not read register 17 (MSP) while CPU is running
Can not read r
Writing register (PC = 0x 410)
Read 4 bytes @ address 0x00000410 (Data = 0x00000000)
Read 2 bytes @ address 0x00000410 (Data = 0x0000)
Read 2 bytes @ address 0x00002A6C (Data = 0x0000)
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0xFFFFFFFE)
Read 4 bytes @ address 0x0000CC00 (Data = 0xFFFFFFFF)
Writing register (SP = 0xffffffff)
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
WARNING: Failed to read memory @ address 0xFFFFFFFE
Read 4 bytes @ address 0x0000CC04 (Data = 0xFFFFFFFF)
Writing register (PC = 0xffffffff)
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Downloading 4 bytes @ address 0xE000ED08 - Verified OK
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Read 2 bytes @ address 0x00002A6C (Data = 0x0000)
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= FFFFFFFF, MSP= FFFFFFFF, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = FFFFFFFE
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Setting breakpoint @ address 0x00002A6C, Size = 2, BPHandle = 0x0001
Starting target CPU...

0 Kudos
Reply
3 Replies

4,118 Views
JRoberto
NXP TechSupport
NXP TechSupport

Hi @YiWang 

Do you have another compatible debugger you can use to try to flash again? I want to discard a broken connection.

Best Regards!

0 Kudos
Reply

4,114 Views
YiWang
Contributor I

HI  JRoberto

I have tried several debuggers,however, I cannot debug flash. All of them show same result.

“Break at address” 0xdeadbeee “with no debug information available, or outside of program code.” 

I doubt that maybe the program in flash causes immediate Hardfault, which prevents the JLink from communicating properly. 

0 Kudos
Reply

4,097 Views
JRoberto
NXP TechSupport
NXP TechSupport

we can check the signal behavior from the pin "RESET_b".

Do you have a way to capture it? 

0 Kudos
Reply