Skip to content

Add ESP32-S3 build support - #241

Open
jichaowang02-lang wants to merge 1 commit into
dchristl:devfrom
jichaowang02-lang:esp32s3-dev
Open

Add ESP32-S3 build support#241
jichaowang02-lang wants to merge 1 commit into
dchristl:devfrom
jichaowang02-lang:esp32s3-dev

Conversation

@jichaowang02-lang

Copy link
Copy Markdown

What

Adds an esp32s3 PlatformIO env so the firmware builds for the ESP32-S3, which currently has no prebuilt binary or build config (only the original ESP32 / nRF are shipped).

Why it needs more than a new board line

The S3 (Xtensa LX7) differs from the original ESP32 (LX6) and won't build cleanly with defaults:

  • CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y — the firmware uses the legacy BLE 4.2 advertising API (esp_ble_gap_start_advertising / esp_ble_gap_config_adv_data_raw / esp_ble_gap_stop_advertising). The S3 doesn't compile these in by default (the original ESP32 does), so linking fails with undefined reference without it.
  • CONFIG_ESPTOOLPY_FLASHSIZE_4MB=ywith_key.csv's key partition ends at 0x210000 (~2.06 MB), which overflows the default 2 MB flash size.

esp32dev is untouched — it keeps using its existing sdkconfig.esp32dev, so this only affects the new S3 env.

Tested

Built with PlatformIO and flashed to an ESP32-S3 (rev v0.2, 16 MB flash); it advertises and gets located on the Find My network. Note the S3 bootloader flashes at 0x0 (not 0x1000).

Prebuilt S3 binaries + a full flashing guide (download mode, offsets, gotchas) here: https://github.com/jichaowang02-lang/macless-haystack-esp32s3

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).
Copilot AI review requested due to automatic review settings July 10, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial PlatformIO support for building the ESP-IDF firmware for ESP32-S3 by introducing a new esp32s3 environment and providing S3-oriented sdkconfig defaults to enable legacy BLE advertising APIs and a larger flash size.

Changes:

  • Added firmware/ESP32/sdkconfig.defaults to enable legacy BLE 4.2 advertising support and set flash size to 4MB.
  • Added a new PlatformIO environment [env:esp32s3] targeting esp32-s3-devkitc-1.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
firmware/ESP32/sdkconfig.defaults Adds ESP32-S3-oriented sdkconfig defaults (BLE legacy API + flash size).
firmware/ESP32/platformio.ini Adds a new PlatformIO env for ESP32-S3 builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +20 to +24
[env:esp32s3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = espidf
monitor_speed = 115200
Comment on lines +1 to +3
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants