-
Notifications
You must be signed in to change notification settings - Fork 256
Description
Hello,
I am attempting to use cortex-debug to connect to a JLink Remote Server instance via an IP tunnel. I have this launch configuration:
{
"name": "(remote) L476RG - J-Link",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}",
"executable": "${command:cmake.launchTargetPath}",
"ipAddress": "tunnel:my_probe_id:*****:jlink-america.segger.com",
"servertype": "jlink",
"serverpath": "/usr/bin/JLinkGDBServerCLExe",
"device": "STM32L476RG",
"interface": "swd",
"runToEntryPoint": "main",
"svdPath": "/tools/stm32-debug/svd/STM32L476.svd",
"showDevDebugOutput": "raw",
},
I see JLink Remote Server report that a client does connect, but then the GDB server reports a timeout. Based on the gdb-server output, it looks to timeout while connecting to the target
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link WiFi-V2 compiled Apr 1 2025 10:05:40
Hardware: V2.00
S/N: 12345
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 3.35 V
Listening on TCP/IP port 50000
Connecting to target...
[2025-07-03T17:17:30.828Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
I see that cortex-debug is invoking the GDB server using this command: /usr/bin/JLinkGDBServerCLExe -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device STM32L476RG -select "ip=tunnel:my_probe_id:*****:jlink-america.segger.com"
. If I use this command in a terminal, then the server successfully connects.
Does anyone see issues in my configuration that could be causing my issue?
Furthermore, has anyone gotten cortex-debug to successfully connect to a JLink Remote Server using an IP tunnel? If so, I would be curious to see your configuration.