Browse Source

boards: others: canbardo: add openocd configuration

Add OpenOCD support to the CANbardo board definition.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
pull/92180/merge
Henrik Brix Andersen 2 weeks ago committed by Daniel DeGrasse
parent
commit
1f9cca43eb
  1. 2
      boards/others/canbardo/board.cmake
  2. 2
      boards/others/canbardo/canbardo_defconfig
  3. 24
      boards/others/canbardo/support/openocd.cfg

2
boards/others/canbardo/board.cmake

@ -2,5 +2,7 @@ @@ -2,5 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
board_runner_args(jlink "--device=ATSAME70N20B")
board_runner_args(openocd --cmd-post-verify "atsamv gpnvm set 1")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

2
boards/others/canbardo/canbardo_defconfig

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
# Copyright (c) 2024-2025 Henrik Brix Andersen <henrik@brixandersen.dk>
# SPDX-License-Identifier: Apache-2.0
CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_ARM_MPU=y
CONFIG_CACHE_MANAGEMENT=y
CONFIG_HW_STACK_PROTECTION=y

24
boards/others/canbardo/support/openocd.cfg

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
if {[info exists env(OPENOCD_INTERFACE)]} {
set INTERFACE $env(OPENOCD_INTERFACE)
} else {
set INTERFACE "cmsis-dap"
}
source [find interface/$INTERFACE.cfg]
transport select swd
set CHIPNAME atsame70n20b
source [find target/atsamv.cfg]
$_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
}
Loading…
Cancel
Save