Skip to content

This repository provides 2nd stage bootloader and partition table binaries for NuttX users of ESP chips.

Notifications You must be signed in to change notification settings

almir-okato/esp-nuttx-bootloader

 
 

Repository files navigation

Build Status

Bootloader for NuttX

This repository contains build scripts for producing the binaries for the 2nd stage bootloader. There are two bootloader options:

Users of NuttX RTOS can download the binaries from release artifacts in this repository.

Downloading the latest version from Github

Binaries built from the tip of the default branch of this repository can be obtained here:

IDF bootloader

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-C3 bootloader-esp32c3.bin partition-table-esp32c3.bin

MCUboot bootloader

Chip Bootloader
ESP32 mcuboot-esp32.bin
ESP32-S2 mcuboot-esp32s2.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)

Building locally

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.

IDF bootloader

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_idfboot.sh -c <chip>

The binaries will be inside out directory.

Modifying sdkconfig or the partition table

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:

MCUboot bootloader

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.

Modifying the application slots attributes

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.

License

This repository and the binaries on the Releases page are distributed under Apache 2.0, the same as the license of ESP-IDF.

About

This repository provides 2nd stage bootloader and partition table binaries for NuttX users of ESP chips.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 98.8%
  • CMake 1.2%