VS Arduino
>> >> Xiao J-Link Debugger not Starting
https://www.visualmicro.com/forums/YaBB.pl?num=1616349695

Message started by chrisgr99 on Mar 21st, 2021 at 6:01pm

Title: Xiao J-Link Debugger not Starting
Post by chrisgr99 on Mar 21st, 2021 at 6:01pm
I'm trying to use Visual Micro with J-Link on a Seeeduino Xiao.  I am able to program the board but the debugger won't start. 
I followed the steps in the Visual Micro Hardware Debugging video.  One thing I did that was not according to the video was that my J-Link was on USB Interface 3, not 0, so I intalled WinUSB to  J-Link on Interface 3.

When I run Debug/Start Debugging it loads the firmware to the board and the LED flashes as it should, but I get the error:

Starting: "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" -d2 -l "{C:\Users\chris\AppData\Local\Temp\VMBuilds\Blink1\Seeeduino_seeed_XIAO_m0\Debug/Blink1.ino_DebugOpenOCD.log}" -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -f "interface/jlink.cfg" -c "transport select swd" -f "C:\Users\chris\AppData\Local\arduino15\packages\Seeeduino\hardware\samd\1.8.1/variants/XIAO_m0/openocd_scripts/XIAO_m0.cfg" -c "init; reset halt"
Starting: "C:\Users\chris\AppData\Local\arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin\arm-none-eabi-gdb.exe" --interpreter=mi
"C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" exited with code 1 (0x1).

I have double checked my connections from the board to the J-Link and the J-Link LED is green.

Attached is a screenshot of my Visual Studio window showing the settings, the program with breakpoints set and the output.

What could the problem be?

Also, one other question:  When hardware debugging does Visual Micro upload the firmware using the board's USB serial connection or does it upload with the hardware debugger?  I need to upload with the hardware debugger because I'm developing an Arduino based USB OTG host, so the Arduino USB port would not be available after the firmware is loaded.

Xiao_Debug_Failure.png ( 131 KB | 3 Downloads )

Title: Re: Xiao J-Link Debugger not Starting
Post by Tim@Visual Micro on Mar 21st, 2021 at 6:18pm
Hi

Please follow the guide in yellow above so we can help.

Tips

1) The upload programmer is a seperate option on the vMicro>Uploader menu. (There is also a Micro>Programmer toolbar that can be set to visible, but the menu item does same with less clutter)

2) Leave optimization at default until you prove the debugger is working. The opimization setting can cause issues with some cores, ones that have been designed only with specific optimization settings in mind.


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