I have a Bootloader and application files in project with part of S912G128MLL, and I want to merge and write them in the flash, Please tell me where to start.
There are more ways how to do it.
The simplest is method is direct editing *.s19 (*.sx) file and copy flash content from one file into another.
You may also use SRecCvt tool for sorting data in the final S-record file.
The next option is including your bootloader S-Rec file into your application project (or opposite) by simple line in *.prm linker file.
For more details, please check chapter 8 in AN4258
For more details regarding *.prm linker file, please follow "c:\Freescale\CW MCU v11.0\MCU\Help\PDF\MCU_Build_Tools_Utilities.pdf" document.
I hope it helps you.
Have a great day,Radek
*/The simplest is method is direct editing *.s19 (*.sx) file and copy flash content from one file into another.*/
If it's possible please explain this method more.
Thank you for your post.
The bootloader and application code must be located at different address areas. Any Flash sector which share bootloader and application code is potential source of issue. Therefore bootloader-application border must be aligned by flash sector size.
So, there should not be also any overlapping in s-recod files.
Every s-record line contains S record type identifier, length, address, data, and CRC. SREC (file format) - Wikipedia
The S-Rec files are text files. You may simply copy all S1/S2 lines (starting by “S1” or “S2”) from the bootloader s19 file into application s19 file (or opposite).
You may ignore all lines except S1/S2 - like lines starting with S0 (file header) or S9 (at end of file).
Note: The S3 format is not relevant for 16bit MCUs.
If there is overlapping at addresses with reset vector(s) use lines from bootloader code.
Please check AN4258 for more details.
Retrieving data ...