Skip to content
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

[ht32][drv]新增了CAN、USB和SDIO的驱动文件 #9876

Merged
merged 12 commits into from
Jan 13, 2025

Conversation

QT-one
Copy link
Contributor

@QT-one QT-one commented Jan 7, 2025

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

[

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

新增了CAN、USB和SDIO的驱动文件

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

新增的驱动文件已经分别在合泰的ESK32-30522和ESK32-30105开发板中验证通过。

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

  • BSP:

  • .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自查

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the BSP label Jan 7, 2025
@supperthomas
Copy link
Member

image
建议添加yml文件参考如下。
https://club.rt-thread.org/ask/article/5c41835bb8ff9b41.html

@QT-one
Copy link
Contributor Author

QT-one commented Jan 7, 2025

@supperthomas 根据检测的反馈,这里应该是缺少了一个宏定义。本来这个宏定义是一个全局宏定义的,我将它写在了Scons脚本里,生成的keil 5工程,在编译过程中是没有问题的,但使用ENV进行编译的话就会反馈没有检测到这些全局宏定义。yml文件的话,我之前有在".github/workflow/bsp_buildings.yml"中增加过了,所以应该不是这个问题。
image
image
image

@@ -48,7 +48,7 @@
CFLAGS = DEVICE + ' -Dgcc'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
CFLAGS += ' -D USE_HT32F12365_66'
Copy link
Member

Choose a reason for hiding this comment

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

这里为什么要删掉呢?

@@ -48,7 +48,7 @@
CFLAGS = DEVICE + ' -Dgcc'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
CFLAGS += ' -D USE_HT32F52342_52'
Copy link
Member

Choose a reason for hiding this comment

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

这里

@QT-one
Copy link
Contributor Author

QT-one commented Jan 7, 2025

@supperthomas 我是在老一版本的库上进行更新的,拉取新版库后直接就复制替换了,没有留意到这部分的改变,刚才检查了下这部分确实更新了,非常感谢您的提醒。

@supperthomas
Copy link
Member

请阅读一下:https://club.rt-thread.org/ask/article/5c41835bb8ff9b41.html
另外,请删除和PR无关的一些配置文件,如果不需要添加,不需要都添加。

@QT-one QT-one requested a review from supperthomas January 9, 2025 01:08
- 进阶使用方法

通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。

Copy link
Member

Choose a reason for hiding this comment

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

如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查

@github-actions github-actions bot added the action github action yml imporve label Jan 9, 2025
@QT-one QT-one requested a review from supperthomas January 9, 2025 08:20
@@ -391,6 +391,7 @@ jobs:
- "nrf5x/nrf52833"
- "nrf5x/nrf52840"
- "nrf5x/nrf5340"
- "ht32/ht32f53252"
Copy link
Member

Choose a reason for hiding this comment

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

     -  RTT_BSP: "others_at32_hc32_ht32"
        RTT_TOOL_CHAIN: "sourcery-arm"
        SUB_RTT_BSP: 
            - "qemu-vexpress-a9"
            - "airm2m/air32f103"
            ...
            - "ht32/ht32f53252"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

所以这里是需要删除nordic(yml)里的"ht32/ht32f53252",保留others_at32_hc32_ht32中的是吗?

Copy link
Member

Choose a reason for hiding this comment

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

是的。

@QT-one QT-one requested a review from supperthomas January 10, 2025 02:09

/* Onboard Peripheral Drivers */

#define BSP_USING_TEST
Copy link
Member

Choose a reason for hiding this comment

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

请把这个选项关掉


/* rt_vsscanf options */

#define RT_KLIBC_USING_LIBC_VSSCANF
Copy link
Member

Choose a reason for hiding this comment

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

请把这个选项关掉

@@ -168,7 +168,7 @@ menu "On-chip Peripheral Drivers"
if BSP_USING_SPI
config BSP_USING_SPI0
bool "Enable SPI0 Bus"
default n
default y
Copy link
Member

Choose a reason for hiding this comment

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

SPI0和I2C0为什么默认开启呢,一般BSP只默认开启GPIO和一个用于console调试的串口

if BSP_USING_SPI
config BSP_USING_SPI0
bool "Enable SPI0 Bus"
default y
Copy link
Member

Choose a reason for hiding this comment

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

这个默认开启是有什么需求吗

if BSP_USING_I2C_HW
config BSP_USING_I2C0_HW
bool "Enable Hardware I2C0 Bus"
default y
Copy link
Member

Choose a reason for hiding this comment

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

同上


/* rt_vsnprintf options */

#define RT_KLIBC_USING_LIBC_VSNPRINTF
Copy link
Member

Choose a reason for hiding this comment

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

请关闭这个选项


/* rt_vsscanf options */

#define RT_KLIBC_USING_LIBC_VSSCANF
Copy link
Member

Choose a reason for hiding this comment

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

请关闭这个选项


/* Onboard Peripheral Drivers */

#define BSP_USING_TEST
Copy link
Member

Choose a reason for hiding this comment

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

请关闭这个选项,这个选项是否打开留给用户,我们配置好就行,用户一键打开。

@mysterywolf mysterywolf merged commit 3436aa6 into RT-Thread:master Jan 13, 2025
46 checks passed
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