Flash Firmware to ESP32 Device
Flash compiled firmware to an ESP32 device. Flashing runs natively (not in container).
Parse Arguments
$ARGUMENTS may contain:
- Project name (first word)
- Serial port (second word, or auto-detected)
Available Projects
robocar-mainormain,robocar-camorcamwebserver,i2s-audiooraudio,telegramkids-audio,xbox,wifitest
Port Auto-Detection
Ports are auto-detected by tools/esp32.just:
- USB-serial adapters (CH340/CP2102):
ls /dev/cu.usbserial-* - ESP32-S3 native USB: detected by Espressif VID
0x303a - Override with:
PORT=/dev/... just <module>::flash
Flash Commands
Based on $ARGUMENTS:
robocar-main:just robocar::flash-mainrobocar-cam:just robocar::flash-camwebserver:just webserver::flashi2s-audio:just i2s-audio::flashtelegram:just telegram::flashkids-audio:just kids-audio::flashxbox:just xbox::flashwifitest:just wifitest::flash
ESP32-CAM Note
For ESP32-CAM projects (robocar-cam, webserver, i2s-audio, telegram):
- Remind the user: "Connect GPIO0 to GND before flashing"
- After successful flash: "Disconnect GPIO0 from GND and reset the device"
Error Handling
If flashing fails:
- Check if port exists and is accessible
- Suggest checking USB connection
- For permission errors, suggest:
sudo chmod 666 /dev/xxx