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

adapted esp idf spiffs initialization #217

Closed
wants to merge 2 commits into from

Conversation

OlliLenz
Copy link
Contributor

Hi @matth-x,

If you use more than one spiffs partition in your project, it makes sense to adjust the .base_path of the partitions so that it is not just "/".
In the current version, however, this unfortunately leads to problems when using the esp-idf:

  1. if you set the base_path to "/mo/", for example, you get an invalid argument error when initialising the spiffs partition, as the base path must not contain a slash at the end.
  2. if you set the base_path to "/mo", the initialisation works, but the file names are no longer correct because they do not begin with a "/". An attempt is then made to save /mobootstats.jsn, for example, which does not work.

For this reason, a check has been introduced which, when setting the base_path, checks whether a "/" is present at the end of the define MOCPP_FILENAME_PREFIX. If this is the case, it is only removed for the base_path. Thus, the file names in the further course are also correct.

In addition, the define MOCPP_PARTITION_LABEL was introduced. The change from the former "ao" to "mo" could lead to problems in a production environment if devices are in circulation that have partitions with the name "ao", as these cannot or should not be changed OTA without further ado.

@OlliLenz OlliLenz closed this Oct 19, 2023
@OlliLenz OlliLenz deleted the esp_spiffs_initialization branch October 19, 2023 14:07
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

Successfully merging this pull request may close these issues.

1 participant