cancel
Showing results for 
Search instead for 
Did you mean: 

In application software update using STM32 bootloader

joao
Associate
Posted on September 09, 2014 at 19:22

Hello guys,

I have started to work with STM32 microcontrollers for a little while and I've little knowledge about advanced programming. 

My task is to implement one system which will update the firmware of STM32F105 trough USART1 using the system bootloader. But, it will not be a direct update, there is another microcontroller which will provide the .bin to STM32.

To be able to implement this system I've read the ST documentations AN2606, AN3155 and some datasheets.

What I ask you, in your experience working with these microcontrollers, is to give me some bibliography which I can read about how to use one microcontroller like a bridge to pass the .bin to the final uC.

The system will be:

Radio system ---> host microcontroller  --- (USART1) ---> STM32

I am sorry to ask this general question, but I only want some bibliography where I can find informations about this kind of a system (which you have more than one uC and you have to update all the firmwares).

In addiction, this IAP* does not do something similar to the bootloader? What are the advantages to use it?

IAP*: http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00161640.pdf

I appreciate your help and I apologise my poor english  :)

Thanks, again.

João

2 REPLIES 2
Posted on September 09, 2014 at 20:25

The function of the boot loader is VERY basic, it must be driven by a smarter and more robust system. The IAP allows you to code a more complex loader to suit your needs, and use existing protocols, XMODEM, YMODEM, ETHERNET, TFTP, etc.

ST has several manuals describing the STM32 Boot Loader protocol at a byte level, and has source for a Flash Loader Demonstrator application. You can port this to another micro if you wish, I've done such things. I tend to prefer the IAP approach, and package firmware updates that I can deliver to the target system as quickly as it can take them, and with the data integrity those protocols afford.

http://www.amazon.com/Making-Embedded-Systems-Patterns-Software/dp/1449302149

http://www.st.com/web/en/catalog/tools/PF257525

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00264342.pdf

Sending and performing firmware updates is not a STM32 specific task, the concepts of sending/receiving data are not that hard. Do you have experience reading/writing data files and manipulating binary data? What kinds of books have you read on Embedded Firmware design and implementation to date? What kinds of coding experience do you have?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
joao
Associate
Posted on September 09, 2014 at 21:05

First of all, thank you for the answer. Secondly, I'm sorry about the cross post.

About your questions, my experience reading/writing bytes and working with data files is really small. Last month I have started to learn about binary files, how to create them, how compilers/linkers work, memory mapping and everything that is the base to start to work in this area. Then, I have worked with SAM-BA (Atmel) for a little while and, working with SAM-BA, I had the opportunity to see all these concepts working. In this week I took the challenge to do this system.

Thank you for your help and to sending me the bibliography. If you have something else, I will appreciate.

I am happy to see people who have experience, like you, sharing information and helping each other.

Again, thank you.

Best regards,

João