From 5dafc957efe95ec6fd47de41840052c40df26b8c Mon Sep 17 00:00:00 2001 From: Michal Jenikovsky Date: Thu, 10 Aug 2023 11:52:24 +0200 Subject: [PATCH] idf.py: gdb action incorrectly generated EOL gdbinit scripts GDB on Windows incorrectly reads EOL in the script files causing 'gdb' action to fail. (gdb) source .../build/gdbinit/py_extensions (gdb) source .../build\gdbinit\symbols add symbol table from file "...\build\bootloader\bootloader.elf" .../build\gdbinit\symbols:6: Error in sourced command file: Undefined command: "". Try "help". Forcing line separator to '\n' resolved the issue Signed-off-by: Michal Jenikovsky --- tools/idf_py_actions/debug_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/idf_py_actions/debug_ext.py b/tools/idf_py_actions/debug_ext.py index 1140103f91..13c2c0397a 100644 --- a/tools/idf_py_actions/debug_ext.py +++ b/tools/idf_py_actions/debug_ext.py @@ -197,7 +197,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict: r.append('set confirm on') r.append('end') r.append('') - return os.linesep.join(r) + return '\n'.join(r) raise FatalError(f'{ESP_ROM_INFO_FILE} file not found. Please check IDF integrity.') def generate_gdbinit_files(gdb: str, gdbinit: Optional[str], project_desc: Dict[str, Any]) -> None: