Arbitrary file in the FS
-
Is it possible to include arbitrary file in the File System located on the Flash during firmware build process?
In my case I would like to include json file with config parameters of my application.
I tried to put it into "esp32/frozen" as "_config.json" but it did not make it into the built firmware. This folder is probably intended only for Python scripts.
-
@danielm You could put you config parameters in a Python script and just import it.
-
@robert-hh
I was thinking about that however I am not aware of a straightforward way how individual parameters could be updated by the application. The script would be frozen anyway.I was also thinking to move all parameters to NVS however the config also contains few strings which are not directly supported by the NVS right now.
I think that the best solution will be to put default parameter values into Python script which will be frozen during build process. After boot it will be tested if NVS contains "init" flag and if not an initialization method will be called. Within this method individual parameters will be loaded from Python script to a dictionary which will then be dumped into json file stored in the internal file system. This will happen only during first boot after last firmware flashing.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login