Skip to content

Commit 1500de0

Browse files
committed
Allow to pass the file format to pyocd
1 parent 3c6400e commit 1500de0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/mbed_os_tools/test/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,13 @@ def init_host_test_cli_params():
359359
help="Prints package version and exits",
360360
)
361361

362+
parser.add_option(
363+
"",
364+
"--format",
365+
dest="format",
366+
help="Image file format passed to pyocd (elf, bin, hex, axf...).",
367+
)
368+
362369
parser.description = (
363370
"""Flash, reset and perform host supervised tests on mbed platforms"""
364371
)

src/mbed_os_tools/test/host_tests_plugins/module_copy_pyocd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def execute(self, capability, *args, **kwargs):
8686

8787
# Program the file
8888
programmer = FileProgrammer(session)
89-
programmer.program(image_path)
89+
programmer.program(image_path, format=kwargs['format'])
9090

9191
return True
9292

0 commit comments

Comments
 (0)