Hi,
I have a requirement to do in ESP32,
I want to split 4MB of flash into 2MB+2MB, for code section and file system.
In file system, I want to download files from cloud(internet) and store it. And need to read/write during esp32 running and able send the file to internet when ever required.
Guide me how to implement this in ESP32.
I am using eclipse with tool chain linked with ESP-IDF.
Storing file in ESP32 file system
Re: Storing file in ESP32 file system
Hi,eaglehack wrote:Hi,
I have a requirement to do in ESP32,
I want to split 4MB of flash into 2MB+2MB, for code section and file system.
In file system, I want to download files from cloud(internet) and store it. And need to read/write during esp32 running and able send the file to internet when ever required.
Guide me how to implement this in ESP32.
I am using eclipse with tool chain linked with ESP-IDF.
First of all, you need to use custom partition for SPI Flash Partition in which you can define your partitions for your application and file system whatever you want to use.
So, execute "make menuconfig" command and select "Partition Table ---> Partition Table (Factory app, two OTA definitions) ---> ( ) Custom partition table CSV" and provide name of csv file whatever you want to create as per your requirement.
This way you can split 4MB SPI Flash into 2MB+2MB in which first 2 MB (Not exactly as some of KBytes are used for Boot Loader and other configurations) is for your application image while next 2 MB is for you file system which you want.
There are some variant to use File System for ESP32 but i prefer to use SPIFFS file which is same as Linux File System created using Virtual File System and SPIFFS.
So, Please have look below Repository in which SPIFFS file system has been used and well tested till now.
https://github.com/loboris/ESP32_TFT_library
Let me know if you need any other help regarding partition and SPIFFS.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Storing file in ESP32 file system
Thank you, I will try sample code referred and update.
Re: Storing file in ESP32 file system
Thank you Ritesh, I will run referred code by you and update
Who is online
Users browsing this forum: Bing [Bot] and 84 guests