Choose the correct binary
Arduino IDE
- Select the production Board, Flash Size, and Partition Scheme.
- Open Sketch → Export Compiled Binary.
- Locate the generated file ending in
.merged.bin. - Open Dashboard → Firmware → Upload Firmware.
- Enable As Master Firmware Fleet and upload the
.merged.binfile.
.bin file. Keep that application-only file for OTA updates.
PlatformIO
PlatformIO normally produces.pio/build/<environment>/firmware.bin as an application-only image. For fresh boards, merge the exact bootloader, partition table, boot application data, and application images produced by the selected environment.
Generate it automatically from platformio.ini
Add a post-build script to the production environment:
scripts/merge_firmware.py in the PlatformIO project:
FLASH_EXTRA_IMAGES and ESP32_APP_OFFSET, so it follows the selected board instead of assuming every ESP32 variant uses the same bootloader offset.
Generate it manually
Replaceesp32dev-factory with the production environment name from your platformio.ini.
First, confirm the image offsets:
esptool write-flash command. Bootloader offsets can differ between ESP32 variants, so do not reuse offsets from another board.
Then merge the images:
For a classic ESP32 build whose upload command uses 0x1000, 0x8000, 0xe000, and 0x10000, run:
firmware.bin for OTA releases.