spaxel/firmware
jedarden d83759899f fix(firmware): redesign partition table for 4MB flash; fix flash size in esptool.js
The XMC embedded flash on ESP32-S3 (QFN56) has JEDEC ID 164020 which esptool.js
does not recognise — it returns flash size -1 causing 'File doesn't fit in
available flash' before any bytes are written.

firmware/sdkconfig.defaults:
  CONFIG_ESPTOOLPY_FLASHSIZE 16MB → 4MB
  4MB is the minimum supported flash. The spi_flash check only panics when
  physical < header, so 4MB header is safe on 16MB boards as well.

firmware/partitions.csv:
  Redesigned to fit within 4MB flash:
    factory  0x010000–0x200000  (~1.9MB, fits current 1.7MB binary + 330KB headroom)
    ota_0    0x200000–0x3F0000  (~1.9MB, A/B OTA + rollback preserved)
    otadata  0x3F0000–0x3F2000  (8KB)
  Total flash used: 0x3F2000 (98.6% of 4MB). Drops ota_1 (was at 8MB, unusable
  on 4MB devices anyway); rollback still works factory↔ota_0.

dashboard/js/onboard.js:
  flashSize: 'detect' → '4MB'  (detect returned -1 for this chip's JEDEC ID;
  hardcoding '4MB' correctly sets the binary header for all supported boards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 10:40:58 -04:00
..
main fix: support special characters in WiFi credentials 2026-04-17 08:42:20 -04:00
CMakeLists.txt feat(firmware): OTA SHA-256 verification and captive portal URL decoding 2026-03-28 19:56:11 -04:00
dependencies.lock Fix ESP-IDF 5.x firmware compilation for ESP32-S3 build 2026-04-14 15:35:03 -04:00
partitions.csv fix(firmware): redesign partition table for 4MB flash; fix flash size in esptool.js 2026-04-17 10:40:58 -04:00
sdkconfig.defaults fix(firmware): redesign partition table for 4MB flash; fix flash size in esptool.js 2026-04-17 10:40:58 -04:00