Hi Jixiang,
The complete AN4258 software is located at:
http://www.nxp.com/files/microcontrollers/doc/app_note/AN4258SW.zip
The AN4258-Bootloader_S12-updatedS12GN file contains just slightly updated bootloader project from the AN4258SW package.
The documentation is still in the above-mentioned pdf file and AN4258SW package contains also example demo applications, Bootloader for S12X and tools for PLL and S-record file conversion.
The AN4258 Bootloader is designed as demo software. You may use it as it is, modify it or use it just as inspiration. Unfortunately, there is no guarantee or production certification for that code.
The bootloader typically needs modification in case of using different Clock (main.c), SCI module (Regdef.h),… or when we use a different signal for entering into bootloader mode (in the StartS12.s file)… The default AN4258-Bootloader_S12-updatedS12GN project use SCI0 and simple detection of PP0 pin level right after reset.
The S12 Bootloader occupies part of flash include default vector location (0xF000~0xFFFF). So, application linker file must be trimmed for that and application should use own vector table. See demo application in the AN4258SW package.
The generated application s19 file should be simply converted prior sending it through SCI. Using converted s19 file significantly simplifies bootloader logic.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------