Skip to content

Commit

Permalink
runners: openocd: Default to an actual executable when not configured
Browse files Browse the repository at this point in the history
Whenever build/zephyr/runners.yaml does not specify the location of the
openocd executable we seemd to be leaving the executable variable as
None. Instead, use its executable name.

Signed-off-by: Carles Cufi <[email protected]>
  • Loading branch information
carlescufi committed Dec 18, 2021
1 parent cbf815e commit fef2e30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/west_commands/runners/openocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, cfg, pre_init=None, reset_halt_cmd=DEFAULT_OPENOCD_RESET_HALT
if cfg.openocd_search is not None:
for p in cfg.openocd_search:
search_args.extend(['-s', p])
self.openocd_cmd = [cfg.openocd] + search_args
self.openocd_cmd = [cfg.openocd or 'openocd'] + search_args
# openocd doesn't cope with Windows path names, so convert
# them to POSIX style just to be sure.
self.elf_name = Path(cfg.elf_file).as_posix()
Expand Down

0 comments on commit fef2e30

Please sign in to comment.