【分享】一个只有 4KB 的 DFU bootloader #77
xingrz
started this conversation in
Show and tell
Replies: 2 comments 4 replies
-
|
这个在链接脚本里修改程序偏移的能给个示例么 |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
您好,我这边bootloader和键盘固件都能成功烧录进去,但是重启后无法正确引导到键盘固件部分。能麻烦解答下或帮忙分析下吗?
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
上一篇我分享了怎么用 pyOCD 烧录程序。但如果以后更新固件还得拆开接线就很不优雅。稚晖君之前在 README 里预告了以后会做一个 bootloader,但我已经等不及了,移植了一个只有 4KB 的 DFU bootloader,分享给大家。
项目地址:https://github.com/xingrz/stm32-dfu-bootloader
特色
上手
STM32F103 空片是没有 DFU bootloader 的,所以第一次还是需要用调试器将 bootloader 烧到 STM32 里。这里我继续用 DAPLink + pyOCD。
按照上一篇分享里介绍的步骤准备好 DAPLink 和 pyOCD 以及支持包
点开我那个项目的 Releases 页面,下载
bootloader-helloword.hex执行下面命令刷入:
好,完成!之后更新固件就不需要借助调试器了。
如何更新固件
至于 DFU 工具,大家搜索一下应该有很多现成的。我自己就直接用
dfu-util命令行:另外,我还找到了一个可以直接在 Chrome 浏览器里用的 webdfu,亲测也是可以用的。
以上就是我的分享。欢迎交流。
Beta Was this translation helpful? Give feedback.
All reactions