Skip to content

Commit 9013bac

Browse files
committed
[build] Changes from SPIFFS to FS letscontrolit#2482
Core 2.6.x has changed _SPIFFS_* to _FS_* See letscontrolit#2482
1 parent 3438ce9 commit 9013bac

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

platformio.ini

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ build_flags = -D BUILD_GIT='"${sysenv.TRAVIS_TAG}"'
8989
-DPUYA_SUPPORT=1
9090
-DCORE_POST_2_5_0
9191

92+
[esp82xx_2_6_x]
93+
build_flags = ${esp82xx_2_5_x.build_flags} -DCORE_POST_2_6_0
94+
9295

9396
[core_2_3_0]
9497
platform = https://github.com/TD-er/platform-espressif8266.git#patch/v1.5.0_Puya
@@ -120,9 +123,10 @@ build_flags = ${esp82xx_2_5_x.build_flags}
120123
121124
build_flags = ${esp82xx_2_5_x.build_flags}
122125

126+
123127
[core_stage]
124128
platform = https://github.com/platformio/platform-espressif8266.git#feature/stage
125-
build_flags = ${esp82xx_2_5_x.build_flags}
129+
build_flags = ${esp82xx_2_6_x.build_flags}
126130

127131

128132
[core_esp32_0_12_0]

src/ESPEasy-Globals.h

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <stddef.h>
1414

15-
namespace std
15+
namespace std
1616
{
1717
using ::ptrdiff_t;
1818
using ::size_t;
@@ -582,10 +582,18 @@ bool showSettingsFileLayout = false;
582582
extern "C" {
583583
#include "spi_flash.h"
584584
}
585-
extern "C" uint32_t _SPIFFS_start;
586-
extern "C" uint32_t _SPIFFS_end;
587-
extern "C" uint32_t _SPIFFS_page;
588-
extern "C" uint32_t _SPIFFS_block;
585+
#ifdef CORE_POST_2_6_0
586+
extern "C" uint32_t _FS_start;
587+
extern "C" uint32_t _FS_end;
588+
extern "C" uint32_t _FS_page;
589+
extern "C" uint32_t _FS_block;
590+
#else
591+
extern "C" uint32_t _SPIFFS_start;
592+
extern "C" uint32_t _SPIFFS_end;
593+
extern "C" uint32_t _SPIFFS_page;
594+
extern "C" uint32_t _SPIFFS_block;
595+
#endif
596+
589597
#ifdef FEATURE_MDNS
590598
#include <ESP8266mDNS.h>
591599
#endif

src/ESPEasyStorage.ino

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,8 +856,14 @@ int SpiffsSectors()
856856
{
857857
checkRAM(F("SpiffsSectors"));
858858
#if defined(ESP8266)
859-
uint32_t _sectorStart = ((uint32_t)&_SPIFFS_start - 0x40200000) / SPI_FLASH_SEC_SIZE;
860-
uint32_t _sectorEnd = ((uint32_t)&_SPIFFS_end - 0x40200000) / SPI_FLASH_SEC_SIZE;
859+
#ifdef CORE_POST_2_6_0
860+
uint32_t _sectorStart = ((uint32_t)&_FS_start - 0x40200000) / SPI_FLASH_SEC_SIZE;
861+
uint32_t _sectorEnd = ((uint32_t)&_FS_end - 0x40200000) / SPI_FLASH_SEC_SIZE;
862+
#else
863+
uint32_t _sectorStart = ((uint32_t)&_SPIFFS_start - 0x40200000) / SPI_FLASH_SEC_SIZE;
864+
uint32_t _sectorEnd = ((uint32_t)&_SPIFFS_end - 0x40200000) / SPI_FLASH_SEC_SIZE;
865+
#endif
866+
861867
return _sectorEnd - _sectorStart;
862868
#endif
863869
#if defined(ESP32)

0 commit comments

Comments
 (0)