Esp32S3 : How to update a partition which is not a "program" partition ?
Posted: Fri Oct 27, 2023 9:53 am
Good morning,
I am working on an Esp32S3 which is on a "personnal" electronic board and I have a question for you.
My program contains the following partitions : (Extracted from the partitions.csv file)
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
storage, data, fat, , 1M,
StdAudio, data, fat, , 512K,
ota_0, app, ota_0, , 2M,
ota_1, app, ota_1, , 2M,
The ota_0 and ota_1 paritions contain the program and are updated using OTA.
The StdAudio is a partition on which audio files are "downloaded" when the firmware is flashed using USB (Via Esp-IDF).
In order to automatically put audiofiles in the "StdAudio" partition, I have created a "StdAudioFiles" folder in my project
and I have put many MP3 files in it.
Moreover, in the "CMakeLists.txt" file, I have added the following lines :
#################################################################################
# Ajout des fichiers audio standards dans la partition associƩe : #
set(StdAudioImg ../StdAudioFiles)
fatfs_create_spiflash_image(StdAudio ${StdAudioImg} FLASH_IN_PROJECT)
#################################################################################
Doing this, a StdAudio.bin files is automatically generated when the project is built (Containing the audio files) and is automatically flashed in the chip when flashing the firmware over USB via Esp-IDF. (In production)
My question is the following :
If I flash a chip with the project containing for example 5 MP3 files.
And if I add more MP3 files in my project after that.
Is there a way to update the StdAudio partitions with the new StdAudio.bin (Containing more MP3 files)
without flashing all the program over USB ?
For example, if the electronic board containing the chip has been sent to a client and he wants to update the StdAudio partition
without sending back the board.
How can I do ? How to update just one partitions (Which is not a program partition) ???
1) I think it is not possible to flash the StdAudio.bin partition OTA (Because it is a fat partition), am I right ?
2) Is there a tool/software that the client can use to only download the new StdAudio.bin file (That I can send to him) at the good address ?
3) Is there another way to proceed ? Is it possible to send the bin file over BLE to my firmware for example ? Can the firmware
erase and write some partitions on the fly (Chunk by chunk, without waiting to receive the whole partition ???).
Thank you for your help,
Waiting for your answer,
Best regards,
Thomas TRUILHE
I am working on an Esp32S3 which is on a "personnal" electronic board and I have a question for you.
My program contains the following partitions : (Extracted from the partitions.csv file)
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
storage, data, fat, , 1M,
StdAudio, data, fat, , 512K,
ota_0, app, ota_0, , 2M,
ota_1, app, ota_1, , 2M,
The ota_0 and ota_1 paritions contain the program and are updated using OTA.
The StdAudio is a partition on which audio files are "downloaded" when the firmware is flashed using USB (Via Esp-IDF).
In order to automatically put audiofiles in the "StdAudio" partition, I have created a "StdAudioFiles" folder in my project
and I have put many MP3 files in it.
Moreover, in the "CMakeLists.txt" file, I have added the following lines :
#################################################################################
# Ajout des fichiers audio standards dans la partition associƩe : #
set(StdAudioImg ../StdAudioFiles)
fatfs_create_spiflash_image(StdAudio ${StdAudioImg} FLASH_IN_PROJECT)
#################################################################################
Doing this, a StdAudio.bin files is automatically generated when the project is built (Containing the audio files) and is automatically flashed in the chip when flashing the firmware over USB via Esp-IDF. (In production)
My question is the following :
If I flash a chip with the project containing for example 5 MP3 files.
And if I add more MP3 files in my project after that.
Is there a way to update the StdAudio partitions with the new StdAudio.bin (Containing more MP3 files)
without flashing all the program over USB ?
For example, if the electronic board containing the chip has been sent to a client and he wants to update the StdAudio partition
without sending back the board.
How can I do ? How to update just one partitions (Which is not a program partition) ???
1) I think it is not possible to flash the StdAudio.bin partition OTA (Because it is a fat partition), am I right ?
2) Is there a tool/software that the client can use to only download the new StdAudio.bin file (That I can send to him) at the good address ?
3) Is there another way to proceed ? Is it possible to send the bin file over BLE to my firmware for example ? Can the firmware
erase and write some partitions on the fly (Chunk by chunk, without waiting to receive the whole partition ???).
Thank you for your help,
Waiting for your answer,
Best regards,
Thomas TRUILHE