Question

I have developed an embedded device using mikroe development board 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. 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. I wish to make a similar app. I was looking at DFU protocol. Stm has the Defuse demo app. Is this app for this purpose. I wish to create my custom app to do this. Where should I start?

Was it helpful?

Solution

I've built a program in C# that allows my end users to update the firmware. I did it by reverse engineering the Dufse program that can be found here. 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". When booting into "system memory", the MCU's USB interface will then run as a DFU device. 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.

I also found this discussion useful, but don't let it lead you astray. The ST docs are the real source of information.

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. Be careful not to overwrite your boot loader though. ST seems to call this "in-application programming" (IAP).

These might be for different MCUs, but the principles are the same.

Hope this will give you the start you are looking for.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top