Skip to content

[BSP] 添加GD32E230开发板适配 #10557

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

Conversation

htynkn
Copy link
Contributor

@htynkn htynkn commented Jul 28, 2025

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

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

添加GD32E230开发板BSP

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

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

  • .config:

config.txt

验证内容 备注
Uart V2 + DMA image
Uart V1 + Echo image
GPIO 点灯
I2C Soft image
SPI 没有DMA,后面有空另外提PR加
I2C HW 我发现GD32下面都是I2C软件实现,DMA实现后面加

当前拉取/合并请求的状态 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自查

@CLAassistant
Copy link

CLAassistant commented Jul 28, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added BSP BSP: GD32 BSP related with GD32 labels Jul 28, 2025
@htynkn htynkn changed the title [BSP] 添加GD32E230开发板适配 [BSP] 添加GD32E230开发板适配 [Draft/进行中的草稿] Jul 28, 2025
@kurisaW
Copy link
Member

kurisaW commented Jul 29, 2025

作者麻烦压缩一下提交,另外新增bsp可以参考该文件添加CI检测:

image

@htynkn
Copy link
Contributor Author

htynkn commented Jul 29, 2025

好的,我晚上验证下spi和其他模块,没问题我做文档、格式等的最终调整

作者麻烦压缩一下提交,另外新增bsp可以参考该文件添加CI检测:

image

@github-actions github-actions bot added the action github action yml imporve label Jul 29, 2025
Copy link

github-actions bot commented Jul 29, 2025

📌 Code Review Assignment

🏷️ Tag: workflow

Reviewers: Rbb666 kurisaW supperthomas

Changed Files (Click to expand)
  • .github/ALL_BSP_COMPILE.json

📊 Current Review Status (Last Updated: 2025-07-31 12:52 CST)

  • Rbb666 Pending Review
  • kurisaW Pending Review
  • supperthomas 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.

@htynkn htynkn force-pushed the feature/add-support-for-gd32e230c branch from 8d8ca6b to a098208 Compare July 29, 2025 03:49
@htynkn htynkn force-pushed the feature/add-support-for-gd32e230c branch from 737787b to 99e92db Compare July 29, 2025 05:47
@htynkn htynkn marked this pull request as ready for review July 29, 2025 06:07
@htynkn htynkn requested a review from supperthomas as a code owner July 29, 2025 06:07
@htynkn
Copy link
Contributor Author

htynkn commented Jul 29, 2025

Action 目前是失败的,make distribution fail

