1

I am using ESP8266 Arduino with SPIFFS to store configuration settings.

This command is used for flashing the binary firmware.bin into ESP8266 for Arduino.

esptool.exe -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf firmware.bin

This command is used for flashing the binary firmware.nin into ESP8266 using the SMING framework.

esptool.exe -p COM3 -b 115200 write_flash -ff 40m -fm dio -fs 4m 0x00000 0x00000.bin 0x09000 0x09000.bin 0x44000 spiff_rom.bin

There are some puzzling aspects in the command used for Arduino flash download.

  • Why isn't there a separate bin file for SPIFFS for Arduino? I noticed the tool "mkspiffs.exe" in esp8266\tools\mkspiffs folder is not used during compilation of the bin file. Why is it not used?

  • How does Arduino esptool know which address to use for allocating to SPIFFS file system address?

I would like to understand the process of programming binary file as I encountered strange behavior with SPIFFS with ESP8266 Arduino. I have no problem with similar firmware using SMING framework. I am wondering if the problem is caused by how the firmware is being flashed into ESP8266 using esptool.

mpromonet
  • 11,326
  • 43
  • 62
  • 91
guagay_wk
  • 26,337
  • 54
  • 186
  • 295

1 Answers1

0

I am using Eclise Arduino IDE. When you create a new project, you get to specify -how big is the code area and SPIFFS area. For example, for NodeMCU board which is using 4MB flash, I choose 1MB code/3MB SPIFFS. This is how arduino esptool knows the starting address of SPIFFS.

In SMING, the starting address of SPIFFS is manually specified.

guagay_wk
  • 26,337
  • 54
  • 186
  • 295