Refactor Platformio script `post_esp32.py` (#20966)

This commit is contained in:
Jason2866 2024-03-16 20:23:25 +01:00 committed by GitHub
parent 899e637bda
commit e218550447
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 9 deletions

View File

@ -245,16 +245,9 @@ def esp32_create_combined_bin(source, target, env):
esp32_fetch_safeboot_bin(tasmota_platform)
flash_size = env.BoardConfig().get("upload.flash_size", "4MB")
flash_freq = env.BoardConfig().get("build.f_flash", "40000000L")
flash_freq = str(flash_freq).replace("L", "")
flash_freq = str(int(int(flash_freq) / 1000000)) + "m"
flash_mode = env.BoardConfig().get("build.flash_mode", "dio")
memory_type = env.BoardConfig().get("build.arduino.memory_type", "qio_qspi")
flash_mode = env["__get_board_flash_mode"](env)
flash_freq = env["__get_board_f_flash"](env)
if flash_mode == "qio" or flash_mode == "qout":
flash_mode = "dio"
if memory_type == "opi_opi" or memory_type == "opi_qspi":
flash_mode = "dout"
cmd = [
"--chip",
chip,