API Reference

CLI commands and scripting reference for advanced users.

CLI Commands

FirmHub uses esptool.py internally. These commands can be used directly for automation.

Flash Firmware

Write firmware to flash
esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z 0x10000 firmware.bin

Erase Flash

Erase all flash memory
esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash

Read Flash

Read and backup flash contents
esptool.py --chip esp32 --port /dev/ttyUSB0 read_flash 0x0 0x400000 backup.bin

Chip Information

Get chip and flash info
esptool.py --chip esp32 --port /dev/ttyUSB0 flash_id
Port names vary by OS:
  • • Linux: /dev/ttyUSB0 or /dev/ttyACM0
  • • macOS: /dev/cu.usbserial-*
  • • Windows: COM3, COM4, etc.

Related

ScriptForge →

Automation and scripting capabilities