west_commands: runners: Fix parameters passed to xsdb

Existing logic is passing elf file as parameter only when fsbl
or bit file parameter is present. This is incorrect, elf file should
be always passed irrespective of other parameters.

Signed-off-by: Mubin Sayyed <mubin.sayyed@amd.com>
This commit is contained in:
Mubin Sayyed 2025-01-29 08:19:33 +00:00 committed by Benjamin Cabé
commit 16d5d5e480
2 changed files with 3 additions and 3 deletions

View file

@ -54,5 +54,5 @@ class XSDBBinaryRunner(ZephyrBinaryRunner):
elif self.fsbl:
cmd = ['xsdb', self.xsdb_cfg_file, self.elf_file, self.fsbl]
else:
cmd = ['xsdb', self.xsdb_cfg_file]
cmd = ['xsdb', self.xsdb_cfg_file, self.elf_file]
self.check_call(cmd)

View file

@ -13,13 +13,13 @@ TEST_CASES = [
"config": None,
"bitstream": None,
"fsbl": None,
"expected_cmd": ["xsdb", "default_cfg_path"],
"expected_cmd": ["xsdb", "default_cfg_path", RC_KERNEL_ELF],
},
{
"config": "custom_cfg_path",
"bitstream": None,
"fsbl": None,
"expected_cmd": ["xsdb", "custom_cfg_path"],
"expected_cmd": ["xsdb", "custom_cfg_path", RC_KERNEL_ELF],
},
{
"config": None,