Skip to content

[hc32] Add the ev_hc32f4a8_lqfp176 board and modify some bsp drivers. #10228

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JamieTx
Copy link
Contributor

@JamieTx JamieTx commented Apr 24, 2025

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

[
Add the ev_hc32f4a8_lqfp176 board and modify some bsp drivers.
]

当前拉取/合并请求的状态 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 BSP label Apr 24, 2025
@supperthomas supperthomas requested a review from Copilot April 24, 2025 07:27
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@supperthomas supperthomas requested a review from Copilot April 24, 2025 10:49
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 adds support for the new ev_hc32f4a8_lqfp176 board and makes corresponding improvements to various BSP drivers, while also updating some peripheral configurations for existing boards.

  • Added SConstruct and SConscript for the new board build process
  • Updated interrupt, DMA, and flash configuration settings across several boards
  • Modified CAN configurations by replacing can_config with mcan_config in some boards

Reviewed Changes

Copilot reviewed 105 out of 109 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
bsp/hc32/ev_hc32f4a8_lqfp176/SConstruct New board build file with proper environment and building setup
bsp/hc32/ev_hc32f4a8_lqfp176/SConscript Board module compilation script with file path adjustments and keyword replacements
bsp/hc32/ev_hc32f4a8_lqfp176/README.md Documentation for the new board
bsp/hc32/ev_hc32f4a0_lqfp176/* Updated IRQ, DMA, flash config macros to support additional channels
bsp/hc32/ev_hc32f472_lqfp100/* Removed SPI5/6 and updated flash granularities
bsp/hc32/ev_hc32f448_lqfp80/* Replacement of can_config with mcan_config and related function renaming
bsp/hc32/ev_hc32f460_lqfp100_v2/* Updated flash granularity macros
Files not reviewed (4)
  • bsp/hc32/ev_hc32f4a8_lqfp176/.cproject: Language not supported
  • bsp/hc32/ev_hc32f4a8_lqfp176/.gitignore: Language not supported
  • bsp/hc32/ev_hc32f4a8_lqfp176/.project: Language not supported
  • bsp/hc32/ev_hc32f4a8_lqfp176/Kconfig: Language not supported
Comments suppressed due to low confidence (1)

bsp/hc32/ev_hc32f4a8_lqfp176/SConscript:8

  • The variable name 'list' shadows the built-in Python type; consider renaming it to something like 'dir_list' or 'entries'.
list = os.listdir(cwd)

Comment on lines 33 to 41
file_path = cwd + './jlink/ev_hc32f4a8_lqfp176 Debug.launch'
svd_keyword = 'HC32F4A8.svd'
split_num = 3
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
file_path = cwd + './template.uvprojx'
svd_keyword = 'HC32F4A8.SFR'
split_num = 2
elif rtconfig.PLATFORM in ['iccarm']:
file_path = cwd + '/project.ewd'
Copy link
Preview

Copilot AI Apr 24, 2025

Choose a reason for hiding this comment

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

Concatenating 'cwd' with a relative path string may result in an incorrect file path; consider using os.path.join(cwd, 'jlink', 'ev_hc32f4a8_lqfp176 Debug.launch') to ensure proper path construction.

Suggested change
file_path = cwd + './jlink/ev_hc32f4a8_lqfp176 Debug.launch'
svd_keyword = 'HC32F4A8.svd'
split_num = 3
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
file_path = cwd + './template.uvprojx'
svd_keyword = 'HC32F4A8.SFR'
split_num = 2
elif rtconfig.PLATFORM in ['iccarm']:
file_path = cwd + '/project.ewd'
file_path = os.path.join(cwd, 'jlink', 'ev_hc32f4a8_lqfp176 Debug.launch')
svd_keyword = 'HC32F4A8.svd'
split_num = 3
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
file_path = os.path.join(cwd, 'template.uvprojx')
svd_keyword = 'HC32F4A8.SFR'
split_num = 2
elif rtconfig.PLATFORM in ['iccarm']:
file_path = os.path.join(cwd, 'project.ewd')

Copilot uses AI. Check for mistakes.

@JamieTx JamieTx requested a review from supperthomas as a code owner April 25, 2025 02:00
@github-actions github-actions bot added the action github action yml imporve label Apr 25, 2025
@@ -397,6 +397,13 @@
"qemu-virt64-riscv"
]
},
{
"RTT_BSP": "K230",
"RTT_TOOL_CHAIN": "riscv64-unknown-linux-musl-",
Copy link
Member

Choose a reason for hiding this comment

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

应该改不到这里的代码,估计git操作哪里不对。
下次可以用下面两个命令
git fetch origin
git rebase origin/master

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants