boards: phytec: phyboard_lyra: Add OpenOCD support for M4

The phyBOARD-Lyra AM62x is equipped with an XDS110 JTAG debugger. Add
missing OpenOCD configuration and some documentation to support
'west debug'.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
This commit is contained in:
Daniel Schultz 2024-04-19 16:08:31 -07:00 committed by Anas Nashif
parent 680228d5d6
commit 4e95fde58c
3 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# PHYTEC phyBOARD-Lyra AM62x M4/A53
#
# Copyright (c) 2024, PHYTEC Messtechnik GmbH
#
# SPDX-License-Identifier: Apache-2.0
if(CONFIG_SOC_AM6234_M4)
board_runner_args(openocd "--no-init" "--no-halt" "--no-targets" "--gdb-client-port=3339")
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
endif()

View File

@ -131,6 +131,21 @@ The board should boot into Linux and the binary will run and print Hello world t
port.
Debugging
*********
The board is equipped with an XDS110 JTAG debugger. To debug a binary, utilize the `debug` build target:
.. zephyr-app-commands::
:zephyr-app: <my_app>
:board: phyboard_lyra/am6234/m4
:maybe-skip-config:
:goals: debug
.. hint::
To utilize this feature, you'll need OpenOCD version 0.12 or higher. Due to the possibility of
older versions being available in package feeds, it's advisable to `build OpenOCD from source`_.
.. _PHYTEC AM62x Product Page:
https://www.phytec.com/product/phycore-am62x/
@ -143,3 +158,6 @@ port.
.. _phyBOARD SD Card Booting Essentials:
https://docs.phytec.com/projects/yocto-phycore-am62x/en/bsp-yocto-ampliphy-am62x-pd23.2.1/bootingessentials/sdcard.html
.. _build OpenOCD from source:
https://docs.u-boot.org/en/latest/board/ti/k3.html#building-openocd-from-source

View File

@ -0,0 +1,7 @@
# PHYTEC phyBOARD-Lyra AM62x M4/A53
#
# Copyright (c) 2024, PHYTEC Messtechnik GmbH
#
# SPDX-License-Identifier: Apache-2.0
source [find board/ti_am625evm.cfg]