1# Copyright (c) 2024 Advanced Micro Devices, Inc.
2#
3# SPDX-License-Identifier: Apache-2.0
4
5proc load_image args  {
6	set elf_file [lindex $args 0]
7	set fsblelf_file [lindex $args 1]
8	connect -url 127.0.0.1:3121
9	after 2000
10	targets -set -nocase -filter {name =~ "*R5*#0"}
11	rst -proc
12	dow $fsblelf_file
13	after 1000
14	con
15	after 1000
16	stop
17	targets -set -nocase -filter {name =~ "*R5*#0"}
18	after 2000
19	dow $elf_file
20	con
21	exit
22}
23
24load_image {*}$argv
25