Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug enhancements #710

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ arduino_zero_edbg.bootloader.tool=openocd
arduino_zero_edbg.bootloader.tool.default=openocd
arduino_zero_edbg.bootloader.file=zero/samd21_sam_ba.bin

# Reference for native programming
# arduino_zero_edbg.programmer.default=edbg

# Arduino Zero (Native USB Port)
# --------------------------------------
arduino_zero_native.name=Arduino Zero (Native USB Port)
Expand Down Expand Up @@ -249,13 +252,27 @@ nano_33_iot.build.board=SAMD_NANO_33_IOT
nano_33_iot.build.core=arduino
nano_33_iot.build.extra_flags=-DCRYSTALLESS -D__SAMD21G18A__ {build.usb_flags}
nano_33_iot.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
nano_33_iot.build.openocdscript=openocd_scripts/arduino_zero.cfg
nano_33_iot.build.openocdoldscript=openocd_scripts/arduino_zero.cfg
nano_33_iot.build.openocdscript=openocd_scripts/openocd.cfg
nano_33_iot.build.variant=nano_33_iot
nano_33_iot.build.vid=0x2341
nano_33_iot.build.pid=0x8057
nano_33_iot.bootloader.tool=openocd
nano_33_iot.bootloader.tool.default=openocd
nano_33_iot.bootloader.file=nano_33_iot/samd21_sam_ba_arduino_nano_33_iot.bin
nano_33_iot.debug.svd_file={runtime.platform.path}/svd/at91samd21g18.svd

nano_33_iot.debug.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 2
nano_33_iot.debug.cortex-debug.custom.postAttachCommands.1=monitor reset halt
nano_33_iot.debug.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
nano_33_iot.debug.cortex-debug.custom.postAttachCommands.3=thb setup
nano_33_iot.debug.cortex-debug.custom.postAttachCommands.4=c
nano_33_iot.debug.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
nano_33_iot.debug.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
nano_33_iot.debug.cortex-debug.custom.overrideRestartCommands.2=thb setup
nano_33_iot.debug.cortex-debug.custom.overrideRestartCommands.3=c
Comment on lines +265 to +273
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been added only for demo purposes. For sure needs updating


nano_33_iot.programmer.default=atmel_ice

# Arduino MKR FOX 1200
# --------------------
Expand Down
7 changes: 5 additions & 2 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,14 @@ pluggable_monitor.required.serial=builtin:serial-monitor
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.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}
build.openocdinterface=interface/{programmer.protocol}.cfg
debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdoldscript}
debug.server.openocd.scripts.0={build.openocdinterface}
debug.server.openocd.scripts.1={runtime.platform.path}/variants/{build.variant}/{build.openocdscript}

# Upload/Debug tools
# ------------------
Expand Down
1 change: 1 addition & 0 deletions programmers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ edbg.extra_params=
atmel_ice.name=Atmel-ICE
atmel_ice.communication=USB
atmel_ice.protocol=cmsis-dap.cfg
atmel_ice.programmer.protocol=cmsis-dap
atmel_ice.program.tool=openocd
atmel_ice.program.tool.default=openocd
atmel_ice.program.extra_params=
Expand Down
Loading