Skip to content

Fixed an error by running scons --tartget=cmake under LINUX, #10113 #10164

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
Apr 13, 2025

Conversation

starry-m
Copy link
Contributor

@starry-m starry-m commented Apr 1, 2025

…ciated issue #10113

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

[
修复在linux下面使用scons生成cmake报错的问题
修改cmake.py中的CXXFLAGS

  • BSP:bsp/at32/at32a403a-start
  • .config:不需要修改
  • 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
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查

@github-actions github-actions bot added the tools label Apr 1, 2025
@CLAassistant
Copy link

CLAassistant commented Apr 1, 2025

CLA assistant check
All committers have signed the CLA.

@supperthomas
Copy link
Member

请用命令git commit --amend --no-edit --author="User Name <[email protected]>" 修改下作者信息为github,并且签署CLA

@starry-m
Copy link
Contributor Author

starry-m commented Apr 2, 2025

感谢你的提醒!我按照你提供的方法尝试了下。不知道现在有没有满足要求

@supperthomas supperthomas requested a review from Copilot April 2, 2025 10:17
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a reported error when running "scons --target=cmake" under Linux by modifying the handling of CXXFLAGS in tools/cmake.py.

  • Replaces direct replacement on env['CXXFLAGS'] with a join operation before processing.
  • Adjusts flag formatting to avoid escape issues.

@@ -64,7 +64,8 @@ def GenerateCFiles(env, project, project_name):

CFLAGS = env['CFLAGS'].replace('\\', "/").replace('\"', "\\\"")
if 'CXXFLAGS' in dir(rtconfig):
CXXFLAGS = env['CXXFLAGS'].replace('\\', "/").replace('\"', "\\\"")
cflag_str=''.join(env['CXXFLAGS'])
Copy link
Preview

Copilot AI Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of ''.join() assumes that env['CXXFLAGS'] is an iterable of strings. If env['CXXFLAGS'] is already a string, this can lead to unexpected behavior. Consider validating the type before joining or using a type conversion method that properly handles both strings and lists.

Suggested change
cflag_str=''.join(env['CXXFLAGS'])
if isinstance(env['CXXFLAGS'], str):
cflag_str = env['CXXFLAGS']
else:
cflag_str = ''.join(env['CXXFLAGS'])

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@supperthomas supperthomas merged commit 7c39352 into RT-Thread:master Apr 13, 2025
56 checks passed
Lin-Chengqiu pushed a commit to Lin-Chengqiu/rt-thread that referenced this pull request Apr 14, 2025
add RT_THREAD_CTRL_SET_PRIORITY

add RT_THREAD_CTRL_SET_PRIORITY

doxygen: cleanup and re-org files

This patch contains two small changes, mainly to
prepare for the next step of organizing the modules
framework.

The first change: move the files related to doxygen
examples to `documentation/0.doxygen/example/`

The second change: delete `documentation/0.doxygen/mainpage.h`,
which is the mainpage of the old page. Now the new mainpage
is `documentation/INDEX.md`, so the duplicate can be
deleted.

Signed-off-by: Chen Wang <[email protected]>

[bsp/hpm5300evk]: 修复readme中的描述问题 (RT-Thread#10187)

1.bsp中描述路径boards不存在,只有board,并且路径中会包含openocd,把openocd路径去掉
2. 运行openocd发现cmsis-dap.cfg异常,使用ft2232.cfg可以正常烧入,修改readme
3. 添加download.bat脚本,方便下载

libcpu: aarch64: Fix NORMAL_NOCACHE_MEM attr (RT-Thread#10180)

Signed-off-by: Cliff Chen <[email protected]>
Signed-off-by: mouch6131 <[email protected]>
Co-authored-by: Cliff Chen <[email protected]>

Fixed an error by running scons --tartget=cmake under LINUX, RT-Thread#10113 (RT-Thread#10164)

Fixed an error by running scons --tartget=cmake under LINUX, and associated issue RT-Thread#10113
Lin-Chengqiu pushed a commit to Lin-Chengqiu/rt-thread that referenced this pull request Apr 14, 2025
add RT_THREAD_CTRL_SET_PRIORITY

add RT_THREAD_CTRL_SET_PRIORITY

doxygen: cleanup and re-org files

This patch contains two small changes, mainly to
prepare for the next step of organizing the modules
framework.

The first change: move the files related to doxygen
examples to `documentation/0.doxygen/example/`

The second change: delete `documentation/0.doxygen/mainpage.h`,
which is the mainpage of the old page. Now the new mainpage
is `documentation/INDEX.md`, so the duplicate can be
deleted.

Signed-off-by: Chen Wang <[email protected]>

[bsp/hpm5300evk]: 修复readme中的描述问题 (RT-Thread#10187)

1.bsp中描述路径boards不存在,只有board,并且路径中会包含openocd,把openocd路径去掉
2. 运行openocd发现cmsis-dap.cfg异常,使用ft2232.cfg可以正常烧入,修改readme
3. 添加download.bat脚本,方便下载

libcpu: aarch64: Fix NORMAL_NOCACHE_MEM attr (RT-Thread#10180)

Signed-off-by: Cliff Chen <[email protected]>
Signed-off-by: mouch6131 <[email protected]>
Co-authored-by: Cliff Chen <[email protected]>

Fixed an error by running scons --tartget=cmake under LINUX, RT-Thread#10113 (RT-Thread#10164)

Fixed an error by running scons --tartget=cmake under LINUX, and associated issue RT-Thread#10113

[DM/FDT] Fix garble when booting

Fix garble caused by empty implementation of earlycon series
function in driver.If driver doesn't offer earlycon_id or rt_f
dt_earlycon_id.setup function but open option, the checking
of best_earlycon_id will failed.

Signed-off-by: 1078249029 <[email protected]>

[bsp/phytium]适配rtthread5.2版本 (RT-Thread#10178)

* rtthread 5.2适配
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.

3 participants