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
MKR Zero + Hardware Debugging + Black Magic Probe (Read 94 times)
Jerome Girard
Newbies
*
Offline



Posts: 3
MKR Zero + Hardware Debugging + Black Magic Probe
Apr 18th, 2021 at 10:33am
 
I am using VS2019 and vMicro 1.2021.0106.
When I try to debug my project with a Black Magic Probe I get an error.
I can't find any OCD log.
Upload and manually attach debugger are working fine with the BMP.

------------------------------------------------
----Micro Build
Compiling 'moisture_balance' for 'Arduino MKRZERO'
Build Folder: "file:///C:/Users/jerome.VM7X64DEVJG/AppData/Local/Temp/VMBuilds/moisture_balanc
e/mkrzero/Debug"
Program size: 187 296 bytes (used 71% of a 262 144 byte maximum) (10.30 secs)
Minimum Memory Usage: 7228 bytes (22% of a 32768 byte maximum)

Uploading 'moisture_balance' to 'Arduino MKRZERO' using 'Black Magic (vMicro)'
Uploader started for board Arduino MKRZERO
Uploader will use programmer name: vmbmp
C:\Users\jerome.VM7X64DEVJG\AppData\Local\arduino15\packages\arduino\tools\arm-n
one-eabi-gcc\7-2017q4\bin\arm-none-eabi-gdb.exe -nx -b 230400 -batch -ex "set confirm off" -ex "target extended-remote \\.\COM10" -ex "monitor swdp_scan" -ex "attach 1" -ex "load" -ex "compare-sections" -ex "kill" "C:\Users\jerome.VM7X64DEVJG\AppData\Local\Temp\VMBuilds\moisture_balance\mkrzer
o\Debug/moisture_balance.ino.elf" -ex "kill"
Target voltage: 3.3V
Available Targets:
No. Att Driver
1      Atmel SAMD21G18A (rev D) M0+
0x00020444 in digitalRead (ulPin=1 '\001') at C:\Users\jerome.VM7X64DEVJG\AppData\Local\arduino15\packages\arduino\hardware\sa
md\1.8.11\cores\arduino\wiring_digital.c:106
106      {
Loading section .text, size 0x2d7e0 lma 0x2000
The program is not being run.
Loading section .ramfunc, size 0x78 lma 0x2f7e0
     The upload process has finished.

Loading section .ARM.exidx, size 0x8 lma 0x2f858
Loading section .data, size 0x3c0 lma 0x2f860
Start address 0x1f31c, load size 187424
Transfer rate: 32 KB/sec, 961 bytes/write.
Section .text, range 0x2000 -- 0x2f7e0: matched.
Section .ramfunc, range 0x2f7e0 -- 0x2f858: matched.
Section .ARM.exidx, range 0x2f858 -- 0x2f860: matched.
Section .data, range 0x2f860 -- 0x2fc20: matched.
# MI Debugger Properties
{
  "serverLaunchTimeout": 5000,
  "filterStdout": false,
  "filterStderr": true,
  "targetArchitecture": "arm",
  "stopAtEntry": false,
  "externalConsole": false,
  "MIMode": "gdb",
  "MIDebuggerServerAddress": "localhost:3333",
  "cwd": "C:\\Users\\jerome.VM7X64DEVJG\\AppData\\Local\\Temp\\VMBuilds\\moisture_balance
\\mkrzero\\Debug",
  "MIDebuggerPath": "C:\\Users\\jerome.VM7X64DEVJG\\AppData\\Local\\arduino15\\packages\\arduino\\to
ols\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-gdb.exe",
  "MIDebuggerArgs": "-nh -b 115200 -ex \"target extended-remote \\\\.\\COM10\" -ex \"monitor swdp_scan\" -ex \"attach 1\"",
  "debugServerPath": "C:\\Users\\jerome.VM7X64DEVJG\\AppData\\Local\\arduino15\\packages\\arduino\\to
ols\\openocd\\0.10.0-arduino7\\bin/openocd.exe",
  "debugServerArgs": "-d2 -s \"C:\\Users\\jerome.VM7X64DEVJG\\AppData\\Local\\arduino15\\packages\\arduino\\t
ools\\openocd\\0.10.0-arduino7/share/openocd/scripts/\" -f \"C:\\Users\\jerome.VM7X64DEVJG\\AppData\\Local\\arduino15\\packages\\arduino\\h
ardware\\samd\\1.8.11/variants/mkrzero/openocd_scripts/arduino_zero.cfg\" -c \"init; reset halt\"",
  "program": "C:/Users/jerome.VM7X64DEVJG/AppData/Local/Temp/VMBuilds/moisture_balance/mkrzer
o/Debug/moisture_balance.ino.elf",
  "logging": {
    "moduleLoad": false,
    "trace": false,
    "engineLogging": false,
    "programOutput": false,
    "exceptions": false,
    "traceResponse": false
  },
  "visualizerFile": "C:\\Users\\jerome.VM7X64DEVJG\\AppData\\Local\\Temp\\VMBuilds\\moisture_balance
\\mkrzero\\Debug\\debugger_tmp.natvis",
  "showDisplayString": true
}

----Debug
Starting: "C:\Users\jerome.VM7X64DEVJG\AppData\Local\arduino15\packages\arduino\tools\open
ocd\0.10.0-arduino7\bin/openocd.exe" -d2 -s "C:\Users\jerome.VM7X64DEVJG\AppData\Local\arduino15\packages\arduino\tools\open
ocd\0.10.0-arduino7/share/openocd/scripts/" -f "C:\Users\jerome.VM7X64DEVJG\AppData\Local\arduino15\packages\arduino\hardware\s
amd\1.8.11/variants/mkrzero/openocd_scripts/arduino_zero.cfg" -c "init; reset halt"
Starting: "C:\Users\jerome.VM7X64DEVJG\AppData\Local\arduino15\packages\arduino\tools\arm-
none-eabi-gcc\7-2017q4/bin/arm-none-eabi-gdb.exe" --interpreter=mi -nh -b 115200 -ex "target extended-remote \\.\COM10" -ex "monitor swdp_scan" -ex "attach 1"
"C:\Users\jerome.VM7X64DEVJG\AppData\Local\arduino15\packages\arduino\tools\open
ocd\0.10.0-arduino7\bin/openocd.exe" exited with code 1 (0x1).

------------------------------------------------------

Thanks in advance
Sorry for my pour English.
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 795
Re: MKR Zero + Hardware Debugging + Black Magic Probe
Reply #1 - Apr 19th, 2021 at 10:07am
 
Thanks for the report.

We have been able to replicate this issue and we will include a fix in the next available release.

To work around it in the mean time:
1) Add a Local Board.txt to the project (vMicro > Add Code > Local Board.txt)
2) Replace the contents of the board.txt file with the below:
Code:
# OpenOCD is OnSOC for BMP so can be removed from settings inherited from boardpackage\platform.txt
tools.bmp_upload.debug.server= 


3) Save the file, and try the debugging again

If this does not work please attach the full output from Debug > Start Debugging, with the below options set:
  • vMicro > Compiler > Show Build Properties
  • vMicro > Compiler > Verbose
  • vMicro > Upload > Verbose

Back to top
« Last Edit: Apr 19th, 2021 at 1:59pm by Simon@Visual Micro »  
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 795
Re: MKR Zero + Hardware Debugging + Black Magic Probe
Reply #2 - Apr 19th, 2021 at 5:51pm
 
Please try the latest release (21.01.06.18) from the top of the below board, this should resolve the issue without the need for the board.txt Workaround:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
Back to top
 
 
IP Logged
 
Jerome Girard
Newbies
*
Offline



Posts: 3
Re: MKR Zero + Hardware Debugging + Black Magic Probe
Reply #3 - Apr 24th, 2021 at 5:12pm
 
Sorry for the delay

With the latest release (21.01.06.18), everything is working.

Thanks a lot!
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print