Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • 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
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic MKR Zero + Hardware Debugging + Black Magic Probe (Read 1182 times)
Jerome Girard
Newbies
*
Offline


Posts: 3
Joined: Aug 4th, 2019
MKR Zero + Hardware Debugging + Black Magic Probe
Apr 18th, 2021 at 9:33am
Print Post  
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: 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
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" 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 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": \\mkrzero\\Debug",
  "MIDebuggerPath": 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": ols\\openocd\\0.10.0-arduino7\\bin/openocd.exe",
  "debugServerArgs": "-d2 -s ools\\openocd\\0.10.0-arduino7/share/openocd/scripts/\" -f ardware\\samd\\1.8.11/variants/mkrzero/openocd_scripts/arduino_zero.cfg\" -c \"init; reset halt\"",
  "program": o/Debug/moisture_balance.ino.elf",
  "logging": {
    "moduleLoad": false,
    "trace": false,
    "engineLogging": false,
    "programOutput": false,
    "exceptions": false,
    "traceResponse": false
  },
  "visualizerFile": \\mkrzero\\Debug\\debugger_tmp.natvis",
  "showDisplayString": true
}

----Debug
Starting: ocd\0.10.0-arduino7\bin/openocd.exe" -d2 -s ocd\0.10.0-arduino7/share/openocd/scripts/" -f amd\1.8.11/variants/mkrzero/openocd_scripts/arduino_zero.cfg" -c "init; reset halt"
Starting: 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"
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: 2145
Joined: Feb 13th, 2019
Re: MKR Zero + Hardware Debugging + Black Magic Probe
Reply #1 - Apr 19th, 2021 at 9:07am
Print Post  
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
Select All
# 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

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


Posts: 2145
Joined: Feb 13th, 2019
Re: MKR Zero + Hardware Debugging + Black Magic Probe
Reply #2 - Apr 19th, 2021 at 4:51pm
Print Post  
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
Joined: Aug 4th, 2019
Re: MKR Zero + Hardware Debugging + Black Magic Probe
Reply #3 - Apr 24th, 2021 at 4:12pm
Print Post  
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 TopicPrint