arduino / ArduinoCore-sam

80 stars 107 forks source link

Introduce experimental debug support for Arduino CLI/IDE #118

Open ubidefeo opened 3 years ago

ubidefeo commented 3 years ago

In the SAMD platform definition we have introduced experimental support to allow debug using the new IDE. @cmaglie has worked on it, but the bulk of it is adding this in the platform.txt with the correct parameters

# ----------------------------------------
# EXPERIMENTAL feature:
#  - this is alpha and may be subject to change without notice
debug.executable={build.path}/{build.project_name}.elf
debug.toolchain=gcc
debug.toolchain.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
debug.toolchain.prefix=arm-none-eabi-
debug.server=openocd
debug.server.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}/bin/openocd
debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/share/openocd/scripts/
debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdscript}

This request comes from an issue filed in the Arduino Pro IDE public repo https://github.com/arduino/arduino-pro-ide/issues/301

Transferred here as requested by @per1234