VS Arduino
Visual Micro >> Hardware Debugging (GDB, GDB WiFi, GDB Stub) >> Arduino Due + Segger JLink not available
https://www.visualmicro.com/forums/YaBB.pl?num=1580265922

Message started by Steve Scholl on Jan 29th, 2020 at 2:45am

Title: Arduino Due + Segger JLink not available
Post by Steve Scholl on Jan 29th, 2020 at 2:45am
Hi,

I'm just beginning my foray into gdb debugging with visual micro. I've connected the jlink to the due but I don't see an option to select the jlink in the list of hardware debuggers. There is Manual, Atmel Ice, and Black Magic. I'm using Visual Micro version 1912.28.2 in Visual Studio 2017. Uploading and executing with the due works fine with Debug : Off. Looking for suggestions on how I can proceed.

thanks,
steve

Title: Re: Arduino Due + Segger JLink not available
Post by Simon Hopkinson on Jan 29th, 2020 at 10:17am
Not all debuggers are available pre-configured by default, and we will add this configuration in an upcoming release.

To make this work immediately:
Add a Board.txt to the Project (Right Click project > Add > Add Local board.txt)
Add the below line to the new board.txt file created

Code (]tools.openocd.debug.args={debug.verbose} -s "{path}/share/openocd/scripts/" -f "interface/jlink.cfg" -c "interface cmsis-dap" -c "set CHIPNAME at91sam3X8E" -c "source [find {openocdscript}):
" -c "init; reset halt"


If you select the "Atmel ICE" option now, and attach the debugger it should work as expected for debugging (the above config will override the elements we need).

NOTE - You will need to install the Additional WinUSB Driver using Zadig for the JLink to connect, and the orientation of the ribbon cable is also important (as shown on the SAM Debugging Page)

Title: Re: Arduino Due + Segger JLink not available
Post by Steve Scholl on Jan 29th, 2020 at 4:08pm
Thanks for the quick reply. I will give that a try this evening. I wanted to get clarification on changing the USB driver with Zadig. Do I install a new driver for the JLink or for the Due?

Title: Re: Arduino Due + Segger JLink not available
Post by Simon Hopkinson on Jan 29th, 2020 at 4:14pm
The Zadig tool will replace the driver for the JLink USB Device, so it is accessible from the OpenOCD software we use to connect to it.

Title: Re: Arduino Due + Segger JLink not available
Post by Steve Scholl on Jan 30th, 2020 at 5:49am
That did the trick. Thank You!

Title: Re: Arduino Due + Segger JLink not available
Post by Simon Hopkinson on Jan 30th, 2020 at 3:58pm
Glad to help, and this is now available on the drop down menu with the Atmel ICE / Black Magic in the latest release.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.