Hello,
I'd like to use in a (new) project with ESP32 (4 MB Flash and 4 MB PSRAM) and ESP-IDF 4.2 resources (binary files of up to 200 kB in size), which would be loaded after the reset from the flash via access to a "fatfs" Partition first into PSRAM and then passed via SPI to an other device.
1. I have created a partition table and entered it in "menuconfig". It all works so far.
2. From the manual I know how to (later) access the file system or the “fatfs” partition in order to read these files.
But nowhere does the manual say how to load the files onto the file system or onto the partition. Neither in the API reference nor in the API guides (at least in version 4.2 they are very sketchy). I can't recognize any "instructions" in the examples either. I don't "speak" python! I can read and understand it but I can't "write" python!
Would someone please explain how to do it step by step? Or where to find this information. I would be very grateful for that!
Thanks in advance,
Michael
How to fill a a flash partition with files/data
How to fill a a flash partition with files/data
Nobody is perfect!
My name is NOT Nobody...
Nobody lives forever to correct his mistakes someday in the future, if not right now!
Covid-19 is not responsible for any human failures!
My name is NOT Nobody...
Nobody lives forever to correct his mistakes someday in the future, if not right now!
Covid-19 is not responsible for any human failures!
Re: How to fill a a flash partition with files/data
Hello Michael
Great question. I don't have access to my laptop at the moment, but I believe the espressif example app for a rest API server uses a file system partition and the build config is set up to prepopulate the web page file hierarchy. Check out that example and see if that helps you along.
Great question. I don't have access to my laptop at the moment, but I believe the espressif example app for a rest API server uses a file system partition and the build config is set up to prepopulate the web page file hierarchy. Check out that example and see if that helps you along.
Re: How to fill a a flash partition with files/data
I cannot find any such example.
there is an example something with "wearble", but it shows how to access the fatfs from esp32.
I would like to fill the filessytem or the partition from the host, which will be then flashed.
Can you be more precise, which example you mean?
there is an example something with "wearble", but it shows how to access the fatfs from esp32.
I would like to fill the filessytem or the partition from the host, which will be then flashed.
Can you be more precise, which example you mean?
Nobody is perfect!
My name is NOT Nobody...
Nobody lives forever to correct his mistakes someday in the future, if not right now!
Covid-19 is not responsible for any human failures!
My name is NOT Nobody...
Nobody lives forever to correct his mistakes someday in the future, if not right now!
Covid-19 is not responsible for any human failures!
Re: How to fill a a flash partition with files/data
I believe that the only way to populate the internal flash fatfs partition is to write files from the ESP to the partition.
The fatfs filesystem is useful for reading SD-Cards connected to the ESP as these are compatible with other operating systems such as Windows.
I'm using the SPIFFS storage myself to store larger files not suited for the NVS system. These files are self-generated (ex logs) or downloaded from a http server.
The fatfs filesystem is useful for reading SD-Cards connected to the ESP as these are compatible with other operating systems such as Windows.
I'm using the SPIFFS storage myself to store larger files not suited for the NVS system. These files are self-generated (ex logs) or downloaded from a http server.
Re: How to fill a a flash partition with files/data
Hello,
because some things in esp-idf have not been thought through or implemented to the end, I had to add an SD slot to the project, which I originally didn't want.
If an SD card is inserted in it, it is scanned by code and the resource files are first transferred to the flash memory and then to the devices according to their destination.
But I don't want to have a discussion about whether and how far some things are implemented in ESP-IDF.
I have a lot of experience with ESP-IDF and with STM32-Cube (with STM32H7) to know what is professionally done and what is not.
For me, ESP32 has only three advantages: WiFi, lower power consumption and lower hardware design costs. But it also has many disadvantages ...
because some things in esp-idf have not been thought through or implemented to the end, I had to add an SD slot to the project, which I originally didn't want.
If an SD card is inserted in it, it is scanned by code and the resource files are first transferred to the flash memory and then to the devices according to their destination.
But I don't want to have a discussion about whether and how far some things are implemented in ESP-IDF.
I have a lot of experience with ESP-IDF and with STM32-Cube (with STM32H7) to know what is professionally done and what is not.
For me, ESP32 has only three advantages: WiFi, lower power consumption and lower hardware design costs. But it also has many disadvantages ...
Nobody is perfect!
My name is NOT Nobody...
Nobody lives forever to correct his mistakes someday in the future, if not right now!
Covid-19 is not responsible for any human failures!
My name is NOT Nobody...
Nobody lives forever to correct his mistakes someday in the future, if not right now!
Covid-19 is not responsible for any human failures!
Re: How to fill a a flash partition with files/data
Have a look at the protocols/http_server/restful_server example.MickPF wrote: ↑Fri Jul 02, 2021 9:53 pmI cannot find any such example.
there is an example something with "wearble", but it shows how to access the fatfs from esp32.
I would like to fill the filessytem or the partition from the host, which will be then flashed.
Can you be more precise, which example you mean?
In this example, the create a folder structure that constitutes a web site, in essence. They define a custom partition table to include an additional partition, www, which is the home for this structure. If you look inside Makefile, you'll see a call as follows, which recreates the web page file structure on the www partition.
Code: Select all
$(eval $(call spiffs_create_partition_image,www,$(WEB_SRC_DIR)/dist))
Who is online
Users browsing this forum: No registered users and 262 guests