Hardware Debugging with JLink

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Riffelrw
 
Posts: 75
Joined: Tue Mar 31, 2015 11:54 am

Hardware Debugging with JLink

Post by Riffelrw »

I am just starting to do real debugging including step by step in Visual Studio with Visual Micro Extension. I have a JLink and am trying to debug an Adafruit M4 Feather using the SWD hardware IO. Does anyone know if there is a tutorial for Visual Micro that I can start from?

I've read the tutorial at https://learn.adafruit.com/make-a-simpl ... for-the-m0 so i think the wiring is straightforward, it's the SW I'm unsure about.

I wasn't able to find a clean simple approach but am guessing I'm certianly not the first one to do it so I'm likely not looking in the right place.

Any help appreciated - I've asked a similar question in the VM forum.

User avatar
User_UMjT7KxnxP8YN8
 
Posts: 323
Joined: Tue Jul 17, 2018 1:28 pm

Re: Hardware Debugging with JLink

Post by User_UMjT7KxnxP8YN8 »

Not really a responsive answer, but I've done both hardware and software debugging with Visual Studio & various plug-ins and am not a fan. Segger's Ozone is the best I've found anywhere. I use it and a J-Link Plus to debug both Metro M4 Express and Feather M4 boards and highly recommend it.

User avatar
jevada
 
Posts: 194
Joined: Fri Dec 15, 2017 5:29 am

Re: Hardware Debugging with JLink

Post by jevada »

User_UMjT7KxnxP8YN8 wrote:Segger's Ozone is the best I've found anywhere.
Exactly that. I was gonna' suggest the same thing, you beat me to it :)

User avatar
Riffelrw
 
Posts: 75
Joined: Tue Mar 31, 2015 11:54 am

Re: Hardware Debugging with JLink

Post by Riffelrw »

I have just started to connect the JLink debugger with the JTag/SWD breakout board. Based on the instructions below, it says I should connect up the VCC from the SWD breakout to the 3.3V logic of the chip:

https://learn.adafruit.com/proper-step- ... m0/lets-go

Vref / Vtarget - Logic voltage of the chip, in this case 3.3V
GND to common ground
SWDIO to SWDIO
SWCLK to SWCLK

The only way I can see to do that is connect it to the 3.3V of the chip (which is the output of the 5V->3.3V regulator). Does this make sense? If I connect up the USB to the PC to actually do the debug, it will power the 5V and then the 3.3V (meaning that line would be powered by both JLink and the internal regulator). Why would I have both running? I could see if the feather was a complete 3.3V system (as the chip already is) or just tie the grounds together between the JTAG output on the SWD breakout and the USB.

I must be missing something - sorry I'm a complete newbie on the hardware debugging approach, vs standard debugging on a PC based program.

User avatar
austin944
 
Posts: 12
Joined: Sun Jan 17, 2021 8:45 pm

Re: Hardware Debugging with JLink

Post by austin944 »

I think what Adafruit calls Vref / Vtarget is called VTref in this SEGGER J-Link spec:

https://www.segger.com/downloads/jlink/UM08001

VTref is as an input to the J-Link debugger and is described as follows:

"This is the target reference voltage. It is used to check if the target has power, to create the logic-level reference for the input comparators and to control the output logic levels to the target. It is normally fed from VDD of the target board and must not have a series resistor."

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”