🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Accessing SPIFFS independently of loading program

    Arduino
    2
    3
    3.9k
    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.
    • H
      Hamnet
      last edited by

      I have some questions about SPIFFS.

      I think I understand how to access it from within my program (theoretically, I haven't tried this). But I've a couple of theoretical questions, and one practical one:

      Do the contents survive hard reset?
      Do the contents survive uploading new software?

      My interest is in using it to store font files for use on M5Paper. I've seen examples referencing a font file on SPIFFS. My practical question is how they get there! Is there a way to store data on SPIFFS independently of the program I upload. That is, can I upload some font files; and then access them regardless of the programs I'm uploading? Or does each program have to first download the font file from somewhere, store it on SPIFFS, so it can then access it?

      (Or do I need to write a program to load a file on to SPIFFS, run that, then overwrite it with the program that will use those files?)

      Apologies if this is covered somewhere in docs, I couldn't see it.

      TIA

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @Hamnet

        SPIFFS is just a chunk of the flash that has been put aside.

        • yes, its content survive a hard reset. (E.g. pressing the reset button or power loss.)
        • yes, its content survive uploading new firmware as long as the new firmware uses the same partition scheme. (Meaning the chunk of flash put aside is still at the same location in the flash.)
        • no, its content does not survive if you erase the flash chip.

        I also found these two tutorials which might help you:

        • for PlatformIO
        • for Arduino

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • H
          Hamnet
          last edited by

          @felmue Thank you so much Felix, you've helped me again.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post