Debug problem : MCUXpresso 10.0.0 + LPC-Link 2 + MKL27Z256xxx4 = Target error from Write Memory: Et:96

Showing results for 
Search instead for 
Did you mean: 

Debug problem : MCUXpresso 10.0.0 + LPC-Link 2 + MKL27Z256xxx4 = Target error from Write Memory: Et:96

Contributor II

I'm trying to use an LPC Link2 to debug a custom board with an MKL27Z256xxx4 on it. 

I've proven the board is function and MCU debuggable using USBDM with the same hardware and cables. But want to use an LPC link 2.

I was able to start a debug session occasionally with the LPC Link2 but can't get it to work reliably since the first initial sucess. 

This is happening with the boilerplate project generated by MCUXpresso new project wizard. Using the SDK from MCUXpresso config tools, SDK 2.2.0. So shouldn't be doing anything to cause the issue. And the fact USB DM works with the code, board and cables shows it should work.

The LPC Link2/MCUXpresso error I am getting:

Target error from Write Memory: Et:96: Pseudo-address (0xFFFFFFxx) for EXC_RETURN is invalid (GDB error?)

Any ideas?

full console output below :

MCUXpresso RedlinkMulti Driver v10.0 (Mar 21 2017 01:34:42 - crt_emu_cm_redlink build 190)
Reconnected to existing redlink server (PID 4294967295)
Connecting to probe 1 core 0 (server PID unknown) gave 'OK'
============= SCRIPT: kinetisconnect.scp =============
Kinetis Connect Script
DpID = 0BC11477
Reset pin state: 00
Power up Debug
MDM-AP APID: 0x001C0020
MDM-AP System Reset/Hold Reset/Debug Request
MDM-AP Control: 0x0000001C
MDM-AP Status (Flash Ready) : 0x00000033
Part is not secured
MDM-AP Control: 0x00000014
Release NRESET
Reset pin state: 01
MDM-AP Control (Debug Request): 0x00000004
MDM-AP Status: 0x0001003B
MDM-AP Core Halted
============= END SCRIPT =============================
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.182 (NXP Semiconductors)
Serial Number: BYGWOSIV
VID:PID: 1FC9:0090
USB Path: \\?\hid#vid_1fc9&pid_0090&mi_00#a&38666391&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Probe(0): Connected&Reset. DpID: 0BC11477. CpuID: 410CC600. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Inspected v.2 On chip Kinetis Flash memory module FTFA_1K.cfx
Image 'Kinetis SemiGeneric Feb 17 2017 17:24:02'
Opening flash driver FTFA_1K.cfx
AFTER driver startup timeout
Driver Addresses
Start: 20000000
Entry: 20000035
End: 20000610
Stack: 20000710
Driver Register State
R0: 20000F10
R1: 00000000
R2: 00000000
R3: 00000000
R4: 00000000
R5: 00000000
R6: 00000000
R7: 00000000
R8: 00000000
R9: 00000000
R10: 00000000
R11: 00000000
R12: 00000000
SP: 20005FE0
LR: FFFFFFF9 (exception from main thread)
PC: 0000014C
xPSR: 61000002
MSP: 20005FE0
PSP: 20000710
CFBP: 00000000 (CONTROL=0x0, FAULTMASK=0x0, BASEPRI=0x0, PRIMASK=0x0)
Stacked Exception information
20005FFC: xPSR: 61000000
20005FF8: VECTPC: 00000100
20005FF4: LR: FFFFFFF9
20005FF0: R12: 00000000
20005FEC: R3: 00000000
20005FE8: R2: 00000000
20005FE4: R1: 00000000
20005FE0: R0: 20000F10
Exception registers
E000ED04: ICSR: 00000002 (VECTPEND=0(none), VECTACTIVE=2(NMI))
E000ED08: VTOR: 00000000 TBLBASE=0(INCODE), TBLOFF=0x0
E000ED28: MMFSR: 00
E000ED29: BFSR: 00
E000ED2A: UFSR: 0000
E000ED2C: HFSR: 00000000
E000ED30: DFSR: 00000001 (HALTED)
E000ED3C: AFSR: 00000000
E000ED24: SHCSR: 00000000
E000ED34: MMAR: 00000000
E000ED38: BFAR: 00000000
E000EDFC: DEMCR: 01000000 (TRCENA)
VECTPC instructions near 00000100
000000FC: 4770
000000FE: 46C0
00000100: B510
00000102: B672
00000104: F002
00000106: FAA8
Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash.
NXP: MKL27Z256xxx4
Connected: was_reset=true. was_stopped=true
MCUXpresso Free License - Downloads unlimited
GDB nonstop mode enabled
Target error from Write Memory: Et:96: Pseudo-address (0xFFFFFFxx) for EXC_RETURN is invalid (GDB error?)
GDB stub (crt_emu_cm_redlink) terminating - GDB protocol problem: Pipe has been closed by GDB.

0 Kudos
1 Reply

NXP Employee
NXP Employee

Can you check your board debug/reset circuitry against : Design Considerations for Debug 

Can you also confirm whether you have JP2 header fitted on your LPC-Link2 (in respect to the VTREF comments in the above FAQ). Also if you are attempting to power the target from the LPC-Link2 and you see problems, then when you see problems providing separate power is a good idea.


MCUXpresso IDE Support

0 Kudos