Skip to content

[Bug] GD32系列生成cmake代码 #10182

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

Closed
ThinkCodeStudio opened this issue Apr 11, 2025 · 4 comments
Closed

[Bug] GD32系列生成cmake代码 #10182

ThinkCodeStudio opened this issue Apr 11, 2025 · 4 comments

Comments

@ThinkCodeStudio
Copy link
Contributor

RT-Thread Version

5.2.0

Hardware Type/Architectures

GD32

Develop Toolchain

Other

Describe the bug

尝试了

  • gd32303c-start
  • gd32407v-lckfb

都报同一个错误

scons --target=cmake
scons: Reading SConscript files ...
Newlib version: 4.1.0
Update setting files for CMakeLists.txt...
AttributeError: 'CLVar' object has no attribute 'replace':
  File "E:\_rtthread\rt-thread-5.2.0\bsp\gd32\arm\gd32303c-start\SConstruct", line 60:
    DoBuilding(TARGET, objs)
  File "E:\_rtthread\rt-thread-5.2.0\tools\building.py", line 873:
    EndBuilding(target, program)
  File "E:\_rtthread\rt-thread-5.2.0\tools\building.py", line 982:
    GenTargetProject(program)
  File "E:\_rtthread\rt-thread-5.2.0\tools\building.py", line 946:
    CMakeProject(Env, Projects, GetOption('project-name'))
  File "E:\_rtthread\rt-thread-5.2.0\tools\cmake.py", line 341:
    GenerateCFiles(env, project, project_name)
  File "E:\_rtthread\rt-thread-5.2.0\tools\cmake.py", line 65:
    CFLAGS = env['CFLAGS'].replace('\\', "/").replace('\"', "\\\"")

Other additional context

No response

@ThinkCodeStudio
Copy link
Contributor Author

windows 11 平台
ConEmu 230724

@ThinkCodeStudio
Copy link
Contributor Author

SConstruct文件中的 CCFLAGS -> CFLAGS

env = Environment(tools = ['mingw'],
    AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
    # CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
    CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
    AR = rtconfig.AR, ARFLAGS = '-rc',
    CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
    LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)

@kaidegit
Copy link
Contributor

bsp的问题吗,直接提一个pr呗

ThinkCodeStudio added a commit to ThinkCodeStudio/rt-thread that referenced this issue Apr 15, 2025
@ThinkCodeStudio
Copy link
Contributor Author

提交了, 第一次提交PR, 大佬见谅

supperthomas pushed a commit that referenced this issue Apr 17, 2025
修复 #10182 GD32生成Cmake工程错误的问题
illustriousness pushed a commit to illustriousness/rt-thread that referenced this issue Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants