From 54d3c090beeb452654dc54d839b1d6d3819eb966 Mon Sep 17 00:00:00 2001 From: Peter Dragun Date: Fri, 6 Dec 2024 09:21:07 +0100 Subject: [PATCH] fix(tools): fix running monitor without elf file --- tools/idf_py_actions/serial_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/idf_py_actions/serial_ext.py b/tools/idf_py_actions/serial_ext.py index bb9ca60be2..8e41153fa0 100644 --- a/tools/idf_py_actions/serial_ext.py +++ b/tools/idf_py_actions/serial_ext.py @@ -172,7 +172,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict: monitor_args += ['--print_filter', print_filter] elf_list = [str(elf) for elf in Path(args.build_dir).rglob('*.elf')] - if elf_file: + if elf_file and elf_file in elf_list: # prepend the main app elf file to the list; make sure it is the first one elf_list.insert(0, elf_list.pop(elf_list.index(elf_file))) monitor_args.extend(elf_list)