{"id":26343655,"url":"https://github.com/liiin25/xymodem","last_synced_at":"2026-05-18T08:33:19.853Z","repository":{"id":281332298,"uuid":"943878615","full_name":"liiin25/XYModem","owner":"liiin25","description":"MCU-IAP（包含上位机、Bootloader和测试App）","archived":false,"fork":false,"pushed_at":"2025-03-10T09:30:34.000Z","size":428,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T05:17:36.564Z","etag":null,"topics":["aes","bootloader","iap","qt","stm32","uart","xmodem","ymodem"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liiin25.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-06T12:16:17.000Z","updated_at":"2025-03-10T09:30:38.000Z","dependencies_parsed_at":"2025-03-08T11:25:57.573Z","dependency_job_id":"a4a06935-9ce0-40a8-a43f-d47ab0b1b166","html_url":"https://github.com/liiin25/XYModem","commit_stats":null,"previous_names":["liiin25/xymodem"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liiin25%2FXYModem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liiin25%2FXYModem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liiin25%2FXYModem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liiin25%2FXYModem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liiin25","download_url":"https://codeload.github.com/liiin25/XYModem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826788,"owners_count":20354222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes","bootloader","iap","qt","stm32","uart","xmodem","ymodem"],"created_at":"2025-03-16T05:17:39.467Z","updated_at":"2026-05-18T08:33:19.808Z","avatar_url":"https://github.com/liiin25.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XYModem\n\n### 1.项目简介：\nXYModem是一个串口IAP项目，实现在上位机对设备进行更新和擦除固件。项目使用XModem、YModem协议传输数据，支持使用bin、hex文件或AES-CBC-128加密的文件对设备进行更新。上位机除IAP功能外，还可以充当串口助手使用，方便日常的开发调试。\n\n### 2.项目组成：\n项目由三部分组成：\n  + 上位机\n  + Bootloader\n  + 测试App\n\n分别存放在App、Bootloader和Examples文件夹中。\n\n#### 1.上位机：\n  软件使用Qt6.5.3开发，依赖Serialport组件和[OpenSLL](https://github.com/openssl/openssl)库。OpenSSL版本要求3.0以上版本，编译安装好后需要在cmake中指定路径。\n```cmake\nset(OPENSSL_ROOT_DIR \"D:/OpenSSL-MinGW64\")\n```\n目录结构：\n```\nXYModem\n└──App\n    ├── inc             头文件\n    ├── resource        资源文件\n    ├── src             源文件\n    ├── ui              界面文件\n    └── CMakeLists.txt  cmake文件\n```\n#### 2.Bootloader:\n  Bootloader目前仅在STM32F103ZET6上进行过测试，其他型号和平台的MCU需要自行移植测试。\n\n目录结构：\n```\nXYModem\n└──Bootloader\n    ├── MDK         Keil工程文件\n    ├── CMSIS       启动文件和内核文件\n    ├── STDLib      STM32标准库\n    ├── Tiny-AES    AES加密库\n    ├── IAP         iap功能文件\n    └── USER        main、中断和stm32配置文件\n```\n在IAP文件夹下的是实现功能和移植的文件，其中interface命名的文件是用于配置硬件和接口作用的，xymodem命名的是iap功能实现的主要部分。移植时只需修改interface命名相关的文件，在文件中修改你对应设备的相关参数和实现相关函数。\n\n在程序中解密部分使用的是开源的Tiny-AES库，需要了解其内容的请移步到原作者的仓库：https://github.com/kokke/tiny-AES-c\n\n3. 测试App\n\n  这个就是个简单的测试程序。如果你需要实现自己的app程序，需要注意以下几点：\n  + app的可用空间，防止程序超出flash范围。\n  + 跳转到app后需要重置向量表。\n  + 设置标志位为IMAGE_OK，否则下次上电后会停留在Bootloader中。\n  + 标志位必须要与Bootloader里设置的一致。\n  + 开启串口，实现上位机指令的解析函数，方便在上位机跳转回Bootloader（如有需要）。\n\n### 3.使用方法：\n1. 首先烧录Bootloader到你的设备。\n2. 运行上位机，选择对应配置和端口，并连接设备。\n3. 载入需要更新的文件，点击更新按键，即可更新固件。\n4. 若需要擦除固件，请点击擦除按键。\n\n**注：如果Bootloader中使能密文更新功能，需先加密文件再进行更新操作：**\n1. 点击加密固件按键，填写对应的密钥和向量并点击生成按键。\n2. 完成后会在原文件路径下生成对应文件名的 `.aes` 文件。\n3. 重新载入这个 `.aes` 文件，点击更新按键进行固件更新。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliiin25%2Fxymodem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliiin25%2Fxymodem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliiin25%2Fxymodem/lists"}