boards: arm: stm32157c-dk2: fix openocd configuration

By default the port 3333 is assigned for the debug of the
Cortex-A CPUx. the port 3334 is assigned for the Cortex-M debug.

This configuration does not allow to debug the Cortex-M.
More than that the stm32mp157 Cortex-A is not supported in zephyr.

This patch introduces openocd configuration, which
allow to use the Zephyr openocd for the Cortex-M.

The configuration consists in disabling the stm32mp15x.cpu<X> port
to set the stm32mp15x.cm4 port to 3333.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
This commit is contained in:
Arnaud Pouliquen 2022-11-10 15:17:55 +01:00 committed by Fabio Baltieri
commit ac53c83d42
2 changed files with 11 additions and 0 deletions

View file

@ -1 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd.cfg")

View file

@ -0,0 +1,7 @@
source [find board/stm32mp15x_dk2.cfg]
# By default the port 3333 is assigned for the Cortex-A debug. Disable them
stm32mp15x.cpu0 configure -gdb-port disabled
stm32mp15x.cpu1 configure -gdb-port disabled
targets stm32mp15x.cm4