### References

- [ Portenta - H7 @ VisualStudio - vMicro (paid) ](https://www.visualmicro.com/page/PortentaM7-Debugging.aspx)


## vMicro

Starting: "c:\Users\mc007\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.11.0-arduino2\bin/openocd.exe" 
Starting: "c:\Users\mc007\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin\arm-none-eabi-gdb.exe" --eval-command="shell ping localhost -n 3" --interpreter=mi2 -ex "set pagination off" --baud 230400 -ex "set target-charset ASCII" -ex "target remote \\.\COM7" "C:/Users/mc007/AppData/Local/Temp/VMBuilds/ph-firmware/envie_m7/Debug/ph-firmware.ino.elf"
"c:\Users\mc007\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.11.0-arduino2\bin/openocd.exe" exited with code 1 (0x1).



Starting: "C:\Users\mc007\AppData\Local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin\arm-none-eabi-gdb.exe" --interpreter=mi --eval-command="shell ping localhost -n 3" --interpreter=mi2 -ex "set pagination off" --baud 230400 -ex "set target-charset ASCII" -ex "target remote \\.\COM8" C:/Users/mc007/AppData/Local/Temp/VMBuilds/debug-test/envie_m7/Debug/debug-test.ino.elf

"C:\Users\mc007\AppData\Local\arduino15\packages\arduino\tools\openocd\0.11.0-arduino2\bin/openocd.exe" exited with code 1 (0x1).

/* This example demonstrates how to include the ThreadMRI library which allows debugging of the Portenta H7 and Nano 33 BLE [Sense]
   with GDB via a serial interface.

   To connect to the target, launch gdb with the following parameters

   arm-none-eabi-gdb -ex "set pagination off" --baud {230400} -ex "set target-charset ASCII" -ex "target remote {debug.port}" {project_name}.elf

   The baud rate needs to match the one provided in UartDebugCommInterface constructor, while {debug.port} depends on the operating system (eg. /dev/ttyUSB0 or COM15).

   If UsbDebugCommInterface is being used you can specify any baudrate.
*/

https://github.com/arduino/ArduinoCore-mbed/blob/main/libraries/ThreadDebug/examples/ThreadDebug/ThreadDebug.ino