Skip to main content

How to Flash Firmware

Flashing firmware writes new program code to your microcontroller flash memory.

ESP32 / ESP8266 (esptool)

pip install esptool
esptool.py --port /dev/ttyUSB0 --baud 921600 write_flash 0x0 firmware.bin

Hold BOOT, press RESET, release BOOT to enter download mode.

Arduino (avrdude)

avrdude -c arduino -p atmega328p -P COM3 -b 115200 -U flash:w:firmware.hex:i

Or just: Arduino IDE → Sketch → Upload.

Raspberry Pi Pico (RP2040)

  1. Hold BOOTSEL while plugging in USB
  2. Drag .uf2 file onto the RPI-RP2 drive
  3. Auto-reboots with new firmware

Meshtastic (Web Flasher)

Go to flasher.meshtastic.org, select device, click Flash.

Troubleshooting

SymptomFix
Permission deniedsudo usermod -a -G dialout $USER
Chip not detectedEnter bootloader mode (BOOT + RESET)
Bad USB cableUse data-capable cable, not charge-only