From 6fc03cfb04a008c0caf0ef1334d0cd32c6accf55 Mon Sep 17 00:00:00 2001 From: jichao wang Date: Fri, 10 Jul 2026 17:33:57 +0100 Subject: [PATCH] Add ESP32-S3 build support The S3 (Xtensa LX7) needs a separate env plus sdkconfig options the original ESP32 (LX6) enables by default: - CONFIG_BT_BLE_42_FEATURES_SUPPORTED: firmware uses the legacy BLE 4.2 advertising API, not built into the S3 by default (undefined-reference link errors otherwise) - CONFIG_ESPTOOLPY_FLASHSIZE_4MB: with_key.csv key partition ends at 0x210000, overflowing the default 2MB flash size esp32dev is unaffected (keeps its own sdkconfig.esp32dev). --- firmware/ESP32/platformio.ini | 7 +++++++ firmware/ESP32/sdkconfig.defaults | 9 +++++++++ 2 files changed, 16 insertions(+) create mode 100644 firmware/ESP32/sdkconfig.defaults diff --git a/firmware/ESP32/platformio.ini b/firmware/ESP32/platformio.ini index be03b171..6bf83b97 100644 --- a/firmware/ESP32/platformio.ini +++ b/firmware/ESP32/platformio.ini @@ -16,3 +16,10 @@ monitor_speed = 115200 board_build.partitions = with_key.csv + +[env:esp32s3] +platform = espressif32 +board = esp32-s3-devkitc-1 +framework = espidf +monitor_speed = 115200 +board_build.partitions = with_key.csv diff --git a/firmware/ESP32/sdkconfig.defaults b/firmware/ESP32/sdkconfig.defaults new file mode 100644 index 00000000..d9155cd5 --- /dev/null +++ b/firmware/ESP32/sdkconfig.defaults @@ -0,0 +1,9 @@ +# ESP32-S3 needs these enabled explicitly (the original ESP32 has them on by default): +# - legacy BLE 4.2 advertising API used by the firmware +# - 4MB flash so with_key.csv's key partition (ends at 0x210000) fits +CONFIG_BT_ENABLED=y +CONFIG_BT_BLUEDROID_ENABLED=y +CONFIG_BT_BLE_ENABLED=y +CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y +CONFIG_BT_BLE_50_FEATURES_SUPPORTED=y +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y