Skip to content

Conversation

blta
Copy link
Contributor

@blta blta commented Apr 21, 2022

[
add nuclei bsp to CI testing
]

以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
The following content must not be changed in the submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use a web browser to visit PR, and check items one by one, and ticked them if no problem.

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

@Guozhanxin Guozhanxin closed this Apr 21, 2022
@Guozhanxin Guozhanxin reopened this Apr 21, 2022
@mysterywolf mysterywolf requested a review from Guozhanxin April 21, 2022 20:33
Comment on lines +56 to +74
## 配置工具链前缀

由于RT-Thread 仓库在CI时使用的是risc-v通用编译器 `riscv-none-embed-` ,所以在编译前需要更改一下BSP根目录下rtconfig.py:

> 修改工具链前缀PREFIX 为 `riscv-nuclei-elf-`
```
if PLATFORM == 'gcc':
# toolchains
PREFIX = 'riscv-nuclei-elf-'
CC = PREFIX + 'gcc'
CXX = PREFIX + 'g++'
AS = PREFIX + 'gcc'
AR = PREFIX + 'ar'
LINK = PREFIX + 'gcc'
GDB = PREFIX + 'gdb'
TARGET_EXT = 'elf'
```

Copy link
Member

Choose a reason for hiding this comment

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

@Guozhanxin 郭老师 CI这侧直接安装一个新的编译链吧 不要为了加入CI而改了BSP正常的工具链

Copy link
Contributor Author

@blta blta Apr 21, 2022

Choose a reason for hiding this comment

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

我本地测试的两个risc-v gcc:
github : https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases
nuclei: https://www.nucleisys.com/upload/files/toochain/gcc/nuclei_riscv_newlibc_prebuilt_linux64_2022.04.tar.bz2
都是基于10.2.0版本,实测两个编译器编译结果,运行效果一样,能把nuclei的编译链安装了最好,芯来可能做了一些优化之类的。如果新装,我把这些撤销掉

Copy link
Member

Choose a reason for hiding this comment

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

我是考虑能用已有的最好,再装一个,也就这两个bsp用,也只能测到编译,不太划算。。。最好找官方的人确认一下

Copy link
Member

Choose a reason for hiding this comment

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

我本地测试的两个risc-v gcc: github : https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases nuclei: https://www.nucleisys.com/upload/files/toochain/gcc/nuclei_riscv_newlibc_prebuilt_linux64_2022.04.tar.bz2 都是基于10.2.0版本,实测两个编译器编译结果,运行效果一样,能把nuclei的编译链安装了最好,芯来可能做了一些优化之类的。如果新装,我把这些撤销掉

@fanghuaqi 用riscv-none-embed-gcc这个工具链会有什么问题吗,你们建议怎么改呢?

Copy link
Contributor

Choose a reason for hiding this comment

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

建议采用我们官方的,我们官方做了P扩展的自定义指令(0.5.3版本),然后整合了bpv扩展的支持,而且CI也可以每次运行的时候下载工具链,然后cache起来,不用每次都下载

Copy link
Member

@BernardXiong BernardXiong Apr 28, 2022

Choose a reason for hiding this comment

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

再安装工具链,对ci的负担实在有些太重了。或者只在bsp层面调整,并不加入到ci中?

@BernardXiong
Copy link
Member

感觉没必要专门来去刷日期啊,刷日期就导致很多文件更改了。

@liukangcc
Copy link
Member

zephyr 的仓库也没修修改日期

@BernardXiong
Copy link
Member

因为涉及到太多的仅仅是日期的调整,建议这个PR重新进行修改;而对于工具链部分,两种建议:

  1. 使用现有ci上的工具链;// 目前ci的负担已经非常重了,其中创建ci环境,加载工具链花了最重头的时间
  2. 进行调整,只在bsp层面上体现出来,而不加入到ci中;

鉴于上述情况,这个PR关闭,请重新调整,另行提交。

@blta
Copy link
Contributor Author

blta commented Apr 29, 2022

因为涉及到太多的仅仅是日期的调整,建议这个PR重新进行修改;而对于工具链部分,两种建议:

1. 使用现有ci上的工具链;// 目前ci的负担已经非常重了,其中创建ci环境,加载工具链花了最重头的时间

2. 进行调整,只在bsp层面上体现出来,而不加入到ci中;

鉴于上述情况,这个PR关闭,请重新调整,另行提交。

说明一下提交这个PR的原因:
在PR #5851 发现rvstart bsp 不能正常编译,在满老师和郭老师帮助下,定位是之前的一次更改 #5397 去除了CCFLAG ,全部改成了CFLAG,但芯来的SDK里面有追加 CCFLAGS 操作,最终导致的问题。本意是避免一些修改导致不在CI里的bsp出现问题。
1.目前这个提交就是基于现有CI 工具链, 主要的提交是readme对工具链的说明,日期刷新是习惯用那个格式化检查工具导致的。
2.如果不加入CI, 建议后面涉及对不在CI里面的BSP改动,要手动编译检查 一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants