简体   繁体   English

使最终用户能够更新mikroe stm32f207vg的固件

[英]Enable end user to update firmware of mikroe stm32f207vg

I have developed an embedded device using mikroe development board stm32f207vg. 我已经使用mikroe开发板stm32f207vg开发了嵌入式设备。 I am new to this so plz bear with me. 我是新来的,所以请忍受我。 My question is if later (after release to public) I want end users of my device to update the device software how can I enable this feature. 我的问题是,如果以后(在公开发布之后)我希望设备的最终用户更新设备软件,如何启用此功能。 For example, when I improve the device software and want users to update the device with the new .hex file using the USB port. 例如,当我改进设备软件并希望用户使用USB端口使用新的.hex文件更新设备时。 I am guessing I need to make a desktop app. 我猜我需要制作一个桌面应用程序。 what shud I make the app do? 我让应用程序做什么? During development I usde Mikroe boot loader app to send/install the hex file to my device. 在开发过程中,我使用Mikroe引导加载程序应用程序将hex文件发送/安装到我的设备。 I wish to make a similar app. 我希望做一个类似的应用程序。 I was looking at DFU protocol. 我在看DFU协议。 Stm has the Defuse demo app. Stm具有Defuse演示应用程序。 Is this app for this purpose. 这个程序是为此目的吗? I wish to create my custom app to do this. 我希望创建我的自定义应用程序来执行此操作。 Where should I start? 我应该从哪里开始?

I've built a program in C# that allows my end users to update the firmware. 我用C#构建了一个程序,该程序允许最终用户更新固件。 I did it by reverse engineering the Dufse program that can be found here . 我是通过对Dufse程序进行反向工程来实现的,该程序可以在这里找到。 All the source code is included. 包括所有源代码。 This link describes the protocol. 该链接描述了协议。

My board has a switch on the boot0 pin that allows the MCU to boot into "system memory". 我的开发板上在boot0引脚上有一个开关,该开关使MCU可以启动到“系统内存”中。 When booting into "system memory", the MCU's USB interface will then run as a DFU device. 当启动到“系统内存”时,MCU的USB接口将作为DFU设备运行。 You'll need to install the ST DFU drivers on your host PC, and then you can use the Dfuse program or your own program to update the firmware. 您需要在主机PC上安装ST DFU驱动程序,然后才能使用Dfuse程序或您自己的程序来更新固件。

I also found this discussion useful, but don't let it lead you astray. 我也发现此讨论很有用,但不要让它误入歧途。 The ST docs are the real source of information. ST文档是真正的信息来源。

There are other ways as well. 还有其他方法。 Did you know your firmware can actually write to flash memory? 您知道固件可以实际写入闪存吗? You could write your own boot loader that uses a USART, USB, Ethernet, or some other peripheral to program the device by writing to the flash. 您可以编写自己的引导加载程序,该引导加载程序使用USART,USB,以太网或其他外围设备通过写入闪存对设备进行编程。 Be careful not to overwrite your boot loader though. 但是请注意不要覆盖引导加载程序。 ST seems to call this "in-application programming" (IAP). ST似乎将其称为“应用程序内编程”(IAP)。

These might be for different MCUs, but the principles are the same. 这些可能适用于不同的MCU,但是原理相同。

Hope this will give you the start you are looking for. 希望这会为您提供所需的开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM