LOGBOOK

HELP

Quiz Entry - updated: 2026.10.20

What does esptool.py -p /dev/ttyUSB0 write_flash 0x10000 image.bin do, and why is no source code or ELF file needed?

It writes the ready-made application binary image.bin into the ESP32's flash at offset 0x10000, where the bootloader expects the app. The binary already contains the compiled machine code, so neither the source nor a build is needed.

ESP32 flash map: bootloader at 0x1000, partition table at 0x8000, NVS at 0x9000, factory app at 0x10000 where image.bin is written

* Only the app region is overwritten; the rest of the layout already on the board stays. *

The parts of the command:

  • esptool.py: Espressif's serial flashing tool. It talks to the ROM bootloader over the USB-UART bridge. idf.py flash calls it in the background. (Since esptool v5 the command is esptool and the subcommand is spelled write-flash; the old names still work.)
  • -p /dev/ttyUSB0: the serial port of the board on Linux.
  • write_flash 0x10000 image.bin: write this file starting at this flash address.

Why 0x10000. ESP-IDF's default partition table puts the factory app at 0x10000 (64 KB into the flash), after the second-stage bootloader (0x1000), the partition table (0x8000) and the NVS settings area. The bootloader on the board reads the partition table and starts the app it finds there. Writing just the app replaces the program and leaves the rest intact.

Why no source or ELF. idf.py build produces both an ELF file (the program with symbols and debug information, used by debuggers and the monitor) and a .bin image (only the bytes the chip runs). Flashing needs only the .bin. This is how vendors ship firmware updates, and it is how the assignment hands out the target firmware without revealing its code.

Go deeper:

From Quiz: SIOT / Sniffing and Replaying IoT Traffic | Updated: Oct 20, 2026