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>
65 lines
1.6 KiB
Text
65 lines
1.6 KiB
Text
# SPAXEL Firmware Configuration Defaults
|
|
# Target: ESP32-S3
|
|
|
|
# Chip target
|
|
CONFIG_IDF_TARGET="esp32s3"
|
|
|
|
# Flash size — partitions.csv requires ~3.9MB (factory 1.9MB + ota_0 1.9MB + otadata)
|
|
# Using 4MB as minimum supported flash. Safe on 16MB boards: spi_flash only panics
|
|
# when physical < header, not when physical > header.
|
|
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
|
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
|
|
|
# WiFi CSI Configuration
|
|
CONFIG_ESP_WIFI_RX_BCN_ADAPT=y
|
|
CONFIG_ESP_WIFI_RX_BCN_ADAPT_THRESHOLD=10
|
|
|
|
# Enable CSI
|
|
CONFIG_ESP_WIFI_CSI_ENABLED=y
|
|
|
|
# WiFi power save disabled for stable CSI
|
|
CONFIG_PM_ENABLE=n
|
|
|
|
# FreeRTOS configuration for dual-core
|
|
CONFIG_FREERTOS_UNICORE=n
|
|
|
|
# BLE configuration
|
|
CONFIG_BT_ENABLED=y
|
|
CONFIG_BT_BLUEDROID_ENABLED=y
|
|
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
|
|
CONFIG_BT_BLE_RPA_SUPPORTED=y
|
|
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
|
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
|
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
|
|
|
# Increase main task stack for WiFi/BLE operations
|
|
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
|
|
|
# WebSocket buffer sizes
|
|
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=n
|
|
CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH=n
|
|
|
|
# Log levels
|
|
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
|
|
CONFIG_LOG_MAXIMUM_LEVEL_DEBUG=y
|
|
|
|
# Watchdog configuration
|
|
CONFIG_ESP_TASK_WDT_INIT=n
|
|
|
|
# mDNS
|
|
CONFIG_MDNS_MAX_SERVICES=10
|
|
|
|
# NVS
|
|
CONFIG_NVS_ENCRYPTION=n
|
|
|
|
# OTA — dual-partition rollback support
|
|
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
|
|
CONFIG_BOOTLOADER_APP_ROLLBACK_COUNT=1
|
|
CONFIG_APP_ROLLBACK_ENABLE=y
|
|
|
|
# Increase partition sizes for OTA
|
|
CONFIG_PARTITION_TABLE_CUSTOM=y
|
|
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
|
|
|
# LED identification blink
|
|
CONFIG_SPAXEL_LED_GPIO=8
|