Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Am I using mkspiffs correctly ? #78

Open
BugRaptor opened this issue Jan 13, 2021 · 1 comment
Open

Am I using mkspiffs correctly ? #78

BugRaptor opened this issue Jan 13, 2021 · 1 comment

Comments

@BugRaptor
Copy link

Not sure I'm doing right using mkspiffs...

Any help appreciated.

I'm trying to use mkspiffs (0.2.3) to create an image .bin file for Arduino ESP8266 Sketch Data to be uploaded on a WeMos D1 R1 Arduino Development board (4MB Flash) with selected FlashSize: 4M (FS: 1M OTA:~1019KB)

The /data folder only contains files of total size ~50kB and uploading this sketch data from the Arduino IDE works fine.

I built the spiffs.bin file with the following parameters:

mkspiffs -p 256 -b 8192 -s 0x0FB000 -c data/ spiffs.bin

Two things appear strange to me:

  1. When I update the board using ESPhttpUpdate from this spiffs.bin file, it fails (with error "Not enough space")

  2. If I try to list the content of the generated .bin file with mkspiffs -l spiffs.bin I get the following result:
    >mkspiffs -l spiffs.bin
    SPIFFS mount failed with error: -10025
    error: failed to mount image

(Same result with mkspiffs -i spiffs.bin to visualize the image)

What am I doing wrong ?

Note: If I upload the Sketch Data folder from the Arduino IDE "ESP8266 Sketch Data Upload" I get the following output:
[SPIFFS] data : C:\Users...\data
[SPIFFS] size : 1000
[SPIFFS] page : 256
[SPIFFS] block : 8192
/ColorPicker.html
/config.json
/DisplayOptions.html
/index.html
/style.css
/TimezoneSelection.html
[SPIFFS] upload : C:\Users...spiffs.bin
[SPIFFS] address : 0x300000
[SPIFFS] reset : --before default_reset --after hard_reset
[SPIFFS] port : COM5
[SPIFFS] speed : 921600
[SPIFFS] python : C:\Users...\python3.exe
[SPIFFS] uploader : C:\Users...\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\tools\upload.py

esptool.py v2.8
Serial port COM5
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 24:a1:60:30:2c:8d
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1024000 bytes to 17074...
Wrote 1024000 bytes (17074 compressed) at 0x00300000 in 4.2 seconds (effective 1929.4 kbit/s)...
Hash of data verified.

@olegos76
Copy link

https://docs.espressif.com/projects/esp-idf/en/v4.1.1/api-reference/storage/spiffs.html#mkspiffs
Block Size: 4096 (standard for SPI Flash)
Page Size: 256 (standard for SPI Flash)

I think esp8266 using the same way as esp32, so try Block size 4096 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants