Skip to content

[bsp][esp32-s3] add ESP32-S3-DevKitM-1 support - #11844

Open
cms19859230182-lang wants to merge 6 commits into
RT-Thread:masterfrom
cms19859230182-lang:bsp/esp32s3-devkitm-1
Open

cms19859230182-lang wants to merge 6 commits into
RT-Thread:masterfrom
cms19859230182-lang:bsp/esp32s3-devkitm-1

Conversation

@cms19859230182-lang

Copy link
Copy Markdown
Contributor

拉取/合并请求描述:(PR description)

为什么提交这份PR (why to submit this PR)

主仓还没有 ESP32-S3 的 BSP。这块板是 ESP32-S3-DevKitM-1,模组 ESP32-S3-MINI-1,Xtensa LX7。它不是 RISC-V,不能用 ESP32-C3 的工具链,也不能搬 C3 的中断接法。

你的解决方案是什么 (what is your solution)

新增 bsp/ESP/ESP32_S3 和 libcpu/xtensa/esp32s3。本镜像单核。UART0 在开发板标着 UART 的 USB 口上,TX GPIO43,RX GPIO44,CP210x,115200。默认打开 GPIO 和 UART0。

builtin_imgs 里是 ESP32-S3 的 bootloader 和分区表,不能换成 ESP32-C3 的。Flash 是 DIO、8MB、80MHz。应用在 0x10000。

pkgs --update 拉官方 RT-Thread-packages/esp-idf。这份包的 SConscript 只编 ESP32-C3,S3 的源文件由 idf_components/SConscript 从包里挑。工具链是 xtensa-esp32s3-elf GCC 12.2.0(esp-12.2.0_20230208)。

共享改动:

  • libraries/drivers/Kconfig:SoC 收进 choice,默认仍是 ESP32-C3,新增 ESP32-S3 和 DevKitM-1。
  • board.c:S3 的节拍中断只加 tick。向量里已经做过 enter/leave。启动时关掉两个核的 systimer stall,并只留 level-1。
  • sdkconfig.h:S3 转去包含 sdkconfig_s3.h。

中断看门狗默认关掉。IDF 用自己的向量喂 TG1WDT,这份 BSP 换了向量。不关的话,启动大约 300 ms 后以 rst:0x8 (TG1WDT_SYS_RST) 复位。

GPIO、I2C、SPI、ADC、PWM、Wi-Fi、BLE、板载灯和片内 8MB PSRAM 都还没在板上测,README 里写的是待支持。

现有 ESP 的 CI 工具链是 riscv32-esp-elf,编不了这颗 Xtensa,所以没有把本 BSP 挂进 ALL_BSP_COMPILE.json。

在 ESP32-S3-DevKitM-1 上用 xtensa-esp32s3-elf GCC 12.2.0 烧过默认镜像:

  • 能进 msh。help、version、ps、free 有回应。version 是 5.3.1。
  • 隔开再执行 ps,left tick 从 0x08 变到 0x0a。
  • free:total 76704,used 12192,available 64512。
  • ps 里 timer 和 main 的 error 列是 EINTRPT。shell 仍有回应,节拍仍在走。

请提供验证的bsp和config (provide the config and bsp)

  • BSP: bsp/ESP/ESP32_S3

  • .config: 默认打开 GPIO 和 UART0。I2C、SPI、ADC、PWM、Wi-Fi、BLE 关闭。

  • action:

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用clang-format 源码格式化工具确保格式符合RT-Thread代码规范 This PR has been formatted with clang-format and complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

UART0 reaches msh on the DevKitM-1. help, version, ps and free answer, and the tick keeps moving. GPIO and the other peripherals are not checked on the board.
@github-actions github-actions Bot added BSP BSP: ESP32 BSP related with ESP libcpu labels Sep 28, 2026
@github-actions

Copy link
Copy Markdown

👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread!

为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。
To ensure your code complies with RT-Thread's coding style, please run the code formatting workflow by following the steps below (If the formatting of CI fails to run).


🛠 操作步骤 | Steps

  1. 前往 Actions 页面 | Go to the Actions page
    点击进入工作流 → | Click to open workflow →

  2. 点击 Run workflow | Click Run workflow

  • Use workflow from 保持默认分支(通常为 master)
    Keep the default branch (usually master) in Use workflow from
  • 在 branch 输入框填写 PR 分支 bsp/esp32s3-devkitm-1
    Enter PR branch bsp/esp32s3-devkitm-1 in the branch field
  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将作为独立提交推送至你的分支。
    The formatting changes will be pushed to your branch as a separate commit.

完成后,提交将自动更新至 bsp/esp32s3-devkitm-1 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the bsp/esp32s3-devkitm-1 branch automatically, and the related Pull Request will be updated.

如有问题欢迎联系我们,再次感谢您的贡献!💐
If you have any questions, feel free to reach out. Thanks again for your contribution!

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The format check wants these files aligned to the repository style.
The D6 workaround only rewrote packages/CH32V20x-SDK-for-RTT.
riscv-none clones libraries/ch32v20x_sdk-latest, so Exit() still ran
and dist/project was never created.
@github-actions github-actions Bot added the BSP: WCH BSP related with WCH label Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

📌 Code Review Assignment

🏷️ Tag: workflow

Reviewers: @Rbb666 @kurisaW @supperthomas

Changed Files (Click to expand)
  • .github/ALL_BSP_COMPILE.json
  • .github/workflows/bsp_buildings.yml
  • .github/workflows/manual_bsp_build.yml
  • .github/workflows/manual_dist.yml
  • .github/workflows/manual_trigger_scons_except_STM32_all.yml
  • .github/workflows/manual_trigger_update_all.yml

📊 Current Review Status (Last Updated: 2026-09-29 10:10 CST)


📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

The BSP matrix only installed the RISC-V toolchain. Add xtensa-esp32s3-elf
and point the manual all-BSP job at bsp/ESP/ESP32_S3.
@github-actions github-actions Bot added action github action yml imporve tools labels Sep 28, 2026
pkgs --update-force names the shim FreeRTOS_Wrapper-latest and puts
ESP-IDF in bsp/ESP/libraries. The SConscripts only looked under
packages/FreeRTOS-Wrapper-latest and packages/ESP-IDF-latest.
@Rbb666

Rbb666 commented Sep 28, 2026

Copy link
Copy Markdown
Member
image

@cms19859230182-lang 编译还有点问题,相关的软件包依赖没有添加

@cms19859230182-lang

Copy link
Copy Markdown
Contributor Author
image

@cms19859230182-lang 编译还有点问题,相关的软件包依赖没有添加

好的,稍等一下,我回去就开始改。

@cms19859230182-lang

Copy link
Copy Markdown
Contributor Author
image @cms19859230182-lang 编译还有点问题,相关的软件包依赖没有添加

等一下,这个bug我改好了,你引用的是我在21:36的commit。不过我在commit完以后就意识到了问题,所以我在21:52的时候就又commit了一份上去,你康康

@cms19859230182-lang

Copy link
Copy Markdown
Contributor Author

@Rbb666

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action github action yml imporve BSP: ESP32 BSP related with ESP BSP: WCH BSP related with WCH BSP libcpu tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants