# 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
