Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.
0

Hardware Debugging with JLink
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Hardware Debugging with JLink

by Riffelrw on Sun Jan 23, 2022 6:38 pm

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.

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

Re: Hardware Debugging with JLink

by User_UMjT7KxnxP8YN8 on Mon Jan 24, 2022 12:36 am

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_UMjT7KxnxP8YN8
 
Posts: 308
Joined: Tue Jul 17, 2018 1:28 pm

Re: Hardware Debugging with JLink

by jevada on Tue Jan 25, 2022 5:31 pm

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 :)

jevada
 
Posts: 184
Joined: Fri Dec 15, 2017 5:29 am

Re: Hardware Debugging with JLink

by Riffelrw on Sun Mar 06, 2022 7:46 pm

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.

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

Re: Hardware Debugging with JLink

by austin944 on Mon Mar 14, 2022 7:29 pm

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."

austin944
 
Posts: 5
Joined: Sun Jan 17, 2021 8:45 pm

Please be positive and constructive with your questions and comments.