ESP32 files upload

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

ESP32 files upload

Postby pepopi » Wed Jul 06, 2022 2:07 pm

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

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 files upload

Postby ESP_Sprite » Thu Jul 07, 2022 1:00 am

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.

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

Re: ESP32 files upload

Postby pepopi » Mon Jul 11, 2022 7:12 am

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

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 files upload

Postby ESP_Sprite » Tue Jul 12, 2022 1:00 am

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.

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

Re: ESP32 files upload

Postby pepopi » 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?
Thank you

Momin786
Posts: 13
Joined: Mon Jul 11, 2022 7:52 am
Contact:

Re: ESP32 files upload

Postby Momin786 » Wed Jul 13, 2022 1:55 pm

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
I create ESP32 tutorials and Projects using ESP-IDF https://esp32tutorials.com/

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 files upload

Postby ESP_Sprite » Thu Jul 14, 2022 12:41 am

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?

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

Re: ESP32 files upload

Postby pepopi » Thu Jul 14, 2022 8:09 am

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.

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 files upload

Postby ESP_Sprite » Fri Jul 15, 2022 2:31 am

Can you at least post the error, then? Are you also using ESP-IDF 4.4.1, and not only the example from that?

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

Re: ESP32 files upload

Postby pepopi » Tue Jul 19, 2022 9:12 am

I have updated to the master version and it works.
Thanks for your help

Who is online

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