[esp32] Fix platformio flash size print (#12099)

Co-authored-by: J. Nick Koston <nick+github@koston.org>
This commit is contained in:
Jonathan Swoboda
2025-11-25 11:14:53 -05:00
committed by GitHub
parent c30b920193
commit cdf27f1447

View File

@@ -854,6 +854,10 @@ def _configure_lwip_max_sockets(conf: dict) -> None:
async def to_code(config):
cg.add_platformio_option("board", config[CONF_BOARD])
cg.add_platformio_option("board_upload.flash_size", config[CONF_FLASH_SIZE])
cg.add_platformio_option(
"board_upload.maximum_size",
int(config[CONF_FLASH_SIZE].removesuffix("MB")) * 1024 * 1024,
)
cg.set_cpp_standard("gnu++20")
cg.add_build_flag("-DUSE_ESP32")
cg.add_define("ESPHOME_BOARD", config[CONF_BOARD])