Showing results for 
Search instead for 
Did you mean: 

FUOTA IAP Updating Only Part of a Program

Associate II

My goal is to implement an In-App Programmer (IAP) that can update part of our firmware from data we receive over a wireless network. We do not want to update the full firmware because it's too large and would take too long/consume too much power.

I'm looking for guidance on how to get this done.

Using Keil UVision IDE, STML072 MCU.

From what I understand I'll need to:

  • Segment the code into different sections/layers. For example, one layer of code is a base layer with the main system functions, HAL etc. Another layer of code with the Application code that would be updated OTA.
  • Use a Scatter file to designate where the application layer functions are. Do I have to hardcode the address for each function/or interface or is there a better way to do it?
  • Then when I call the application layer code, I'll do it by address?

Next when we need to update the Application code:

Download the code fragments (CRC check it and all), then program the Flash at the specific addresses with the updated functions.

Please let me know if that sounds right.. Or if there's a better way of doing this.

Also, how in uVision/Keil do I generate an output for just the Application code that I could send? Or at least how do I split out the code for just the Applicaiton code? 

Is there a way to generate a file that has some sort of Address to value mapping?