forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: arduino_giga_r1: add OpenOCD support
Add support for OpenOCD runner to the Arduino Giga R1 board. This shares the same CPU as the STM32H747i Discovery, so that implementation can be reused. Signed-off-by: Luca Burelli <[email protected]>
- Loading branch information
1 parent
b1d24e4
commit 3bdd91a
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
boards/arm/arduino_giga_r1/support/openocd_arduino_giga_r1_m4.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
source [find interface/stlink.cfg] | ||
|
||
transport select hla_swd | ||
|
||
set DUAL_BANK 1 | ||
|
||
set DUAL_CORE 1 | ||
|
||
source [find target/stm32h7x.cfg] | ||
|
||
reset_config srst_only srst_nogate connect_assert_srst |
28 changes: 28 additions & 0 deletions
28
boards/arm/arduino_giga_r1/support/openocd_arduino_giga_r1_m7.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
source [find interface/stlink.cfg] | ||
|
||
transport select hla_swd | ||
|
||
source [find target/stm32h7x.cfg] | ||
|
||
# Use connect_assert_srst here to be able to program | ||
# even when core is in sleep mode | ||
reset_config srst_only srst_nogate connect_assert_srst | ||
|
||
$_CHIPNAME.cpu0 configure -event gdb-attach { | ||
echo "Debugger attaching: halting execution" | ||
gdb_breakpoint_override hard | ||
} | ||
|
||
$_CHIPNAME.cpu0 configure -event gdb-detach { | ||
echo "Debugger detaching: resuming execution" | ||
resume | ||
} | ||
|
||
# Due to the use of connect_assert_srst, running gdb requires | ||
# to reset halt just after openocd init. | ||
rename init old_init | ||
proc init {} { | ||
old_init | ||
reset halt | ||
} |