An open source bootloader for the ESP8266 logo

An open source bootloader for the ESP8266

Free

Flexible open source boot loader for ESP8266

FreeFree tier
Type
Open Source

About An open source bootloader for the ESP8266

rBoot is an open source boot loader for the ESP8266 microcontroller, designed as a flexible replacement for the proprietary binary blob supplied with the Espressif SDK. Written in C, it supports up to 256 roms with variable sizes, allows testing multiple roms to find a valid backup without resetting, and enables flash layout changes on the fly. Key advantages include GPIO support for rom selection, zero stack waste (the SDK loader uses 144 bytes), a documented config structure for easy editing from user code, and checksum validation of the .irom0.text section. Limitations arise from the ESP8266's hardware: only 8Mbits (1MB) of flash can be mapped to memory, and individual roms must not straddle an 8Mbit boundary; support for larger flash (>8Mbit) is disabled by default and requires additional configuration. Building requires the gcc xtensa cross compiler and esptool2, while installation involves writing rboot.bin to the first sector of the flash, after which it creates its own config at the start of sector two.

Key Features

Open source (written in C)
Supports up to 256 roms
Variable size roms
Able to test multiple roms to find a valid backup without resetting
Flash layout can be changed on the fly
GPIO support for rom selection
Wastes no stack space (SDK boot loader uses 144 bytes)
Documented config structure for easy editing from user code
Can validate .irom0.text section with checksum
Temporary next-boot rom selection

Pros & Cons

Pros
  • Open source allows full customization and inspection
  • Support for many roms (up to 256) with variable sizes
  • No stack overhead compared to the SDK boot loader
  • GPIO selection enables hardware-based rom switching
  • Ability to validate rom integrity with checksum
Cons
  • Each rom limited to 1MB due to 8Mbit flash mapping
  • Roms cannot straddle 8Mbit boundaries, restricting layout flexibility
  • Support for flash larger than 8Mbit requires additional manual steps
  • Building requires gcc xtensa cross compiler and esptool2

Best For

Custom firmware development for ESP8266Multi-rom boot systems with backup/fallback capabilityIoT devices requiring flexible flash layoutEmbedded systems development with ESP8266

FAQ

How many roms can rBoot support?
Up to 256 roms, with variable sizes, subject to flash capacity and 8Mbit boundary constraints.
What are the main limitations of rBoot?
The ESP8266 can only map 8Mbits (1MB) of flash to memory, so individual roms cannot exceed 1MB and must not straddle an 8Mbit boundary. Default support for using more than the first 8Mbit of flash is disabled and requires extra steps.
How do I install rBoot?
Write rboot.bin to the first sector of the flash. On first run, rBoot creates its own configuration at the start of sector two for a simple two-rom system. Then write your roms to addresses 0x2000 and (half chip size + 0x2000), e.g., for 8Mbit flash: esptool.py write_flash -fs 8m 0x0000 rboot.bin 0x2000 user1.bin 0x82000 user2.bin.