- Wed Jul 31, 2019 1:44 am
#83289
Code: Select allDoes flashing a SPIFFS image to 0x300000 automagically configure the ESP8266 to use the 4M/1M SPIFFS scheme?
don't thinks so ...
not having IDF you will have to make sure that the image is coherent with the spiffs config (into code)
I'm using SPIFFS with nonos_sdk and this is my partition table config:
Code: Select all// esp8266 partition table
#if ((SPI_FLASH_SIZE_MAP == 0) || (SPI_FLASH_SIZE_MAP == 1))
#error "The flash map is not supported"
#elif (SPI_FLASH_SIZE_MAP == 2)
...
#define SYSTEM_PARTITION_RF_CAL_ADDR 0xfb000
...
#elif (SPI_FLASH_SIZE_MAP == 3)
...
#define SYSTEM_PARTITION_RF_CAL_ADDR 0x1fb000
...
#elif (SPI_FLASH_SIZE_MAP == 4)
...
#define SYSTEM_PARTITION_RF_CAL_ADDR 0x3fb000
...
#elif (SPI_FLASH_SIZE_MAP == 5)
...
#define SYSTEM_PARTITION_RF_CAL_ADDR 0x1fb000
...
#elif (SPI_FLASH_SIZE_MAP == 6)
...
#define SYSTEM_PARTITION_RF_CAL_ADDR 0x3fb000
...
#else
#error "The flash map is not supported"
#endif
// esp8266 data partition
#if ((SPI_FLASH_SIZE_MAP == 0) || (SPI_FLASH_SIZE_MAP == 1))
#error "There is no room for spiffs"
#elif (SPI_FLASH_SIZE_MAP == 2)
#error "There is no room for spiffs"
#elif (SPI_FLASH_SIZE_MAP == 3)
#define SYSTEM_PARTITION_DATA 0x101000
#elif (SPI_FLASH_SIZE_MAP == 4)
#define SYSTEM_PARTITION_DATA 0x101000
#elif (SPI_FLASH_SIZE_MAP == 5)
#error "There is no room for spiffs"
#elif (SPI_FLASH_SIZE_MAP == 6)
#define SYSTEM_PARTITION_DATA 0x201000
#else
#error "The flash map is not supported"
#endif
// SPIFFS partition
#define FS_START SYSTEM_PARTITION_DATA
#define FS_END SYSTEM_PARTITION_RF_CAL_ADDR
// SPIFFS config
{
spiffs_config.phys_size = FS_END - FS_START;
spiffs_config.phys_addr = FS_START;
}
so the 3M spiffs partition start at 0x101000
while the 1M spiffs partition start at 0x201000
I'm assuming that Arduino and PlatformIO are using the same offsets (or very close) but you'll need to make sure looking for the spiffs_config into their code
I'm not used with spiffsgen.py and I don't know if you need to specify the initial image offset
but according to
IDF documentation you can also use mkspiffs to create the image
using mkspiffs you'll need to specify the starting offset of the image
hope this will help you
https://github.com/quackmore