-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Modify the ymodem component to support multi-file reception #10688
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
base: master
Are you sure you want to change the base?
Conversation
📌 Code Review Assignment🏷️ Tag: componentsReviewers: @Maihuanyi Changed Files (Click to expand)
🏷️ Tag: components_utilities_ymodemReviewers: @wdfk-prog Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-09-12 15:02 CST)
📝 Review Instructions
|
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. |
*/ | ||
char user_path[DFS_PATH_MAX]={0}; | ||
rt_snprintf(user_path, DFS_PATH_MAX, "%s%s", cctx->fpath, buf); | ||
cctx->fd = open(user_path, O_CREAT | O_WRONLY | O_TRUNC, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
char insert_0 = '\0';
char *ret;
rt_err_t err;
ret = strchr(cctx->fpath,insert_0);
if(ret)
{
*ret = '/';
}
else
{
rt_kprintf("No end character\n");
return RYM_ERR_ACK;
}
rt_strncpy(ret + 1, (const char *)buf, len - 1);
cctx->fd = open(cctx->fpath, O_CREAT | O_WRONLY | O_TRUNC, 0);
- 这一块判断逻辑为啥不要了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
拉取/合并请求描述:(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的板子测试的,主线这边没有测试;
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up