There is chapter for AN4258:
6 How to write a user application
You must ensure that the user application does not interfere with bootloader area 0xF000-0xFFFF.
- Create a new project in CodeWarrior Development Studio for Freescale HCS12(X) Microcontrollers.
- Open the .prm file
- Trim the segment ROM_C000 from the origianl size 0xC000–0xFEFF to 0xC000–0xEFDF. This is because the area 0xF000–0xFFFF is occupied by the bootloader and the area at address 0xEFE0–0xEFFF will be used for the user application reset vector.
If interrupts are used:
- Trim the segment ROM_4000 from the original size 0x4000–0x7FFF to 0x4000–0x7F0F. The area 0x7F10–0x7FFF will be used for the relocated interrupt vector table.
- Create a vector table as shown in the attached demo applications and set the IVBR register accordingly. The IVBR sets the interrupt vector table base address and in this case must be set to 0x7F.
Could you please confirm that you create your application according this procedure?
In default prm file is defined reset vector VECTOR 0 _Startup.
This will generate record in output s19 file like S105FFFEC0003D.
Since address 0xFFFE is already occupied by bootloader reset vector, please erase this line from your application s19 file.
Note: S105FFFEC0003D decoding:
S1 is type of record (16bit address),
05 is size of record in bytes,
FFFE is address of reset vector,
C000 is content of reset vector (start address of your applicaction).
3D is CRC checksum.
When we use ROM_4000 segment (0x4000–0x7FFF) in user application we have to disabling the optimization that changes JSR's into BSR's = the project settings will include the following compiler option: -Onb=b (Go to standard setings (Alt+F7), compiler for HC12, add command line argument -Onb=b (if missing)).