diff --git a/builder/main.py b/builder/main.py index 3d6516787..8f1a3eb7b 100644 --- a/builder/main.py +++ b/builder/main.py @@ -425,8 +425,8 @@ def __fetch_fs_size(target, source, env): "--before", board.get("upload.before_reset", "default_reset"), "--after", board.get("upload.after_reset", "hard_reset"), "write_flash", "-z", - "--flash_mode", "keep", - "--flash_freq", "keep", + "--flash_mode", "${__get_board_flash_mode(__env__)}", + "--flash_freq", "${__get_board_f_flash(__env__)}", "--flash_size", board.get("upload.flash_size", "detect") ], UPLOADCMD='"$PYTHONEXE" "$UPLOADER" $UPLOADERFLAGS $ESP32_APP_OFFSET $SOURCE' @@ -443,8 +443,8 @@ def __fetch_fs_size(target, source, env): "--before", board.get("upload.before_reset", "default_reset"), "--after", board.get("upload.after_reset", "hard_reset"), "write_flash", "-z", - "--flash_mode", "keep", - "--flash_freq", "keep", + "--flash_mode", "${__get_board_flash_mode(__env__)}", + "--flash_freq", "${__get_board_f_flash(__env__)}", "--flash_size", board.get("upload.flash_size", "detect"), "$FS_START" ],