Store static file in flash

xxRizinxx
Posts: 3
Joined: Tue Apr 25, 2017 8:37 pm

Re: Store static file in flash

Postby xxRizinxx » Tue Apr 25, 2017 8:43 pm

Enable this in spiffs_config.h and you can open, read ans write your File.

SPIFFS_ALIGNED_OBJECT_INDEX_TABLES

jakkubu
Posts: 4
Joined: Thu Mar 16, 2017 11:18 am

Re: Store static file in flash

Postby jakkubu » Mon Aug 07, 2017 7:13 am

I'm currently working with SPIFFS and had a problem with making it work. The issue was caused by different SPIFFS version in LUA source https://github.com/whitecatboard/Lua-RT ... s/spiffs.h and in mkspiffs https://github.com/igrr/mkspiffs/.

Solution: updating spiffs in mkspiffs source (and re-enabling SPIFFS_TEST_VISUALISATION in new spiffs_config.h).

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: Store static file in flash

Postby mikemoy » Thu Sep 13, 2018 9:43 pm

I have been bouncing back and forth between ESP32-IDF and arduino-esp32
I have have started playing with SPIFFS, and have my app showing the files I have uploaded.
I am using PlatformIO, and they have a neat feature where you create a "data" folder, and chuck whatever files you want in there.
Then you run the following commands, and it will upload them to the EPS32.
platformio run --target buildfs
platformio run --target uploadfs

I wanted to create this same app using ESP32-IDF. I have hit a wall, in searching for a way to upload the files.
I read about mkspiffs, and created the .bin file. What I am curious about is can I use ESP32 download tool, to upload the .bin file, and if so what is the start of the SPIFFS address. I have tried 0x10000 & 0x110000, and when I run my app its still showing the old files, not the new ones.

What is the preferred way to upload files ?

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: Store static file in flash

Postby snahmad75 » Wed Sep 19, 2018 7:57 pm

kolban wrote:Yes sir. The following tool from igrr can be used to build a "SPIFFS" image from a local file system:

https://github.com/igrr/mkspiffs

Once built, this can then be "flashed" using esptool.py to the flash space that we are using for SPIFFs storage. For example, I am using 1MByte of storage for my SPIFFs area located at offset 3*1024*1024 to 4*1024*1024-1. I haven't gotten around to making up a partition table definition to "reserve" that space for SPIFFs and am "just using it" but as long as my app bin doesn't tread on it, I've been ok so far.

Hello sir,
Kindly give example how can i use this program to write to my spi flash partition at given starting address. I need to write one text file via serial/comport from windows machine. Can i use esp tool as well command line. ideally i want to do using c/c++ function call.

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: Store static file in flash

Postby snahmad75 » Thu Sep 20, 2018 8:56 am

Hello sir,

Can Any one give me example to uploading/ writing any data file or write key value on nvs partition after I do make flash to upload my code into OTA partition using any command line program. I saw before some one was uploading into fatfs flash partition web files using command line. Can esptool do this job.

Who is online

Users browsing this forum: Bing [Bot] and 100 guests