Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Arbitrary file in the FS

    Scheduled Pinned Locked Moved Discussion
    buildfirmwarefile system
    3 Posts 2 Posters 785 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      danielm
      last edited by

      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.

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @danielm
        last edited by

        @danielm You could put you config parameters in a Python script and just import it.

        1 Reply Last reply Reply Quote 0
        • D Offline
          danielm
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0

          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
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom