Using SDMMC in custom bootloader (ESP32-WROOM)
Posted: Fri Apr 26, 2024 10:01 pm
Hello,
I should preface that what I intend to do might not be the easiest way to achieve my goal, so if you have better ideas feel free to chime in.
I have a custom board based on an ESP32-WROOM module. I was thinking of a really cheap way to update the firmware and I thought about using an sd-card for that. I would like to make a custom bootloader that checks if an SD card is present, mounts it, checks if a new main application binary is present and, in that case, flashes it to the SPI flash, then loads the main application.
I have seen in the Espressif documentation that the bootloader does not see the various components offered by ESP-IDF for the main application, and indeed if I try to include SDMMC related headers in bootloader_components/bootloader_start.c I get an error as the files are not found.
What would be the necessary steps to enable SDMMC access within my custom bootloader? or are there better ways to achieve my ultimate goal of updating the firmware through an SD card?
I should preface that what I intend to do might not be the easiest way to achieve my goal, so if you have better ideas feel free to chime in.
I have a custom board based on an ESP32-WROOM module. I was thinking of a really cheap way to update the firmware and I thought about using an sd-card for that. I would like to make a custom bootloader that checks if an SD card is present, mounts it, checks if a new main application binary is present and, in that case, flashes it to the SPI flash, then loads the main application.
I have seen in the Espressif documentation that the bootloader does not see the various components offered by ESP-IDF for the main application, and indeed if I try to include SDMMC related headers in bootloader_components/bootloader_start.c I get an error as the files are not found.
What would be the necessary steps to enable SDMMC access within my custom bootloader? or are there better ways to achieve my ultimate goal of updating the firmware through an SD card?