Sysprogs forums › Forums › VisualGDB › How to debug remotely with J-link, Visual Studio, VisualGDB?
- This topic has 7 replies, 2 voices, and was last updated 3 years, 4 months ago by support.
-
AuthorPosts
-
July 21, 2021 at 17:18 #30986cabandreParticipant
How to debug remotely with J-link, Visual Studio, VisualGDB? What setup steps do I have to do?
July 23, 2021 at 10:37 #30987supportKeymasterHi,
VisualGDB uses the J-Link Software to communicate to Segger J-Link. You can configure it to connect to a remote J-Link by selecting “Connection: TCP/IP” in VisualGDB Project Properties -> Debug Settings. This will pass the “-select IP” argument to JLinkGDBServerCL.exe (expand the Advanced Settings view to preview the command line).
You can find more details about remote mode of the Segger J-Link GDB Server in the J-Link documentation.
July 26, 2021 at 14:50 #30998cabandreParticipantdo I select Segger J-Link for “debug using” in VisualGDB setting?
- This reply was modified 3 years, 4 months ago by cabandre.
July 26, 2021 at 15:09 #31000cabandreParticipantI have J-Link connected to a PC on 10.1.10.99, and I’m trying to connect to it from a different computer. I tried using JLinkRemoteServer which has the following logs:
Connected to J-Link with S/N
Waiting for client connections…
Conn. 1632: Client connected.
Connected to J-Link with S/NWaiting for client connections…
Conn. 1696: Client connected.
Connected to J-Link with S/NWaiting for client connections…
Conn. 1696: Client connected.
Connected to J-Link with S/NWaiting for client connections…
Conn. 1664: Client connected.and on Visual Studio I get this error in gdb stub log:
VisualGDB: restarting tool…
SEGGER J-Link GDB Server V7.50a Command Line VersionJLinkARM.dll V7.50a (DLL compiled Jul 8 2021 18:21:11)
Command line: -select IP=10.1.10.99 -device STM32L476RG -speed auto -if SWD -port 61505
—–GDB Server start settings—–
GDBInit file: none
GDB Server Listening port: 61505
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
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: IP
J-Link script: none
J-Link settings file: none
——Target related settings——
Target device: STM32L476RG
Target interface: SWD
Target interface speed: auto
Target endian: littleConnecting to J-Link…
J-Link is connected.
Firmware: J-Link Ultra V4 compiled Oct 26 2018 12:04:46
Hardware: V4.00
S/N:
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage…
Target voltage: 3.26 V
Listening on TCP/IP port 61505
Connecting to target…
Connected to target
Waiting for GDB connection…Connected to 127.0.0.1
GDB closed TCP/IP connection (Socket 976)July 26, 2021 at 15:23 #31003cabandreParticipantsomehow it always shows the error the first time, then if I click retry then it would work.
July 26, 2021 at 16:00 #31005supportKeymasterIt’s hard to say why the connection between 2 J-Link tools would not always work. Please try reproducing the problem outside VisualGDB by launching JLinkGDBServer manually with the command-line arguments shown in the Advanced view. If the problem persists, please contact Segger support for further help.
If running JLinkGDBServer manually works, please let us know more details (e.g. successful vs. failing logs and the exact command line used) and we will help you configure VisualGDB to replicate that setup.
July 26, 2021 at 16:44 #31006cabandreParticipantI didn’t run JLinkGDBServer at all. I ran JLinkRemoteServer in which I selected USB for J-link connection and Use LAN for server settings. Then I change the IP in VisualGDB settings. And just start debugging, and click retry if the error shows as in my last post.
July 27, 2021 at 10:25 #31011supportKeymasterUnfortunately, it’s hard to suggest anything specific based on this description.
Please provide the steps we could follow on our side to reproduce the problem per our problem reporting guidelines and we will try to investigate this further.
-
AuthorPosts
- You must be logged in to reply to this topic.