Skip to content

bsp: k230: increase object name max length to 16 #10612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2025

Conversation

unicornx
Copy link
Contributor

@unicornx unicornx commented Aug 18, 2025

Fixes: 62f3fb4: fix(kernel)/improve(utest):fix the legacy issue related to the length of the object name version #10537

补丁生效后,如果对象名称长度超过 (RT_NAME_MAX - 1),RTT 会在运行时断言并抛出错误如下,但在构建期间不会检查这个错误。

[E/kernel.obj] Object name hwtimer0 exceeds RT_NAME_MAX=8, consider increasing RT_NAME_MAX.
(obj_name_len <= RT_NAME_MAX - 1) assertion failed at function:rt_object_init, line number:404

旧的 k230 的 RT_NAME_MAX 长度为 8,而某些对象名称(例如“hwtimer0”)的名称长度为 8,违反了新规则。

更新 k230 bsp 的配置,将 RT_NAME_MAX 从8 增加到 16,这对于 k230 来说应该足够长了。

小问题:运行 scons --menuconfig 后只修改了 RT_NAME_MAX 但保存后发现改了很多处地方,但都是一些 注释的,感觉应该不会有影响。

@github-actions github-actions bot added the BSP label Aug 18, 2025
Copy link

github-actions bot commented Aug 18, 2025

📌 Code Review Assignment

🏷️ Tag: bsp_k230

Reviewers: unicornx

Changed Files (Click to expand)
  • bsp/k230/.config
  • bsp/k230/rtconfig.h

📊 Current Review Status (Last Updated: 2025-08-18 15:03 CST)

  • unicornx Pending Review

📝 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.

@unicornx unicornx requested a review from Rbb666 August 18, 2025 03:15
Fixes: 62f3fb4: fix(kernel)/improve(utest):fix the legacy issue related to the length of the object name version RT-Thread#10537

After this patch, if length of object name exceeds (RT_NAME_MAX - 1),
RTT will assert and oops when runing, but not in period of building.
Though I don't think it's a good solution, but don't want to argue more
about this.

Old RT_NAME_MAX is 8 for k230, and some object names, such as
"hwtimer0", which name length is 8, breaking the new rule.

Just update configuration of k230 bsp and increase RT_NAME_MAX from
8 to 16, which should be long enough for k230.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
@Rbb666 Rbb666 merged commit 2bcb33b into RT-Thread:master Aug 18, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants