Could not connect to target.

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

Could not connect to target.

353 Views
zqwerty
Contributor I

I am working with my own boards(S32K148).

J-link can't connect the board :

SEGGER J-Link GDB Server V6.42a Command Line Version

JLinkARM.dll V6.42a (DLL compiled Feb 1 2019 18:00:08)

Command line: -if jtag -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: JTAG
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: 69667527
Feature(s): RDI, GDB, FlashDL, FlashBP, JFlash
Checking target voltage...
Target voltage: 3.23 V
Listening on TCP/IP port 2331
Connecting to target...ERROR: InitTarget(): PCode returned with error code -1

ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...
Could not connect to target.
Please check power, connection and settings.

Did anybody have a similar issue? Any ideas are welcomed.

Thank you very much.

0 Kudos
1 Reply

335 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@zqwerty

"Connecting to target...ERROR: InitTarget(): PCode returned with error code -1"

Usually this error indicates a connection error with your hardware. You can check again whether your debugger connection is normal.

0 Kudos