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

Missing option to generate and flash external spiffimg (GIT8266O-833) #1257

Open
Asanga-Viraj opened this issue Oct 26, 2023 · 2 comments
Open

Comments

@Asanga-Viraj
Copy link

In IDF for ESP32, there is an option to generate external project folder into spiffimg.bin and flash it to ESP32 chip. Can use following line in cmakelist.txt inside the main.c folder.

spiffs_create_partition_image(storage ../data FLASH_IN_PROJECT)

ESP8266, this command is not working and I couldn't find any option to do it. Is there a way exists?

@github-actions github-actions bot changed the title Missing option to generate and flash external spiffimg Missing option to generate and flash external spiffimg (GIT8266O-833) Oct 26, 2023
@praveens-git
Copy link

Are there any updates on this?

@AMKrol
Copy link

AMKrol commented Mar 13, 2024

I don't see any similar function in SDK, but...

You can use a mkspiffs project.

  1. All its need is to compile the project with the parameters:
make dist CPPFLAGS="-DSPIFFS_OBJ_NAME_LEN=32 -DCONFIG_SPIFFS_META_LENGTH=4 -DSPIFFS_USE_MAGIC=1 -DSPIFFS_USE_MAGIC_LENGTH=1 -DSPIFFS_ALIGNED_OBJECT_INDEX_TABLES=4" BUILD_CONFIG_NAME=-custom
  1. Next create the partition image from files in directory (e.g. data folder)
./mkspiffs -p 256 -b 4096 -s 458752 -d 5 -c ./data ./spiffs.bin
  1. Upload image to the ESP8266 to data storage partition:
esptool.py --port /dev/ttyUSB0 write_flash 0x90000 /app/spiffs.bin

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

3 participants