esp32: No OTA images generated anymore since switch to cmake
For versions using an ESP IDF SDK version using gmake I used to find binary files for (almost) each partition inside the build dir (ports/esp32/build-$$BOARD$$/):
- bootloader.bin
- partitions.bin
- application.bin
- firmware.bin
It seems, though, that at least the OTA image (formerly application.bin) is missing since switching to cmake.
Given that at least the upstream supported board SIL_WESP32 also uses OTA (CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MiB-ota.csv in sdkconfig), I would have expected to also find an OTA binary image (or an equivalent) - however I can't find anything alike.
The only thing I can see is the file ports/esp32/build-$$BOARD$$/ota_data_initial.bin, which however is basically empty (well, 8KiB of 0xFF).
What's the supposedly correct way generating/obtaining OTA images with micropython v1.17 onwards?
esp32: Add bootloader rollback support for all boards.
This PR adds support for OTA rollback to the bootloader for all ESP32 builds:
- Add
CONFIG_BOOTLOADER_ROLLBACK_ENABLE=ytoports/esp32/boards/sdkconfig.baseso that all micropython esp32 images support OTA rollback in the bootloader.
With this change:
- Base micropython images for boards can be converted to OTA-capable images with app rollback support by user tools (eg. https://github.com/glenn20/mp-image-tool-esp32).
- Deployed devices can be hot-converted to OTA-enabled devices (with rollback support) be re-writing the partition table using tools, such as https://github.com/glenn20/micropython-esp32-ota.
There appears to be no detrimental impact arising rom enabling this feature in all ESP32 builds (see Espressif's App Rollback documentation).
This can also eliminate the need to build OTA variants of all esp32 boards for distribution if desired.