Author Topic: Debugging of ARM processors / jLink  (Read 3280 times)

jorick

  • Senior Community Member
  • Posts: 390
  • Hero Points: 17
Debugging of ARM processors / jLink
« on: March 07, 2011, 03:54:03 PM »
A plugin to allow debugging of ARM processors via Segger's jLink.

SidInNJ

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Debugging of ARM processors / jLink
« Reply #1 on: November 16, 2020, 02:56:30 PM »
Yes Please!
In my case, I need to use a Win10 environment. In the meantime (before SlickEdit directly supports the Segger J-Link), I've seen posts about how people are using J-Link with SlickEdit, but primarily in a Linux environment, and without showing how they configured SlickEdit to work. It would be great to see a sample Win10 configuration for J-Link support.
Thanks!
Sid

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Debugging of ARM processors / jLink
« Reply #2 on: November 16, 2020, 03:28:03 PM »
I think launching JLinkGDBServer(CL).exe and using SE gdb (remote) debugging should work.
There is basically no difference between Linux/Windows platform.

ebbe

  • Community Member
  • Posts: 45
  • Hero Points: 2
Re: Debugging of ARM processors / jLink
« Reply #3 on: November 16, 2020, 07:14:06 PM »
I think launching JLinkGDBServer(CL).exe and using SE gdb (remote) debugging should work.
It does work. I have used a Segger in this way and it worked beautifully.

SidInNJ

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Debugging of ARM processors / jLink
« Reply #4 on: November 16, 2020, 09:48:34 PM »
Hi Ebbe,
It does work. I have used a Segger in this way and it worked beautifully.
Any chance you could post your configuration for the interface to the JLinkGDBServerCL? I'm missing something.

ebbe

  • Community Member
  • Posts: 45
  • Hero Points: 2
Re: Debugging of ARM processors / jLink
« Reply #5 on: November 17, 2020, 05:39:16 AM »
Any chance you could post your configuration for the interface to the JLinkGDBServerCL? I'm missing something.
Sorry, it was about four or five years ago on a PC that I no longer have. And I don't even have ready access to the Segger JLink right now so I can't throw an experiment together either.

But let's work with it here. I may be able to drag something out of my memory if you describe the problems, you are having in more detail.

SidInNJ

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Debugging of ARM processors / jLink
« Reply #6 on: November 17, 2020, 03:41:53 PM »
But let's work with it here. I may be able to drag something out of my memory if you describe the problems, you are having in more detail.

Thanks for the offer to help! Here are some things I tried (more interesting may be toward the end):

Debug, Attach Debugger, Attach to Remote Process (GDB).
Connect via socket
Host: localhost
Port: 8000

GDB configuration:
Command line options
-select USB -device Cortex-M4 -endian little -port 8000 -swoport 8001 -telnetport 8002 -if SWD -speed 4000 -noir -LocalhostOnly

vsdebugio connection port: 8000 (Options, Debugging, General, vsdebugio connection port:)

Use remote proxy: Off
Use Extended Remote mode (not checked)

This usually ended up with the debug display showing and "Starting debugger..." at the lower left, but SlickEdit hung
until using Task Manager I killed the JjLinkGDBServerCL.exe(32 bit) task under SlickEdit.
SlickEdit would then say: "Error starting debugger: GDB has terminated prematurely".

============I also tried:

Port: 2331

GDB configuration:
Command line options
-select USB -device Cortex-M4 -endian little -port 2331 -swoport 2332 -telnetport 2333 -if SWD -speed 4000 -noir -LocalhostOnly

vsdebugio connection port: 2331 (I also tried port 2332)

Use remote proxy: Off
Use Extended Remote mode (not checked)
If I was more patient, after about 3 minutes, SlickEdit would say: "Error starting debugger: DGB returned an error
opening the executable. "Reply did not begin with '^'".

If I started it via Debug, Start Debug: SE would say "Error starting debugger: GDB has terminated prematurely".

============= If I started it via: Build, Debug:
SE would download the file to the board (via a COM port), start JjLinkGDBServerCL.exe, but JjLinkGDBServerCL would end with :
  Listening on TCP/IP port 2331
  Connecting to target...
  Connected to target
  Waiting for GDB connection...


If I set the ports back to 8001,8002,8003:
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V11 compiled Nov  2 2020 09:15:32
Hardware: V11.00
S/N: 51006547
Feature(s): GDB
Checking target voltage...
Target voltage: 3.35 V
Listening on TCP/IP port 8000
Connecting to target...
Connected to target
Waiting for GDB connection...


Hopefully your memory of four years ago is better than mine for last week!  :)