From f9812840664362a5901b15b6aa5478190b7ada6f Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Thu, 30 May 2019 18:28:22 -0300 Subject: [PATCH 1/2] 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 (https://github.com/esp8266/Arduino/pull/5511) --- sonoff/settings.ino | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sonoff/settings.ino b/sonoff/settings.ino index 246b503b5..f2bf1290e 100644 --- a/sonoff/settings.ino +++ b/sonoff/settings.ino @@ -235,11 +235,20 @@ extern "C" { } #include "eboot_command.h" -extern "C" uint32_t _SPIFFS_end; +#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) +extern "C" uint32_t _SPIFFS_end; // From libraries/EEPROM/EEPROM.cpp EEPROMClass const uint32_t SPIFFS_END = ((uint32_t)&_SPIFFS_end - 0x40200000) / SPI_FLASH_SEC_SIZE; +#else // Core > 2.5.2 and STAGE + +extern "C" uint32_t _FS_end; +// From libraries/EEPROM/EEPROM.cpp EEPROMClass +const uint32_t SPIFFS_END = ((uint32_t)&_FS_end - 0x40200000) / SPI_FLASH_SEC_SIZE; + +#endif + // Version 4.2 config = eeprom area const uint32_t SETTINGS_LOCATION = SPIFFS_END; // No need for SPIFFS as it uses EEPROM area // Version 5.2 allow for more flash space From 712ea8ec43241c022a05d46854fc14d9389c39e0 Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Thu, 30 May 2019 18:32:07 -0300 Subject: [PATCH 2/2] Add support to Stage Arduino Core --- sonoff/_changelog.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index e0bc4395a..8f3b232d7 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -3,6 +3,7 @@ * Fix missing white channel for WS2812 (#5869) * Add reset of Energy values when connection to sensor is lost for over 4 seconds (#5874, #5881) * Work-around for Philips Hue emulation issue (#5849) + * Add support to Stage Arduino Core (next 2.6.0) * * 6.5.0.12 20190521 * Add AriLux RF control GPIO option "ALux IrSel" (159) replacing "Led4i" (59) for full LED control (#5709)