Monday 3 April 2017

Writing bootloader for STM32 by C language in Keil


I want to write a bootloader for my MCU. It's an STM32F103RET6. I searched for information about writing a bootloader for it, but I couldn't find anything. Now I have these questions:



  1. Where can I find any information (website, book etc.) about writing a bootloader?


  2. Can I write a bootloader for my MCU just using C language and the Keil compiler?



Answer



A bootloader is no different from a normal program. You will need to think of the following things first:



  • What do I want my bootloader to do?

  • Since it usually takes care of upgrading software, where do I get the new application image from?

  • Do I want to be able to communicate with the bootloader via UART/USB/?

  • How do I make sure that a valid program is loaded at the specific memory address?

  • How do I make sure that I am always able to enter the bootloader somehow?



There is no single "bootloader" - it depends on your requirements.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...