Add ESP32-S3 board support and build-runtime command - #136
Open
ciniml wants to merge 2 commits into
Open
Conversation
Add esp32s3 as a supported board that shares the ESP-IDF installation with esp32. The ESP32 toolchain is parameterized by chip target so each variant builds in its own directory with its own sdkconfig. Key changes: - Parameterize the ESP32 toolchain by Esp32Target (toolchain names, build directory, ROM linker scripts) - Build the runtime for esp32s3 in ports/esp32/build-esp32s3 with sdkconfig.esp32s3 generated from sdkconfig.defaults - Enable BLE 4.2 advertising API and skip Classic BT memory release on non-ESP32 targets - Disable memory protection (CONFIG_ESP_SYSTEM_MEMPROT_FEATURE) so executable RAM can be allocated on ESP32-S3 - Add NULL check in bs_memory_init() with a clear error message - Share the ESP-IDF clone between esp32 and esp32s3 setups - Add unit tests for setup, remove, and flash-runtime with esp32s3 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U2xPxvDJAipDisXeFvWoAh
Add 'bscript board build-runtime <board>' to build the runtime without flashing it. This is useful when the board is connected to a different host: build on the development machine, copy the build directory, and flash with esptool.py on the target host. - Add build-runtime.ts with the new command handler - Add abstract buildRuntime() and build() to FlashRuntimeHandler - Export FlashRuntimeHandler, ESP32FlashRuntimeHandler, and getFlashRuntimeHandler so the new command can use them - Register the command in the CLI entry point - Add unit tests and documentation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U2xPxvDJAipDisXeFvWoAh
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.
Summary
esp32,esp32s3) so each variant builds in its own directory with its own sdkconfig.bscript board build-runtimecommand to build the runtime without flashing, useful when the board is connected to a different host.CONFIG_ESP_SYSTEM_MEMPROT_FEATURE) so executable RAM can be allocated on ESP32-S3.Changes
Commit 1: Add ESP32-S3 board support (25 files)
Esp32Target(toolchain names, build directory, ROM linker scripts)esp32s3board config, project schema, and board-envesp32andesp32s3setupssdkconfig.defaultswith BLE 4.2, partition table, and memprot disabledbs_memory_init()with clear error messageesp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT)with#if CONFIG_IDF_TARGET_ESP32Commit 2: Add board build-runtime command (5 files)
build-runtime.tscommand handlerbuildRuntime()andbuild()toFlashRuntimeHandlerTest plan
npx jest cli/tests/commands/board/esp32s3.test.ts— all 8 tests pass (setup, remove, flash-runtime, build-runtime)bscript board setup esp32s3on a clean environmentbscript board build-runtime esp32s3builds successfullybscript board flash-runtime esp32s3flashes and runs on an ESP32-S3 boardesp32workflows are unaffected🤖 Generated with Claude Code
https://claude.ai/code/session_0168VKgxvuFTSxND1Wn9CdaG