Modify the ymodem component to support multi-file reception
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
实际项目中,需要使用ymodem传输多文件到板子中,但是原来的代码不支持;
你的解决方案是什么 (what is your solution)
修改_rym_recv_begin函数,每一个文件路径单独使用一个独立的局部数组,而不是直接改变cctx->fpath,否则第二个以及后面的文件传输时,会导致文件路径错误,导致无法传输;
请提供验证的bsp和config (provide the config and bsp)
我是基于STM32L4R5的板子测试的,主线这边没有测试;
- 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/ALL_BSP_COMPILE.json 详细请参考链接BSP自查
📌 Code Review Assignment
🏷️ Tag: components
Reviewers: @Maihuanyi
Changed Files (Click to expand)
- components/utilities/ymodem/ry_sy.c
🏷️ Tag: components_utilities_ymodem
Reviewers: @wdfk-prog
Changed Files (Click to expand)
- components/utilities/ymodem/ry_sy.c
📊 Current Review Status (Last Updated: 2025-09-12 15:02 CST)
- ⌛ @Maihuanyi Pending Review
- ⌛ @wdfk-prog Pending Review
📝 Review Instructions
-
维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态 Maintainers can refresh the review status by clicking here: 🔄 Refresh Status
-
确认审核通过后评论
LGTM/lgtmCommentLGTM/lgtmafter confirming approval -
PR合并前需至少一位维护者确认 PR must be confirmed by at least one maintainer before merging
ℹ️ 刷新CI状态操作需要具备仓库写入权限。 ℹ️ Refresh CI status operation requires repository Write permission.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: CUGLIJIE
:x: jli
jli seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
- 第二次传输时是什么意思?
- 是指当前ymode没传输完成又开了一个传输吗?
- 第二次传输时是什么意思? 指的是,我一次下载多个文件时,第二个文件传输的时候,不是第二次,还是一个会话,同一个命令
- 是指当前ymode没传输完成又开了一个传输吗? 不是,同上;
- 测试单片机接收两个文件,第二个文件文件名异常,内容未知是否正常
* 测试单片机接收两个文件,第二个文件文件名异常,内容未知是否正常
测试的电脑上位机是什么?我使用的是security CRT,也使用过mobaxterm, 接收ymodem下载的命令是:ry /OTA/ -----注意要添加最后的反斜杠 / ,否则路径可能异常
* 测试单片机接收两个文件,第二个文件文件名异常,内容未知是否正常
测试的电脑上位机是什么?我使用的是security CRT,也使用过mobaxterm, 接收ymodem下载的命令是:ry /OTA/ -----注意要添加最后的反斜杠 / ,否则路径可能异常
- 用的xshell软件,命令是 ry /flash/
那我有空测试一下xshell下载
security CRT
我试一下security CRT的.... 好像是xhsell有问题
mobaxterm
这是用Z-modem发送吗?
都是用ymodem发送
---Original--- From: @.> Date: Fri, Oct 24, 2025 17:17 PM To: @.>; Cc: @.@.>; Subject: Re: [RT-Thread/rt-thread] Modify the ymodem component to supportmulti-file reception (PR #10688)
wdfk-prog left a comment (RT-Thread/rt-thread#10688)
mobaxterm
这是用Z-modem发送吗?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
- 我使用gcc编译有些警告,你可以一起修复了吗?关于prtintf打印的格式警告
- ry_sy的ry函数有这个注释,可以删掉了.sy的注释还保留
/* temporarily support 1 file*/
好的,下周一我修正一下,这些告警和错误注释
📌 Code Review Assignment
🏷️ Tag: components
Reviewers: @Maihuanyi
Changed Files (Click to expand)
- components/utilities/ymodem/ry_sy.c
🏷️ Tag: components_utilities_ymodem
Reviewers: @wdfk-prog
Changed Files (Click to expand)
- components/utilities/ymodem/ry_sy.c
📊 Current Review Status (Last Updated: 2025-10-26 09:37 CST)
- ⌛ @Maihuanyi Pending Review
- ⌛ @wdfk-prog Pending Review
📝 Review Instructions
-
维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态 Maintainers can refresh the review status by clicking here: 🔄 Refresh Status
-
确认审核通过后评论
LGTM/lgtmCommentLGTM/lgtmafter confirming approval -
PR合并前需至少一位维护者确认 PR must be confirmed by at least one maintainer before merging
ℹ️ 刷新CI状态操作需要具备仓库写入权限。 ℹ️ Refresh CI status operation requires repository Write permission.
打印格式和注释错误的问题已经修正
LGTM
@Rbb666 这个我都差点忘记了😄
@Rbb666
* 测试单片机接收两个文件,第二个文件文件名异常,内容未知是否正常