Segger J-Link not flashing during debugging - S32 DS 2018 R1

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

Segger J-Link not flashing during debugging - S32 DS 2018 R1

1,986 Views
andyknitt
Contributor II

I'm using S32 Design Studio for ARM 2018 R1 on Windows with a Segger J-Link for debugging.  This had been working fine until I installed the latest J-Link software pack (7.66d for Windows 64 bit) so that I could use J-Flash independently of S32 DS.

How when I attempt to debug, it will work if I have previously flashed the S32K142 with my debug application using J-Flash (outside of S32 DS).  However, S32 DS won't flash the part.  The J-Flash popup that I've gotten when I start a debug session in the past no longer appears.  

Console output is listed below.  Any advice on how to get flashing working again within S32 DS would be appreciated.

Thanks,

Andy

SEGGER J-Link GDB Server V7.66d Command Line Version

JLinkARM.dll V7.66d (DLL compiled Jun 21 2022 17:07:24)

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

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link EDU Mini V1 compiled Jun 21 2022 09:53:53
Hardware: V1.00
S/N: 801014865
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.30 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)
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

Security extension regs:
MSP_S  = 00000000, MSPLIM_S  = 00000000
PSP_S  = 00000000, PSPLIM_S  = 00000000
MSP_NS = FFFFFFFC, 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 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.
WARNING: Failed to read memory @ address 0xFFFFFFFE
Downloading 1024 bytes @ address 0x00000000 - Verified OK
Downloading 16 bytes @ address 0x00000400 - Verified OK
Downloading 4096 bytes @ address 0x00000410 - Verified OK
Downloading 4096 bytes @ address 0x00001410 - Verified OK
Downloading 4096 bytes @ address 0x00002410 - Verified OK
Downloading 4096 bytes @ address 0x00003410 - Verified OK
Downloading 4096 bytes @ address 0x00004410 - Verified OK
Downloading 4096 bytes @ address 0x00005410 - Verified OK
Downloading 4096 bytes @ address 0x00006410 - Verified OK
Downloading 4096 bytes @ address 0x00007410 - Verified OK
Downloading 4096 bytes @ address 0x00008410 - Verified OK
Downloading 3084 bytes @ address 0x00009410 - Verified OK
Downloading 8 bytes @ address 0x0000A01C - Verified OK
Downloading 2588 bytes @ address 0x0000A024 - Verified OK
ERROR: Failed to prepare for programming.
Could not preserve target memory.
Cannot read register 16 (XPSR) while CPU is running
Cannot read register 20 (CFBP) while CPU is running
Cannot read register 0 (R0) while CPU is running
Cannot read register 1 (R1) while CPU is running
Cannot read register 2 (R2) while CPU is running
Cannot read register 3 (R3) while CPU is running
Cannot read register 4 (R4) while CPU is running
Cannot read register 5 (R5) while CPU is running
Cannot read register 6 (R6) while CPU is running
Cannot read register 7 (R7) while CPU is running
Cannot read register 8 (R8) while CPU is running
Cannot read register 9 (R9) while CPU is running
Cannot read register 10 (R10) while CPU is running
Cannot read register 11 (R11) while CPU is running
Cannot read register 12 (R12) while CPU is running
Cannot read register 14 (R14) while CPU is running
Cannot read register 15 (R15) while CPU is running
Cannot read register 17 (MSP) while CPU is running
Cannot read register 18 (PSP) while CPU is running
Writing register (PC = 0x     410)
Read 4 bytes @ address 0x00000410 (Data = 0x00000000)
Read 2 bytes @ address 0x00003448 (Data = 0x0000)
Read 2 bytes @ address 0x00003448 (Data = 0x0000)
Reading 64 bytes @ address 0x00000000
WARNING: Failed to read memory @ address 0x00000000
Read 2 bytes @ address 0x00000000 (Data = 0x0000)
Reading 64 bytes @ address 0x00000000
WARNING: Failed to read memory @ address 0x00000000
WARNING: Failed to read memory @ address 0x00000000
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0xFFFFFFFE)
Read 2 bytes @ address 0x00003448 (Data = 0xFFFF)
Read 2 bytes @ address 0x00003448 (Data = 0xFFFF)
Read 2 bytes @ address 0x00003448 (Data = 0xFFFF)
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

Security extension regs:
MSP_S  = 00000000, MSPLIM_S  = 00000000
PSP_S  = 00000000, PSPLIM_S  = 00000000
MSP_NS = FFFFFFFC, 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 all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Setting breakpoint @ address 0x00003448, Size = 2, BPHandle = 0x0001
Starting target CPU...
0 Kudos
Reply
1 Reply

1,936 Views
mikedoidge
NXP Employee
NXP Employee

Hi @andyknitt,

This sounds like some conflict between versions of Segger J-Link SW. It could be the newer install overwrote the old one or maybe just some shared files and broke the older SW.

My suggestions are:

1) Uninstall the new SW and see if the debugger works again.

2) Install S32 Design Studio again, to a new folder location (you can install it multiple times, just gets hard to manage which one to use) and check if the new install works.

3) Contact Segger about this. It's their SW.

Hope that helps,

Mike

0 Kudos
Reply