Skip to content

Commit 7605dc1

Browse files
Only set flashmode byte when uploading an executable (#6891)
Fixes #6880 The updater was patching in the proper flashmode configuration byte for all uploads, apps and filesystems. This ended up corrupting one byte on every FS upload. Change updated to only patch theflashmode if it is doing an app.
1 parent 1189417 commit 7605dc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/Updater.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ bool UpdaterClass::_writeBuffer(){
329329
bool modifyFlashMode = false;
330330
FlashMode_t flashMode = FM_QIO;
331331
FlashMode_t bufferFlashMode = FM_QIO;
332-
if (_currentAddress == _startAddress + FLASH_MODE_PAGE) {
332+
if ((_currentAddress == _startAddress + FLASH_MODE_PAGE) && (_command == U_FLASH)) {
333333
flashMode = ESP.getFlashChipMode();
334334
#ifdef DEBUG_UPDATER
335335
DEBUG_UPDATER.printf_P(PSTR("Header: 0x%1X %1X %1X %1X\n"), _buffer[0], _buffer[1], _buffer[2], _buffer[3]);

0 commit comments

Comments
 (0)