boards: adafruit_feather_stm32f405: OpenOCD support

This board has pads for and SWD header as per
https://learn.adafruit.com/adafruit-stm32f405-feather-express/pinouts#swd-port-3050618-16
This commit addes OpenOCD support to the board

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
This commit is contained in:
Richard Osterloh 2021-03-19 11:55:43 +00:00 committed by Carles Cufí
commit f9a0e20432
2 changed files with 19 additions and 0 deletions

View file

@ -5,3 +5,4 @@ board_runner_args(jlink "--device=STM32F405RG" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

View file

@ -0,0 +1,18 @@
source [find interface/stlink.cfg]
transport select hla_swd
source [find target/stm32f4x.cfg]
reset_config srst_only
$_TARGETNAME configure -event gdb-attach {
echo "Debugger attaching: halting execution"
reset halt
gdb_breakpoint_override hard
}
$_TARGETNAME configure -event gdb-detach {
echo "Debugger detaching: resuming execution"
resume
}