Add files to FAT during building

vanBassum
Posts: 68
Joined: Sun Jan 17, 2021 11:59 am

Add files to FAT during building

Postby vanBassum » Thu Dec 15, 2022 9:36 am

Hello,

I have a project where I host an Angular application from the ESP32. This is based around this example:
https://github.com/espressif/esp-idf/tr ... le_serving

Right now, I flash the ESP32 with my project. Then I upload all the Angular files through the browser. After this I browse to the Angular application and all seems to be working fine.

The drawback of this approach is that the files have to be uploaded later. I would prefer to prepare the FAT partition during the build process, so the Angular files are contained within the image. (I flash all partitions during production, not just the OTA) This way the application is already placed on the ESP32 after the production stage. I don't want to do this in static flash, so I will still be able to change individual files through the web server later on.

Any suggestions how to achieve this?

Regards,
Bas

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Add files to FAT during building

Postby ESP_Roland » Thu Dec 15, 2022 2:25 pm

You can use the FATFS generator which is integrated into the build system: https://docs.espressif.com/projects/esp ... -generator

vanBassum
Posts: 68
Joined: Sun Jan 17, 2021 11:59 am

Re: Add files to FAT during building

Postby vanBassum » Thu Dec 15, 2022 2:33 pm

Thanks,

This seems like the tool I was looking for.

Who is online

Users browsing this forum: No registered users and 71 guests