I recently picked up a Segger jLink Edu, wanting to upgrade my debugging game from print statements to something a bit less pedestrian. I installed the software from Segger, which went easy enough. Soldered some leads from the jLink to the Feather M0 that I'm using, again, super easy. Plugged the jLink and the feather into two conveniently available front ports on my development box, and well, nothing seems to work.
I'm lost, very lost, and was hopeful someone here might be able to answer a couple questions:
1. I read about using the zadig app to update my drivers, but I'm not sure exactly "what" to update. Is it the jLink device that's listed, and if so, which driver do you update it to? I tried all of them and nothing seemed to have any effect other than making the Segger applications angry.
2. I'm pretty confident that my jLink is connected to my Feather properly (wiring wise), but how do you confirm that you didn't connect something incorrectly?
3. Trying to upload and debug a simple blink sketch via VS 2019 and Visual Micro yields the following error. Note that I have the following configured via Visual Micro: Adafruit Feather M0 board, COM9 Port (J-Link), J-Link over OpenOCD, Enable Programmer, Debug: Hardware, Segger JLink (SWD), No Project or Library Optimizations.
Debugger: Segger JLink (SWD)
Compiling 'Blink' for 'Adafruit Feather M0'
Build Folder: her_m0/Debug"
Program size: 10,840 bytes (used 4% of a 262,144 byte maximum) (0.27 secs)
Uploading 'Blink' to 'Adafruit Feather M0' using 'J-Link over OpenOCD'
Uploader started for board Adafruit Feather M0
Uploader will use programmer name: adafruit_jlink
ino\bin\openocd.exe -d2 -s uino/share/openocd/scripts/" -f riants/feather_m0/openocd_scripts/feather_m0.cfg" -c "telnet_port disabled; program Debug/Blink.ino.elf}} verify reset; shutdown"
Open On-Chip Debugger 0.9.0-gd4b7679 (2015-06-10-22:24)
The upload process has finished.
Licensed under GNU GPL v2
# MI Debugger Properties
{
"serverLaunchTimeout": 5000,
"filterStdout": false,
"filterStderr": true,
"targetArchitecture": "arm",
"stopAtEntry": false,
"externalConsole": false,
"MIMode": "gdb",
"MIDebuggerServerAddress": "localhost:3333",
"cwd": her_m0\\Debug",
"MIDebuggerPath": -eabi-gcc\\4.8.3-2014q1/bin\\arm-none-eabi-gdb.exe",
"MIDebuggerArgs": "",
"debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.1\\bin/openocd.exe",
"debugServerArgs": "-d2 -l ather_m0\\Debug/Blink.ino_DebugOpenOCD.log}\" -s\"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.1/scripts/\" -f -c \"transport select swd\" -f d\\1.5.5/variants/feather_m0/openocd_scripts/feather_m0.cfg\" -c \"init\"",
"program": ebug/Blink.ino.elf",
"logging": {
"moduleLoad": false,
"trace": false,
"engineLogging": false,
"programOutput": false,
"exceptions": false,
"traceResponse": false
},
"visualizerFile": her_m0\\Debug\\debugger_tmp.natvis",
"showDisplayString": true
}
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Error: Debug adapter does not support any transports? Check config file order.
Error: unable to select a session transport. Can't continue.
shutdown command invoked
After this error message outputs, I get a visual studio modal error window stating "Unable to start debugging. Unable to establish a connection to GDB. Debug output may contain more information".
Also, pasting this in results in syntax errors regarding an unexpected token '-d' in expression or statement
"C:\ProgramData\vmicro\tools\openocd-0.10.0.1\bin/openocd.exe" -d2 -l Debug/Blink.ino_DebugOpenOCD.log}" -s"C:\ProgramData\vmicro\tools\openocd-0.10.0.1/scripts/" -f "C:\ProgramData\vmicro\tools\openocd-0.10.0.1/scripts/interface/jlink.cfg" -c "transport select swd" -f riants/feather_m0/openocd_scripts/feather_m0.cfg" -c "init"
So looking at my list of things, I'm assuming there are several issues.
1. I've not updated or added any drivers, mostly cuz I don't know which device to update to what driver.
2. There seems to be a syntax error of some kind when trying to execute openocd.
3. I tried to debug with both the JLink over OpenOCD and JLink over OpenOCD (vMicro). Neither worked, both OpenOCD command line statements resulting in the same syntax error statement with the only exception being the path to different versions of OpenOCD.
I appreciate the length of this post, and any thoughts you might have on things I can try. I'm eager to learn more, and up my debugging game.