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

[bsp][ht32] 修复编译问题 #9346

Closed
wants to merge 2 commits into from
Closed

[bsp][ht32] 修复编译问题 #9346

wants to merge 2 commits into from

Conversation

CYFS3
Copy link
Contributor

@CYFS3 CYFS3 commented Aug 25, 2024

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

[
#7764
]

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

@CLAassistant
Copy link

CLAassistant commented Aug 25, 2024

CLA assistant check
All committers have signed the CLA.

Comment on lines +39 to +46
'USE_HT32F12365_66',
'USE_MEM_HT32F12366',
('__CLK_TCK','RT_TICK_PER_SECOND'),
'__STDC_LIMIT_MACROS',
'__RTTHREAD__',
'RT_USING_LIBC',
'RT_USING_ARMLIBC',
'USE_HT32_DRIVER'
Copy link
Member

Choose a reason for hiding this comment

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

感谢提交PR。
这些配置放到menuconfig里面,会保护更好一些。试试看。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

请问是在Kconfig中修改吗

Copy link
Member

Choose a reason for hiding this comment

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

可以参考其他bsp/nrf5x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我不是很明白这个bsp/nrf5x是怎么做的,您能给我点信息吗

'RT_USING_ARMLIBC',
'USE_HT32_DRIVER',
('__CLK_TCK', 'RT_TICK_PER_SECOND')
]

group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Copy link
Member

Choose a reason for hiding this comment

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

请尝试再CI中添加对应的测试bsp。,参考.github/workflow/bsp_building.yml

Comment on lines +39 to +46
'USE_HT32F12365_66',
'USE_MEM_HT32F12366',
('__CLK_TCK','RT_TICK_PER_SECOND'),
'__STDC_LIMIT_MACROS',
'__RTTHREAD__',
'RT_USING_LIBC',
'RT_USING_ARMLIBC',
'USE_HT32_DRIVER'
Copy link
Member

Choose a reason for hiding this comment

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

可以参考其他bsp/nrf5x

@Rbb666 Rbb666 added the BSP label Aug 26, 2024
@supperthomas
Copy link
Member

@Rbb666 看下吧,没问题就合并

@CYFS3
Copy link
Contributor Author

CYFS3 commented Aug 26, 2024

我在本地测试是可以的,然后看了ci也没有问题。
: warning: ISO C99 requires whitespace after the macro name这个警告貌似是他们本身的sdk有问题。
然后使用scons --dist打包的时候会出现不能把sdk_dist.py一起打包进tools下,这个问题我不清楚是咋回事

@supperthomas
Copy link
Member

我在本地测试是可以的,然后看了ci也没有问题。
: warning: ISO C99 requires whitespace after the macro name这个警告貌似是他们本身的sdk有问题。
然后使用scons --dist打包的时候会出现不能把sdk_dist.py一起打包进tools下,这个问题我不清楚是咋回事

看下这个

https://supperthomas-wiki.readthedocs.io/10_jiy/04_bsp_support_dist/bsp_support_dist.html

@supperthomas
Copy link
Member

我在本地测试是可以的,然后看了ci也没有问题。
: warning: ISO C99 requires whitespace after the macro name这个警告貌似是他们本身的sdk有问题。
然后使用scons --dist打包的时候会出现不能把sdk_dist.py一起打包进tools下,这个问题我不清楚是咋回事

看下这个

https://supperthomas-wiki.readthedocs.io/10_jiy/04_bsp_support_dist/bsp_support_dist.html

tools也不一定需要加进去吧?dist出来之后的bsp还需要吗?

'USE_MEM_HT32F12366',
('__CLK_TCK','RT_TICK_PER_SECOND'),
'__STDC_LIMIT_MACROS',
'__RTTHREAD__',
Copy link
Member

@Rbb666 Rbb666 Aug 27, 2024

Choose a reason for hiding this comment

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

' RTTHREAD 、RT_USING_LIBC、RT_USING_ARMLIBC、RT_TICK_PER_SECOND'这种系统相关的宏不用添加

Copy link
Member

Choose a reason for hiding this comment

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

RT_USING_LIBC和RT_USING_ARMLIBC是编译器决定的,可以看这里的定义:

CPPDEFINES = ['RT_USING_ARMLIBC', 'RT_USING_LIBC', '__STDC_LIMIT_MACROS']

@CYFS3
Copy link
Contributor Author

CYFS3 commented Aug 27, 2024

我在本地测试是可以的,然后看了ci也没有问题。
: warning: ISO C99 requires whitespace after the macro name这个警告貌似是他们本身的sdk有问题。
然后使用scons --dist打包的时候会出现不能把sdk_dist.py一起打包进tools下,这个问题我不清楚是咋回事

看下这个
https://supperthomas-wiki.readthedocs.io/10_jiy/04_bsp_support_dist/bsp_support_dist.html

tools也不一定需要加进去吧?dist出来之后的bsp还需要吗?

屏幕截图 2024-08-27 105717
他的SConscript中好像有用的sdk_dist中的方法

@supperthomas
Copy link
Member

再理一下nrf5x和这里的差别看看

@CYFS3 CYFS3 closed this Aug 28, 2024
@CYFS3 CYFS3 reopened this Aug 28, 2024
@github-actions github-actions bot added the action github action yml imporve label Aug 28, 2024
@CYFS3 CYFS3 closed this Aug 28, 2024
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