This repository will no longer receive any updates. The sources necessary to build NuttX bootloaders are now available at esp-hal-3rdparty.
This repository contains build scripts for producing the binaries for the 2nd stage bootloader. There are two bootloader options:
- IDF bootloader (default option for NuttX images)
- MCUboot bootloader (for loading NuttX images built with
CONFIG_ESP32_APP_FORMAT_MCUBOOT
option)
Users of NuttX RTOS can download the binaries from release artifacts in this repository.
Binaries built from the tip of the default branch of this repository can be obtained here:
Chip | Bootloader | Partition table |
---|---|---|
ESP32 | bootloader-esp32.bin | partition-table-esp32.bin |
ESP32-S2 | bootloader-esp32s2.bin | partition-table-esp32s2.bin |
ESP32-S3 | bootloader-esp32s3.bin | partition-table-esp32s3.bin |
ESP32-C2 | bootloader-esp32c2.bin | partition-table-esp32c2.bin |
ESP32-C3 | bootloader-esp32c3.bin | partition-table-esp32c3.bin |
ESP32-C6 | bootloader-esp32c6.bin | partition-table-esp32c6.bin |
ESP32-H2 | bootloader-esp32h2.bin | partition-table-esp32h2.bin |
Chip | Bootloader |
---|---|
ESP32 | mcuboot-esp32.bin |
ESP32-S2 | mcuboot-esp32s2.bin |
ESP32-S3 | mcuboot-esp32s3.bin |
ESP32-C3 | mcuboot-esp32c3.bin |
The prebuilt bootloader image considers the following default partitioning of the chip's SPI Flash for the application slots:
Attribute | Value |
---|---|
Application Primary slot offset | 0x10000 |
Application Secondary slot offset | 0x110000 |
Application slot size | 0x100000 (1 MiB) |
Scratch slot offset | 0x210000 |
Scratch slot size | 0x40000 (256 KiB) |
Clone this repository and change to the newly created directory:
git clone https://github.com/espressif/esp-nuttx-bootloader.git
cd esp-nuttx-bootloader
Next, follow the instructions according to the bootloader choice.
It is recommended to build the binaries inside the espressif/idf
Docker image.
docker run --rm --user $(id -u):$(id -g) -v $PWD:/work -w /work espressif/idf:latest ./build_idfboot.sh -c <chip>
The binaries will be inside out
directory.
When building locally, you can customize bootloader configuration and the partition table by editing sdkconfig.defaults and partitions.csv files.
For more information about these files, refer to the following chapters of IDF Programming Guide:
First of all, make sure the MCUboot repository and its dependencies are up-to-date:
git submodule update --init mcuboot
cd mcuboot
git submodule update --init --recursive ext/mbedtls
It is recommended to build the binaries inside the espressif/idf
Docker image.
docker run --rm --user $(id -u):$(id -g) -v $PWD:/work -w /work espressif/idf:release-v4.3 ./build_mcuboot.sh -c <chip>
The binaries will be inside out
directory.
When building locally, you may customize the bootloader default attributes by editing mcuboot.conf file. Remember to mirror the customized configuration on the application firmware image.
This repository and the binaries on the Releases page are distributed under Apache 2.0, the same as the license of ESP-IDF.