Skip to content

[bsp][esp32-c3] match IRAM wildcards on Windows paths - #11847

Open
cms19859230182-lang wants to merge 2 commits into
RT-Thread:masterfrom
cms19859230182-lang:bsp/esp32c3-windows-ld
Open

cms19859230182-lang wants to merge 2 commits into
RT-Thread:masterfrom
cms19859230182-lang:bsp/esp32c3-windows-ld

Conversation

@cms19859230182-lang

@cms19859230182-lang cms19859230182-lang commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • ESP32-C3 sections.ld wildcards used /, so Windows object paths missed riscv\interrupt.o.
  • _global_interrupt_handler stayed in flash. The vector JAL could not reach it (relocation truncated to fit: R_RISCV_JAL).
  • Directory separators inside those wildcards are now ?, which matches both / and \. Comments are unchanged.
  • The three bt globs are *bt[/\\]* instead. A bare ? also matches libbtdm.
  • Same linker script as [bsp][ESP32_C3] match Windows GNU ld object paths in IRAM globs #11816, redone on current master.

Test plan

  • ESP32-C3 default config, Windows, GCC 11.2.0: scons exit 0. rtthread.bin is 463568 bytes, text is 389484. _global_interrupt_handler is at 0x40388efc in iram0_0_seg. BSP_USING_GPIO and BSP_USING_UART stay on. SPI stays off.
  • Same tree with RT_USING_SPI, BSP_USING_SPI and BSP_USING_SPI2 added: scons exit 0. rtthread.bin is 487280 bytes. The link includes drv_spi.o. spi_bus_initialize is passed SPI_DMA_CH_AUTO (3). Restoring rtconfig.h returns the 463568-byte image.
  • After the bt glob change, the default image was linked again: still 463568 bytes, text 389484, handler still at 0x40388efc.
  • ESP32-C6 default image is still 445408 bytes. With SPI selected it is still 466400 bytes, text 371334.
  • Not flashed.

Object paths on Windows use backslashes, so the forward-slash globs left _global_interrupt_handler in flash and the vector JAL could not reach it.
@github-actions github-actions Bot added BSP BSP: ESP32 BSP related with ESP labels Sep 29, 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/esp32c3-windows-ld
    Enter PR branch bsp/esp32c3-windows-ld 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/esp32c3-windows-ld 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the bsp/esp32c3-windows-ld 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!

A question mark matches any one character, so *bt?* also matches libbtdm. Restrict that separator to a slash.
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

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

BSP: ESP32 BSP related with ESP BSP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant