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

【修改】STM32F4探索者,移植 littlefs 文件系统 #4919

Merged
merged 9 commits into from
Aug 8, 2021
Merged

【修改】STM32F4探索者,移植 littlefs 文件系统 #4919

merged 9 commits into from
Aug 8, 2021

Conversation

MrYangMouren
Copy link
Contributor

@MrYangMouren MrYangMouren commented Aug 4, 2021

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

[
在 STM32F4探索者上移植 littlefs 文件系统
STM32F4探索者开发板 在 MDK5,RT-Thread Studio,Gcc 编译通过,测试正常
]

以下的内容不应该在提交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
  • 本拉取/合并符合RT-Thread代码规范 This PR complies with RT-Thread code specification

@mysterywolf
Copy link
Member

代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

[ x] 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
[x ] 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
[x ] 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
[x ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
[x ] 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
[x ] 本拉取/合并请求代码是高质量的 Code in this PR is of high quality
[x ] 本拉取/合并符合RT-Thread代码规范 This PR complies with RT-Thread code specification

选项的时候要删除x左右多余的空格[x]

@Guozhanxin
Copy link
Member

代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

[ x] 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
[x ] 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
[x ] 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
[x ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
[x ] 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
[x ] 本拉取/合并请求代码是高质量的 Code in this PR is of high quality
[x ] 本拉取/合并符合RT-Thread代码规范 This PR complies with RT-Thread code specification

选项的时候要删除x左右多余的空格[x]

其实这几个提交的时候不用改,提交pr之后,在网页上点就行了。

@mysterywolf
Copy link
Member

如果已经解决的的对话,可以点击左下角的Resolve Conversation来隐藏对话框

@mysterywolf
Copy link
Member

mysterywolf commented Aug 5, 2021

https://github.com/mysterywolf/formatting ci报错的格式不合规的文件可以用这个脚本扫描一下就好了,欢迎star

@mysterywolf
Copy link
Member

mysterywolf commented Aug 5, 2021

请确认这个pr是否可以编过?实际测试并不能编过貌似没有select FAL 和 littlefs软件包
这个程序实际可以运行?

@mysterywolf
Copy link
Member

mysterywolf commented Aug 5, 2021

mysterywolf@963cce1
我已经解决没有选定FAL和littlefs软件包的问题,解决挂载顺序不合理的问题,重命名filesystem设备为spiflash0。
你可以把这个pr合并一下 https://github.com/YJ98/rt-thread/pull/1
FAL还有MTD NOR设备已经成功挂载,但是格式化盘符时会显示(sfud_dev) has assert failed at read. 麻烦你看看。

解决没有选定FAL和littlefs软件包的问题,解决挂载顺序不合理的问题,重命名spiflash设备为spiflash0
@MrYangMouren
Copy link
Contributor Author

自动格式化并挂载
automatic_mount

手动格式化并挂载
manual_operation

我测试了一下,没有出现格式化时显示 (sfud_dev) has assert failed at read. ,麻烦您看看,是否是我的操作有什么遗漏。@mysterywolf

@mysterywolf
Copy link
Member

你的mtd_test是个什么东东

@mysterywolf
Copy link
Member

mysterywolf commented Aug 6, 2021

我初始化的时候没有敲入mtd_test的步骤,直接上来就自动初始化。这个是最好一键自动化搞定,用户上来就可以使用文件系统,不要创造出一些只有你知道但是用户不清楚的初始化流程😂。

@MrYangMouren
Copy link
Contributor Author

我那个是我导出的测试用例,不使用自动初始化,等系统起来后,一步一步操作,看是否能复现您出现的那个问题。

@MrYangMouren
Copy link
Contributor Author

change_name
您出现的那个问题,应该是没有修改这个名字,使用的是默认的 norflash0,而我们使用的是 W25Q128 。

@mysterywolf
Copy link
Member

mysterywolf commented Aug 6, 2021

是的 改成w25q128就好了,我一会再给你的仓库提一个pr,这个w25q128最好改回到norflash0,否则用户还得多设置一步,其实用户内部并不关心它叫啥

@mysterywolf
Copy link
Member

https://github.com/YJ98/rt-thread/pull/2 请合并这个pr,我已经测试通过了

[stm32f407-explorer]优化Kconfig文件系统命名,SFUD注册w25q128时命名自适应,避免用户多设置一步名称
Copy link
Member

@mysterywolf mysterywolf left a comment

Choose a reason for hiding this comment

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

已经在STM32F407探索者测试通过,littlefs文件系统挂载正常

@mysterywolf mysterywolf added +1 Agree +1 BSP: STM32 BSP related with ST/STM32 labels Aug 6, 2021
@mysterywolf
Copy link
Member

麻烦合并一下 https://github.com/YJ98/rt-thread/pull/3 优化FAL相关设置

@Guozhanxin Guozhanxin merged commit 85d7748 into RT-Thread:master Aug 8, 2021
@Guozhanxin
Copy link
Member

好像合并早了

@MrYangMouren MrYangMouren deleted the STM32F407_add_littlefs branch August 28, 2021 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BSP: STM32 BSP related with ST/STM32 +1 Agree +1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants