diff --git a/README.md b/README.md index 6ce4360..060d14e 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,29 @@ In VS Code the PlatformIO status bar does the same: | Upload | `Ctrl+Alt+U` | | Serial monitor | `Ctrl+Alt+S` | -The binary is written to `.pio/build/esp32dev/firmware.bin`. +#### Build output + +Everything is written to the hidden `.pio/build/esp32dev/` directory: + +``` +.pio/build/esp32dev/ +├── firmware.bin # application image (the file you flash / ship via OTA) +├── bootloader.bin # ESP32 bootloader +├── partitions.bin # partition table +├── firmware.elf # ELF with debug symbols +├── firmware.map # linker map +└── src/ # compiled objects for main.cpp and victron_ble.cpp +``` + +- `.pio/` is gitignored, so build artefacts are never committed. +- `pio run -t upload` flashes all three images automatically at the usual + offsets: `bootloader.bin` at `0x1000`, `partitions.bin` at `0x8000`, + `firmware.bin` at `0x10000`. +- For OTA updates or a manual `esptool.py` write, `firmware.bin` is the image + you need. +- `firmware.elf` is used to decode crash backtraces, e.g. + `xtensa-esp32-elf-addr2line -pfiaC -e .pio/build/esp32dev/firmware.elf `, + or with PlatformIO's exception decoder in the serial monitor. #### Build notes