Skip to content

Add example for ESP-IDF + SPIFFS usage #472

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

Closed
maxgerhardt opened this issue Jan 23, 2021 · 0 comments
Closed

Add example for ESP-IDF + SPIFFS usage #472

maxgerhardt opened this issue Jan 23, 2021 · 0 comments

Comments

@maxgerhardt
Copy link
Contributor

Per https://community.platformio.org/t/unable-to-build-and-upload-spiffs-filesystem-image-with-framework-esp-idf/17820.

Users are confused since out-of-the-box for a newly generated ESP-IDF project, the "Build Filesystem Image" task fails without any meaningful error messages.

Only using the Espressif docs you can figure out that you need to set a custom partition table in ESP-IDF (and PlatformIO) and use spiffs_create_partition_image(spiffs data) in the CMakeLists.txt of the project root, then "Build Filesystem Image" and "Upload Filesystem Image" will work and do the right thing, that is turn the files in the data/ folder of the project into a SPIFFS image and upload it.

The code seems to be slightly confusing here, too. E.g.,

MKSPIFFSTOOL="mkspiffs_${PIOPLATFORM}_" + ("espidf" if "espidf" in env.subst(
"$PIOFRAMEWORK") else "${PIOFRAMEWORK}"),

explicitly recognizes ESP-IDF and changes the MKSPIFFSTOOL accordingly. But in the end, when the buildfs target is executed, it is going into the CMake build system and ESP-IDF does it's own thing I guess? Or does it read what we put in the MKSPIFFSTOOL env variable?

In any case, an example project espidf-spiffs or something would guide users to the right path when they want to do the same thing as they do in Arduino-ESP32 without any configuration.

@valeros valeros closed this as completed in 55f50dc Feb 4, 2021
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

1 participant