Jlink connection problem

Good morning

I’ve Verdin iMX8M Mini and Verdin Development Board.
I’m using Torizon Core with Evaluation Container as image.

I’m trying to connect to the M4 core using Jlink.
I get the following error

lucavaltellina@lucavaltellina-virtual-machine:/opt/SEGGER/JLink$ ./JLinkGDBServer -if JTAG -device MIMX8MM6_M4
SEGGER J-Link GDB Server V7.94b Command Line Version

JLinkARM.dll V7.94b (DLL compiled Dec 13 2023 17:05:24)

Command line: -if JTAG -device MIMX8MM6_M4
-----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: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
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: MIMX8MM6_M4
Target device parameters: none
Target interface: JTAG
Target interface speed: 4000kHz
Target endian: little

Connecting to J-Link…
J-Link is connected.
Firmware: J-Link Lite-Cortex-M V9 compiled Feb 2 2021 16:33:27
Hardware: V9.00
S/N: 519002676
Feature(s): GDB
Checking target voltage…
Target voltage: 1.81 V
Listening on TCP/IP port 2331
Connecting to target…
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.

Hello @VLengineering,

Welcome to the Toradex Community :tada: Feel free to browse around!

We were able to reproduce this error when the jumpers X67A – X67F were connected on the verdin development board. You can see on our documentation that you need to remove these jumpers for debugging. See here: Cortex-M JTAG Debugging | Toradex Developer Center

Could you please confirm if you have removed those?

Hi Rudhi

Yes I removed the jumpers you are talking about.
However I made a step forward…
The connection to the m4 core did not occur because the core clock was OFF as I had not loaded any firmware.
But I wanted to be able to debug without any firmware loaded!
After an analysis of the imx8mini reference manual I saw that from u-boot I can activate the m4 core clock via the command
“mw 0x3039000C AA”.
This way the connection via jlink works.

Now obviously I have to implement the management of m4 fw loading at boot following your guide.

Thanks

1 Like

Hello @VLengineering,

Thanks for the update! Feel free to ask if you have more questions.