Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
Page Index Toggle Pages: 1
Send Topic Print
Xiao J-Link Debugger not Starting (Read 258 times)

Posts: 1
Xiao J-Link Debugger not Starting
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-\bin/openocd.exe" -d2 -l "{C:\Users\chris\AppData\Local\Temp\VMBuilds\Blink1\Seeeduino_seeed_XIAO_m0\Debu
g/Blink1.ino_DebugOpenOCD.log}" -s "C:\ProgramData\vmicro\tools\openocd-" -f "interface/jlink.cfg" -c "transport select swd" -f "C:\Users\chris\AppData\Local\arduino15\packages\Seeeduino\hardware\samd\1.8.1/v
ariants/XIAO_m0/openocd_scripts/XIAO_m0.cfg" -c "init; reset halt"
Starting: "C:\Users\chris\AppData\Local\arduino15\packages\Seeeduino\tools\arm-none-eabi-g
cc\7-2017q4/bin\arm-none-eabi-gdb.exe" --interpreter=mi
"C:\ProgramData\vmicro\tools\openocd-\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.
Back to top
« Last Edit: Mar 21st, 2021 at 6:09pm by chrisgr99 »  

Please Register or Login to the Forum to see File Attachments
IP Logged
Tim@Visual Micro

Posts: 11127
United Kingdom
Re: Xiao J-Link Debugger not Starting
Reply #1 - Mar 21st, 2021 at 6:18pm

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


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.

Back to top
« Last Edit: Mar 21st, 2021 at 6:20pm by Tim@Visual Micro »  

Tim Leek
IP Logged
Page Index Toggle Pages: 1
Send Topic Print