VS Arduino
Visual Micro >> Hardware Debugging (GDB, GDB WiFi, GDB Stub) >> Missing openocd config
https://www.visualmicro.com/forums/YaBB.pl?num=1589097101

Message started by Habib on May 10th, 2020 at 7:51am

Title: Missing openocd config
Post by Habib on May 10th, 2020 at 7:51am
I'm trying to debug an Adafruit ItstyBitsy M4 with a J-link mini.  When I try to "Attach to process..." vMicro runs this command:

Starting: "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" -d2 -l "{C:\Users\habib\AppData\Local\Temp\VMBuilds\Blink1\adafruit_adafruit_itsybitsy_m4\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\habib\AppData\Local\arduino15\packages\adafruit\hardware\samd\1.5.14/variants/itsybitsy_m4/openocd_scripts/arduino_zero.cfg" -c "init"

It exits with code 1.  Checking the log file I find:

embedded:startup.tcl:26: Error: Can't find C:\Users\habib\AppData\Local\arduino15\packages\adafruit\hardware\samd\1.5.14/variants/itsybitsy_m4/openocd_scripts/arduino_zero.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 26


When I check under the itsybitsy_m4 directory there isn't any openocd_scripts directory at all.  I'm not sure why these files are missing and I'm not sure how to fix this issue.

Any advice?

Title: Re: Missing openocd config
Post by Simon Hopkinson on May 11th, 2020 at 9:26am
Thanks for the detailed report and information.

The files are only there for boards where the GDB debugging has been integrated into the board package for Arduino.  Looking at the board it uses the ATSAMD51 Cortex M4 Processor, which is listed in our OpenOCD configuration in the atsame5x file...

If you right click on the project in Solution Explorer > Add > Local Board.txt, add below line, save. Then try re-attaching the target again
[code]tools.jlink.server.targetCmd=-c "transport select swd" -f "target/atsame5x.cfg"[/code]

Let us know if this resolves the issue or if there are still problems.

We can add this to the pre-configured elements in Visual Micro once working to save doing this in the future.

Title: Re: Missing openocd config
Post by Habib on May 12th, 2020 at 5:38am
Thank you, that seems to have corrected the problem for debugging.  I'm still having the same issue when trying to upload via the j-link.  Is there a different config to update that as well?

Title: Re: Missing openocd config
Post by Simon Hopkinson on May 12th, 2020 at 9:27am
Brilliant, and yes there is the below addition for the program upload. (Debugging is always the safest place to start)

[code]tools.jlink.program.targetCmd=-c "transport select swd"  -f "target/atsame5x.cfg"[/code]

Title: Re: Missing openocd config
Post by Simon@Visual Micro on Sep 15th, 2020 at 8:41am
Off-Topic replies have been moved to this Topic.

Title: Re: Missing openocd config
Post by Kabron on Sep 15th, 2020 at 11:29am
With
https://www.raymond.cc/blog/auto-click-annoying-confirmation-buttons-clickoff/
works fine!

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