Add ESP32-S3 build support - #241
Open
jichaowang02-lang wants to merge 1 commit into
Open
Conversation
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).
There was a problem hiding this comment.
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.defaultsto enable legacy BLE 4.2 advertising support and set flash size to 4MB. - Added a new PlatformIO environment
[env:esp32s3]targetingesp32-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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an
esp32s3PlatformIO 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 withundefined referencewithout it.CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y—with_key.csv's key partition ends at0x210000(~2.06 MB), which overflows the default 2 MB flash size.esp32devis untouched — it keeps using its existingsdkconfig.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(not0x1000).Prebuilt S3 binaries + a full flashing guide (download mode, offsets, gotchas) here: https://github.com/jichaowang02-lang/macless-haystack-esp32s3