Framework-arduinoespressif32 @ 3.20003.0 (2.0.3) breaks bootloader file name resolution

Platform IO 6.0.1

platform = espressif32 @ ^4
board = esp-wrover-kit
framework = arduino
platform_packages = 

Having a strange problem with framework-arduinoespressif32 version 3.20003.0 (2.0.3). It seems the bootloader path can no longer be found when uploading a newly built firmware to a esp-wrover-kit:

esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: 'C:\\Users\\x\\.platformio\\packages\\framework-arduinoespressif32\\tools\\sdk\\esp32\\bin\\bootloader__40m.bin'

Right away it looks as though the “dio” is missing from the filename. I checked boards.txt and see build.boot is being set, and also tried adding build_board_boot=dio to my platformio.ini and do not see it trickling down to the esptool call.

I noticed in /.platformio/packages/framework-arduinoespressif32/tools has some new logic that might be causing the issue:

def get_bootloader_image(variants_dir):
    variant_bootloader = join(
        variants_dir, env.BoardConfig().get("build.variant", ""), "bootloader.bin"
    return (
        if isfile(variant_bootloader)
        else join(

whereas versions prior to 3.20003 do not use this method and instead use:

        ("0x1000", join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "bin", "bootloader_${BOARD_FLASH_MODE}_${__get_board_f_flash(__env__)}.bin")),
        ("0x8000", join(env.subst("$BUILD_DIR"), "partitions.bin")),
        ("0xe000", join(FRAMEWORK_DIR, "tools", "partitions", "boot_app0.bin"))

which works.

I also noticed doesn’t match the sources in github nor could I find any references to “__get_board_boot_mode” in github, causing some further head scratching.

Unfortunately I actually need this newer version as it fixes a problem with tls handshake timeouts when reconnecting, but the bootloader image file name is not being constructed as expected. I’ve also reviewed the platform migration notes for 5 to 6 but don’t see an obvious issue related to that.

Any clues as to what I’m missing?


Good find, please file an issue at Issues · platformio/platform-espressif32 · GitHub.

1 Like

Thank you for the guidance. Filed to Framework-arduinoespressif32 @ 3.20003.0 (2.0.3) breaks bootloader file name resolution · Issue #810 · platformio/platform-espressif32 · GitHub