Page 1 of 1
ESP32 files upload
Posted: Wed Jul 06, 2022 2:07 pm
by pepopi
I usually use arduino IDE and I'm starting to learn ESP-IDF. To upload files to the ESP32 fatfs or spiffs on the Arduino IDE I use the sketch uploader. How is this done on the ESP-IDF?
Thank you
Re: ESP32 files upload
Posted: Thu Jul 07, 2022 1:00 am
by ESP_Sprite
When using the command line, 'idf.py flash', usually. Best invoked as 'idf.py flash monitor' in a separate terminal to get console output. From there, you can use things like ctrl-T-ctrl-F to reflash and other fun stuff.
Re: ESP32 files upload
Posted: Mon Jul 11, 2022 7:12 am
by pepopi
Thank you, I know how to flash the ESP32. But what I mean is how can I upload files to the fatfs or spiffs. In arduino IDE that is easy with the filesystem uploader plug in. And I do not find any example of that. Do you know how to do this?
Thank you
Re: ESP32 files upload
Posted: Tue Jul 12, 2022 1:00 am
by ESP_Sprite
You do that by adding a line to the CMakeLists.txt file. What line depends on the filesystem, but
here is how you do it for fatfs.
Re: ESP32 files upload
Posted: Wed Jul 13, 2022 11:30 am
by pepopi
When running the fatfsgen example Cmake does not recognize fatfs_create_spiflash_image nor fatfs_create_rawflash_image. I'm using the 4.4.1 version. Does this happen also to you?
Thank you
Re: ESP32 files upload
Posted: Wed Jul 13, 2022 1:55 pm
by Momin786
First, you need to install the file system uploader plugin in Arduino IDE and then you can upload files. you can refer to this article:
https://microcontrollerslab.com/install ... de-spiffs/
For esp-idf, you can refer to this:
https://docs.espressif.com/projects/esp ... piffs.html
Re: ESP32 files upload
Posted: Thu Jul 14, 2022 12:41 am
by ESP_Sprite
pepopi wrote: ↑Wed Jul 13, 2022 11:30 am
When running the fatfsgen example Cmake does not recognize fatfs_create_spiflash_image nor fatfs_create_rawflash_image. I'm using the 4.4.1 version. Does this happen also to you?
How can you tell it does not recognize that? Does it spit out an error?
Re: ESP32 files upload
Posted: Thu Jul 14, 2022 8:09 am
by pepopi
Yes, it does spit out an error.
Momin, but I am using fatfs. And the link you have posted is about spiffs on esp-idf.
Re: ESP32 files upload
Posted: Fri Jul 15, 2022 2:31 am
by ESP_Sprite
Can you at least post the error, then? Are you also using ESP-IDF 4.4.1, and not only the example from that?
Re: ESP32 files upload
Posted: Tue Jul 19, 2022 9:12 am
by pepopi
I have updated to the master version and it works.
Thanks for your help