make distribution....
=> gd32e230-lckfb
=> start dist handle
=> copy gd32 bsp library
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType':
  File "/home/runner/work/rt-thread/rt-thread/bsp/gd32/arm/gd32e230-lckfb/SConstruct", line 74:
    DoBuilding(TARGET, objs)
  File "/home/runner/work/rt-thread/rt-thread/tools/building.py", line 803:
    EndBuilding(target, program)
  File "/home/runner/work/rt-thread/rt-thread/tools/building.py", line 927:
    MkDist(program, BSP_ROOT, Rtt_Root, Env, project_name, project_path)
  File "/home/runner/work/rt-thread/rt-thread/tools/mkdist.py", line 195:
    dist_handle(BSP_ROOT, dist_dir)
  File "/home/runner/work/rt-thread/rt-thread/bsp/gd32/arm/gd32e230-lckfb/rtconfig.py", line 148:
    dist_do_building(BSP_ROOT, dist_dir)
  File "/home/runner/work/rt-thread/rt-thread/bsp/gd32/arm/tools/sdk_dist.py", line 30:
    bsp_copy_files(os.path.join(library_path, rtconfig.BSP_LIBRARY_TYPE),
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/posixpath.py", line 90:
    genericpath._check_arg_types('join', a, *p)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/genericpath.py", line 152:
    raise TypeError(f'{funcname}() argument must be str, bytes, or '

但是我看所有GD32 BSP都是BSP_LIBRARY_TYPE = None,是我哪里缺了什么配置吗?

@htynkn htynkn changed the title [BSP] 添加GD32E230开发板适配 [Draft/进行中的草稿] [BSP] 添加GD32E230开发板适配 Jul 29, 2025

menu "Hardware Drivers Config"

menu "SOC Series"
Copy link
Member

Choose a reason for hiding this comment

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

这里的写法参考一下其他可以通过CI编译的GD系列bsp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里的写法参考一下其他可以通过CI编译的GD系列bsp

done

@htynkn
Copy link
Contributor Author

htynkn commented Jul 29, 2025

Action 目前是失败的,make distribution fail

make distribution....
=> gd32e230-lckfb
=> start dist handle
=> copy gd32 bsp library
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType':
  File "/home/runner/work/rt-thread/rt-thread/bsp/gd32/arm/gd32e230-lckfb/SConstruct", line 74:
    DoBuilding(TARGET, objs)
  File "/home/runner/work/rt-thread/rt-thread/tools/building.py", line 803:
    EndBuilding(target, program)
  File "/home/runner/work/rt-thread/rt-thread/tools/building.py", line 927:
    MkDist(program, BSP_ROOT, Rtt_Root, Env, project_name, project_path)
  File "/home/runner/work/rt-thread/rt-thread/tools/mkdist.py", line 195:
    dist_handle(BSP_ROOT, dist_dir)
  File "/home/runner/work/rt-thread/rt-thread/bsp/gd32/arm/gd32e230-lckfb/rtconfig.py", line 148:
    dist_do_building(BSP_ROOT, dist_dir)
  File "/home/runner/work/rt-thread/rt-thread/bsp/gd32/arm/tools/sdk_dist.py", line 30:
    bsp_copy_files(os.path.join(library_path, rtconfig.BSP_LIBRARY_TYPE),
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/posixpath.py", line 90:
    genericpath._check_arg_types('join', a, *p)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/genericpath.py", line 152:
    raise TypeError(f'{funcname}() argument must be str, bytes, or '

但是我看所有GD32 BSP都是BSP_LIBRARY_TYPE = None,是我哪里缺了什么配置吗?

打包脚本有问题,现在hal是通过env下载的,这个dist脚本需要重新思考规划下。我临时修复了下

@kurisaW
Copy link
Member

kurisaW commented Jul 29, 2025

[Bsp Scons Compile](https://github.com/RT-Thread/rt-thread/actions/runs/16592740817/job/46937831429?pr=10557#annotation:21:3130)
build gd32/arm/gd32e230-lckfb hw_drv_onchip.adc0 failed.

可以再关注一下hw_drv_onchip.adc0的问题

image

另外编码问题也请关注一下:

image

@htynkn
Copy link
Contributor Author

htynkn commented Jul 29, 2025

[Bsp Scons Compile](https://github.com/RT-Thread/rt-thread/actions/runs/16592740817/job/46937831429?pr=10557#annotation:21:3130)
build gd32/arm/gd32e230-lckfb hw_drv_onchip.adc0 failed.

可以再关注一下hw_drv_onchip.adc0的问题

image 另外编码问题也请关注一下: image

all done

@supperthomas supperthomas added the BSP: new bsp board New added bsp, need sync action label Jul 30, 2025
@kurisaW kurisaW requested a review from Rbb666 July 30, 2025 08:37
@@ -94,7 +170,9 @@ static int rt_hw_rtc_init(void)

rcu_periph_clock_enable(RCU_PMU);
pmu_backup_write_enable();
#ifndef SOC_SERIES_GD32E23x
Copy link
Member

Choose a reason for hiding this comment

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

缩进需要修改下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

缩进需要修改下

done

@supperthomas supperthomas merged commit c55cbc5 into RT-Thread:master Jul 31, 2025
61 checks passed
@htynkn htynkn deleted the feature/add-support-for-gd32e230c branch July 31, 2025 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action github action yml imporve BSP: GD32 BSP related with GD32 BSP: new bsp board New added bsp, need sync action BSP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants