Recently, the company's products need to increase the remote upgrade function, the boot loader program is written and handed to the production department when they feedback each product process needs to brush write two times (a boot loader an app), production progress slowed waste time, so study how to two programs and for one.
Reference: http://blog.csdn.net/yx_l128125/article/details/13591743 After the successful implementation of the two programs merged into one.
How to combine IAP +app
There are 3 ways to synthesize 1 hex files for IAP and app hex files:
1, IAP first burn write into the flash 0x0800 0000 start position, the app burned to the flash 0x 0800 3000 start place; then read the data on a. bin file through the file readout function of the IAP program on my previous blog post. Then swipe into the start flash address in 0x0800 0000 through the program Brush-write tool.
2, manually merge the IAP and app. Hex File (trouble, high error rate)
(1) Set the IAP program to download to flash at the beginning address of 0x0800 0000, and then compile the program to generate hex files.
(2) Set the app download to the beginning of flash address (the address depends on the chip and program size), and then compile the program to generate hex file.
(3) Use notepad++ to open the hex file of IAP and app hex file
Remove the last sentence of the. Hex of the IAP (i.e.: Delete: 00000001FF)
Copy all the contents of the app's. Hex to the IAP that just deleted the end statement. Hex Back
(4) Rename the two hex-crafted hex file to Xxx.hex, then burn the Write tool to the address in the 0x0800 0000 start location.
3, using the Bin file Merge tool to merge two bin files into one (simple and powerful rapid error rate is low, it is recommended to use this method).
Tool Link: http://dl.pconline.com.cn/download/476148.html
Merge the STM32 IAP hex file with the app hex file into a hex file