boards: amd: kv260_r5: update the board cmake to use xsdb runner

Update the board cmake to use xsdb runner, If users would like to
use default xsdb.cfg then need to pass the fsbl.elf binary via
--fsbl option when using west flash or twister commands.

Usage:
1) west flash --runner xsdb --elf-file kv260_r5/zephyr/zephyr.elf
 --fsbl <path>/fsbl.elf
2) ./scripts/twister -p kv260_r5 --west-runner xsdb --device-testing
 --device-serial /dev/ttyUSB0 --west-flash="--fsbl=<path>/fsbl.elf"

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
This commit is contained in:
Appana Durga Kedareswara rao 2024-10-18 14:14:52 +05:30 committed by Alberto Escolar
parent 99a998a161
commit f087f528f8
3 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,4 @@
# Copyright (c) 2022 Linaro.
#
# SPDX-License-Identifier: Apache-2.0
include(${ZEPHYR_BASE}/boards/common/xsdb.board.cmake)

View File

@ -0,0 +1,24 @@
# Copyright (c) 2024 Advanced Micro Devices, Inc.
#
# SPDX-License-Identifier: Apache-2.0
proc load_image args {
set elf_file [lindex $args 0]
set fsblelf_file [lindex $args 1]
connect -url 127.0.0.1:3121
after 2000
targets -set -nocase -filter {name =~ "*R5*#0"}
rst -proc
dow $fsblelf_file
after 1000
con
after 1000
stop
targets -set -nocase -filter {name =~ "*R5*#0"}
after 2000
dow $elf_file
con
exit
}
load_image {*}$argv

View File

@ -0,0 +1,6 @@
# Copyright (c) 2024 Advanced Micro Devices, Inc.
#
# SPDX-License-Identifier: Apache-2.0
board_set_debugger_ifnset(xsdb)
board_set_flasher_ifnset(xsdb)
board_finalize_runner_args(xsdb)