Skip to content

Conversation

MuChenger
Copy link
Contributor

@MuChenger MuChenger commented Sep 23, 2025

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

[

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

  • xuantie系列bsp可以以bsp导入rt-studio进行开发

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

  • 添加rt-studio工程需要的cdt文件

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

  • BSP:e902,e906,e907,c906.c907,c908,c910,r908,r910,r920

]

当前拉取/合并请求的状态 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/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

@github-actions github-actions bot added the BSP label Sep 23, 2025
@Rbb666 Rbb666 requested a review from Copilot September 23, 2025 08:25
Copy link
Contributor

@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 adds RT-Thread Studio project support for the xuantie BSP series by adding the necessary configuration files for Eclipse CDT integration. This enables developers to import these BSPs directly into RT-Studio for development.

  • Adds RT-Studio project configuration files (.project, .settings, projcfg.ini)
  • Updates Kconfig files to use proper environment variable syntax for RT-Studio compatibility
  • Adds pre-include header files (rtconfig_preinc.h) with platform-specific macro definitions

Reviewed Changes

Copilot reviewed 51 out of 60 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Multiple rtconfig_preinc.h files Auto-generated header files with platform-specific macro definitions for RT-Thread configuration
Multiple Kconfig files Updated configuration syntax from assignment to proper Kconfig format for RT-Studio compatibility
Multiple .project files Eclipse CDT project configuration files for RT-Studio integration
Multiple .settings/*.ini and .prefs files RT-Studio specific project settings and preferences
bsp/xuantie/xiaohui/r910/rtconfig.py Updated path reference for tools directory
bsp/xuantie/xiaohui/c908/rtconfig.py Removed Chinese comment

#define CONFIG_SYSTICK_HZ 100
#define CONFIG_VIC_TSPDR 201326592
#define CONFIG_XIP 1
#define DCONFIG_CPU_XUANTIE_C906FD 1
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Bug/错误: Missing 'C' prefix in macro name. Should be 'CONFIG_CPU_XUANTIE_C906FD' not 'DCONFIG_CPU_XUANTIE_C906FD'.

中文:宏定义名称缺少'C'前缀。应该是'CONFIG_CPU_XUANTIE_C906FD'而不是'DCONFIG_CPU_XUANTIE_C906FD'。

Suggested change
#define DCONFIG_CPU_XUANTIE_C906FD 1
#define CONFIG_CPU_XUANTIE_C906FD 1

Copilot uses AI. Check for mistakes.

import sys
cwd_path = os.getcwd()
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Bug/错误: Incorrect path construction. Using '../tools' with dirname(BSP_ROOT) creates an invalid path. Should be 'tools' instead of '../tools'.

中文:路径构造错误。在dirname(BSP_ROOT)基础上使用'../tools'会创建无效路径。应该使用'tools'而不是'../tools'。

Suggested change
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))

Copilot uses AI. Check for mistakes.

Copy link
Member

@Rbb666 Rbb666 Sep 25, 2025

Choose a reason for hiding this comment

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

@MuChenger 这个文件不用提交上来,这个是studio自动生成的

Copy link
Member

Choose a reason for hiding this comment

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

rtconfig_preinc.h文件如果想要bsp导入studio后直接编译的话,其实还是需要保留的,否则用户就必须先执行一遍scons同步生成rtconfig_preinc.h,看从用户使用便利性的角度要不要保留吧(有些用户并不懂为什么会有个libc的报错是因为要先执行scons同步后生成宏定义)

@kurisaW kurisaW closed this Sep 23, 2025
@kurisaW kurisaW reopened this Sep 23, 2025
@supperthomas
Copy link
Member

后续可以论坛或者文档中心中,加一些文档如何使用。或者doc中加一些说明如何使用。

@supperthomas supperthomas merged commit cb4a370 into RT-Thread:master Sep 28, 2025
81 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.

4 participants