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....
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
Missing openocd config (Read 116 times)
Habib
Newbies
*
Offline



Posts: 2
Missing openocd config
May 10th, 2020 at 8: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/v
ariants/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/va
riants/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?
Back to top
 
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 246
Re: Missing openocd config
Reply #1 - May 11th, 2020 at 10: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" 



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.
Back to top
 
 
IP Logged
 
Habib
Newbies
*
Offline



Posts: 2
Re: Missing openocd config
Reply #2 - May 12th, 2020 at 6: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?
Back to top
 
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 246
Re: Missing openocd config
Reply #3 - May 12th, 2020 at 10: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" 

Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print