[英]STM32 bluepill USB bootloader DFU
I am trying to make a base project for blue pill STM32F103 which I can use for multiple projects.我正在尝试为蓝色药丸 STM32F103 制作一个基础项目,我可以将其用于多个项目。 I would like to be able to both flash the device and send commands using serial COM port using the mirco-USB port
我希望能够使用 mirco-USB 端口刷新设备并使用串行 COM 端口发送命令
so far I have:到目前为止我有:
when using the DFU I find that once I have flashed my .bin onto the device it no longer appears as a USB device.使用 DFU 时,我发现将 .bin 刷入设备后,它不再显示为 USB 设备。 following the article linked below I shouldn't need to modify the ROM address of my projects code, I have shortened file size to 55k in my makefile projects linker with still no success
按照下面链接的文章,我不需要修改我的项目代码的 ROM 地址,我在我的 makefile 项目链接器中将文件大小缩短到 55k,但仍然没有成功
https://os.mbed.com/users/devanlai/code/STM32F103C8T6_USBDFU/graph/ https://github.com/devanlai/dapboot/releases/tag/v0.1 https://os.mbed.com/users/devanlai/code/STM32F103C8T6_USBDFU/graph/ https://github.com/devanlai/dapboot/releases/tag/v0.1
my questions:我的问题:
So if I understand your question correctly then you want to flash your MCU board with DFU over USB and to connect to an USB serial port while it is running.因此,如果我正确理解了您的问题,那么您希望通过 USB 使用 DFU 刷新您的 MCU 板,并在它运行时连接到 USB 串行端口。
This can be done as the DFU function is part of the bootloader and the USB serial port is part of your application.这可以完成,因为 DFU 功能是引导加载程序的一部分,而 USB 串行端口是您的应用程序的一部分。
The easiest way to create a virtual com port is using the STM32 CubeMX USB CDC.创建虚拟 COM 端口的最简单方法是使用 STM32 CubeMX USB CDC。 An video example is found here.
可以在此处找到视频示例。 The source code generated by CubeMX can be pulled out and added into your own project.
CubeMX生成的源代码可以拉出来添加到自己的项目中。
I afraid it will not appear anymore as the USB device, unless you implement the USB stack in your code.恐怕它不会再作为 USB 设备出现了,除非您在代码中实现了 USB 堆栈。
what is the best way for me to get a serial comms AND bootloader through USB in my project without writing and debugging my own unique bootloader?
在我的项目中通过 USB 获得串行通信和引导加载程序而无需编写和调试我自己独特的引导加载程序的最佳方法是什么?
There is only one way - you need to have USB stack in your application.只有一种方法 - 您需要在应用程序中使用 USB 堆栈。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.