SuperHouse / esp-open-rtos

Open source FreeRTOS-based ESP8266 software framework
BSD 3-Clause "New" or "Revised" License
1.53k stars 491 forks source link

SPIFFS on Wemos D1 Mini #673

Closed weswitt closed 6 years ago

weswitt commented 6 years ago

Trying to get SPIFFS working on a Wemos D1 Mini. These boards have 4meg of flash, 3meg for code/data and 1meg for SPIFFS. Using SPIFFS with the Arduino IDE on the board works.

The problem is getting the SPIFFS bin flashed to the board correctly.

My makefile looks like this:

PROGRAM=tempsensor EXTRA_COMPONENTS = extras/i2c extras/bmp180 extras/paho_mqtt_c extras/spiffs extras/sntp ESPPORT = /dev/ttyUSB0 FLASH_SIZE = 4 SPIFFS_BASE_ADDR = 0x300000 SPIFFS_SIZE = 0x19000 SPIFFS_SINGLETON = 1 include /home/wesw/dev/esp8266/esp-open-rtos/common.mk $(eval $(call make_spiffs_image,files))

When I run "make flash" I get the following:

esptool.py v1.2 Connecting... Running Cesanta flasher stub... Flash params set to 0x0000 Writing 4096 @ 0x0... 4096 (100 %) Wrote 4096 bytes at 0x0 in 0.4 seconds (90.1 kbit/s)... Writing 4096 @ 0x1000... 4096 (100 %) Wrote 4096 bytes at 0x1000 in 0.4 seconds (90.1 kbit/s)... Writing 282624 @ 0x2000... 282624 (100 %) Wrote 282624 bytes at 0x2000 in 24.4 seconds (92.8 kbit/s)... WARNING: Unlikely to work as data goes beyond end of flash. Hint: Use --flash_size Writing 102400 @ 0x300000... 102400 (100 %) Wrote 102400 bytes at 0x300000 in 8.8 seconds (92.8 kbit/s)... Leaving...

The ESPTOOL says that the SPIFFS image is being flashed beyond the end of the flash. Strange because the 0x300000 address is not beyond the end.

Can someone tell me how to use SPIFFS with this board and ESP Open RTOS??

weswitt commented 6 years ago

This appears to be caused by the fact that esp open rtos has an ancient version of esptool. Using the current (v2.5) of esptool works properly.