Skip to content

Commit f981284

Browse files
authored
Add support for Arduino Stage Core
The actual Stage ESP8266 Core of Arduino (next 2.6.0) had changed the SPIFFS defines of the memory to FS due to a change in the libraries (esp8266/Arduino#5511)
1 parent 2641e8a commit f981284

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

sonoff/settings.ino

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,20 @@ extern "C" {
235235
}
236236
#include "eboot_command.h"
237237

238-
extern "C" uint32_t _SPIFFS_end;
238+
#if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2) || defined(ARDUINO_ESP8266_RELEASE_2_5_0) || defined(ARDUINO_ESP8266_RELEASE_2_5_1) || defined(ARDUINO_ESP8266_RELEASE_2_5_2)
239239

240+
extern "C" uint32_t _SPIFFS_end;
240241
// From libraries/EEPROM/EEPROM.cpp EEPROMClass
241242
const uint32_t SPIFFS_END = ((uint32_t)&_SPIFFS_end - 0x40200000) / SPI_FLASH_SEC_SIZE;
242243

244+
#else // Core > 2.5.2 and STAGE
245+
246+
extern "C" uint32_t _FS_end;
247+
// From libraries/EEPROM/EEPROM.cpp EEPROMClass
248+
const uint32_t SPIFFS_END = ((uint32_t)&_FS_end - 0x40200000) / SPI_FLASH_SEC_SIZE;
249+
250+
#endif
251+
243252
// Version 4.2 config = eeprom area
244253
const uint32_t SETTINGS_LOCATION = SPIFFS_END; // No need for SPIFFS as it uses EEPROM area
245254
// Version 5.2 allow for more flash space

0 commit comments

Comments
 (0)