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][yichip] add yc3122-pos #7526

Merged
merged 21 commits into from
May 23, 2023
Merged

[bsp][yichip] add yc3122-pos #7526

merged 21 commits into from
May 23, 2023

Conversation

zhiqiandeng
Copy link
Contributor

@zhiqiandeng zhiqiandeng commented May 18, 2023

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

[

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

添加 yc3122 rt-thread 示例

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

基本yc3122 搭建

在什么测试环境下测试通过 (what is the test environment)

yc3122-pos
]

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

没有readme文件啊,加一个吧,还有下面这个文件不需要吧,删了吧

image

@supperthomas
Copy link
Member

- "synwit/swm320"

scons 支持了吗?支持的话可以在这里添加

@BernardXiong
Copy link
Member

这颗芯片是否太小众,太专业化了?如果是这样,是否有不必须提交上来?


YC3121-pos 开发板板载资源如下:

- MCU:YC3122 ARM 32-bit Cortex-M0和RISC V 双核处理器,RISC V支持浮点算法主频 192MHz,512KB/1MB/4MB FLASH ,320KB SRAM
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.

芯片是否太小众,太专业化了?如果是这样,是否有不必须提交上来?

可作为通用mcu使用,各个功能都有,后期可以把相应设备补全

@Guozhanxin Guozhanxin added the BSP label May 19, 2023
@Guozhanxin Guozhanxin added the +1 Agree +1 label May 20, 2023
Comment on lines +82 to +87
#define RT_USING_MTD_NOR
#define RT_USING_SPI
#define RT_USING_SFUD
#define RT_SFUD_USING_SFDP
#define RT_SFUD_USING_FLASH_INFO_TABLE
#define RT_SFUD_SPI_MAX_HZ 50000000
Copy link
Member

Choose a reason for hiding this comment

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

这块涉及到SPI FLash的可否设计一个开关,用户可以选择打开或者关闭?
参考:https://github.com/RT-Thread/rt-thread/blob/master/bsp/stm32/stm32l475-atk-pandora/board/Kconfig#L65

Copy link
Member

Choose a reason for hiding this comment

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

只要不是核心功能,尽可能在board/Kconfig里采用开关的方式实现,默认为n,用户需要的时候才会开启。一般外设默认只开启控制台串口和GPIO

@mysterywolf mysterywolf added the in progress PR/issue in progress. label May 21, 2023
@supperthomas
Copy link
Member

图片

https://github.com/RT-Thread/rt-thread/actions/runs/5041305416/jobs/9040879639

请看下编译log,确认需要提交的文件都已经提交。

@zhiqiandeng
Copy link
Contributor Author

RT-Thread BSP build check / riscv64-unknown (pull_request)
这个错误编的不是我提的这个bsp吧

@supperthomas
Copy link
Member

RT-Thread BSP build check / riscv64-unknown (pull_request) 这个错误编的不是我提的这个bsp吧

https://github.com/RT-Thread/rt-thread/actions/runs/5046383085/jobs/9051816950?pr=7526 现在再看下,出错的地方。

@supperthomas
Copy link
Member

.config 文件可以加一下。

@mysterywolf
Copy link
Member

RT-Thread BSP build check / riscv64-unknown (pull_request) 这个错误编的不是我提的这个bsp吧

这个错误无需理会

@mysterywolf
Copy link
Member

.config是一个很重要的文件,它保存了menuconfig的默认设置情况,这个文件需要提交一下。在menuconfig的时候就会自动生成的。这个文件不需要手动修改什么。

@zhiqiandeng
Copy link
Contributor Author

.config是一个很重要的文件,它保存了menuconfig的默认设置情况,这个文件需要提交一下。在menuconfig的时候就会自动生成的。这个文件不需要手动修改什么。

已提交

import rtconfig
cwd = GetCurrentDir()
src = Glob('sdk/*.c')
CPPPATH = [cwd + '/sdk', cwd + '/core',cwd + '\CMSIS\Include',cwd + '\CMSIS\Device\YICHIP\YC3122\Include',cwd]
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
Member

Choose a reason for hiding this comment

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

这块建议用os.path.join来链接,否则在不同操作系统下可能要出问题
os.path.join(cwd, 'CMSIS', 'Include') 这样子

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这块建议用os.path.join来链接,否则在不同操作系统下可能要出问题 os.path.join(cwd, 'CMSIS', 'Include') 这样子

已修改

@supperthomas
Copy link
Member

感谢贡献。

@supperthomas supperthomas removed the in progress PR/issue in progress. label May 23, 2023
@supperthomas supperthomas merged commit 17ce4a4 into RT-Thread:master May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BSP +1 Agree +1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants