fix(tools): use nvram.esp32s3.efuse device in qemu_ext.py

Related to https://github.com/espressif/esp-idf/issues/17258
This commit is contained in:
Ivan Grokhotkov
2025-08-22 11:20:15 +02:00
committed by BOT
parent dc55e0f06a
commit 018a4cd3d6

View File

@@ -43,7 +43,6 @@ class QemuTarget:
qemu_args: str # chip-specific arguments to pass to QEMU qemu_args: str # chip-specific arguments to pass to QEMU
default_efuse: bytes # default efuse values for the target default_efuse: bytes # default efuse values for the target
boot_mode_arg: str = '' # additional arguments to pass to QEMU when booting in download mode boot_mode_arg: str = '' # additional arguments to pass to QEMU when booting in download mode
efuse_device: str = '' # efuse device name, if different from the target nvram.{target}.efuse
# To generate the default eFuse values, follow the instructions in # To generate the default eFuse values, follow the instructions in
@@ -62,8 +61,7 @@ QEMU_TARGETS: Dict[str, QemuTarget] = {
'00000000000000000000000000000000000000000000000000000000000000000000000000000000' '00000000000000000000000000000000000000000000000000000000000000000000000000000000'
'00000000'), '00000000'),
'-global driver=esp32.gpio,property=strap_mode,value=0x0f', '-global driver=esp32.gpio,property=strap_mode,value=0x0f',
'nvram.esp32.efuse'), ),
'esp32c3': QemuTarget( 'esp32c3': QemuTarget(
'esp32c3', 'esp32c3',
'qemu-system-riscv32', 'qemu-system-riscv32',
@@ -98,8 +96,7 @@ QEMU_TARGETS: Dict[str, QemuTarget] = {
'00000000000000000000000000000000000000000000000000000000000000000000000000000000' '00000000000000000000000000000000000000000000000000000000000000000000000000000000'
'000000000000000000000000000000000000000000000000'), '000000000000000000000000000000000000000000000000'),
'-global driver=esp32c3.gpio,property=strap_mode,value=0x02', '-global driver=esp32c3.gpio,property=strap_mode,value=0x02',
'nvram.esp32c3.efuse'), ),
'esp32s3': QemuTarget( 'esp32s3': QemuTarget(
'esp32s3', 'esp32s3',
'qemu-system-xtensa', 'qemu-system-xtensa',
@@ -134,7 +131,7 @@ QEMU_TARGETS: Dict[str, QemuTarget] = {
'00000000000000000000000000000000000000000000000000000000000000000000000000000000' '00000000000000000000000000000000000000000000000000000000000000000000000000000000'
'000000000000000000000000000000000000000000000000'), '000000000000000000000000000000000000000000000000'),
'-global driver=esp32s3.gpio,property=strap_mode,value=0x07', '-global driver=esp32s3.gpio,property=strap_mode,value=0x07',
'nvram.esp32c3.efuse'), # Not esp32s3, QEMU-201 ),
} }
@@ -268,9 +265,12 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
] ]
qemu_args += [ qemu_args += [
'-drive', f'file={efuse_bin_path},if=none,format=raw,id=efuse', '-drive',
'-global', f'driver={qemu_target_info.efuse_device},property=drive,value=efuse', f'file={efuse_bin_path},if=none,format=raw,id=efuse',
'-global', f'driver=timer.{target}.timg,property=wdt_disable,value=true', '-global',
f'driver=nvram.{target}.efuse,property=drive,value=efuse',
'-global',
f'driver=timer.{target}.timg,property=wdt_disable,value=true',
] ]
# Quad PSRAM should work by default; octal requires a flag # Quad PSRAM should work by default; octal requires a flag