fix(esp_rom): windows: use posix-path generation for gdbinit files

This commit is contained in:
Alexey Lapshin 2024-11-29 07:53:24 +07:00
parent e3ceabfa1b
commit 79bfde31ec

View File

@ -31,6 +31,9 @@ def generate_gdbinit_rom_add_symbols(target: str) -> str:
if not rom_elfs_dir:
raise EnvironmentError(
'ESP_ROM_ELF_DIR environment variable is not defined. Please try to run IDF "install" and "export" scripts.')
if os.name == 'nt':
# convert to posix-path for windows
rom_elfs_dir = rom_elfs_dir.replace('\\', '/')
with open(ROMS_JSON, 'r') as f:
roms = json.load(f)
if target not in roms: