User Tools

Site Tools


manual:ports:hcs12

This is an old revision of the document!


Freescale HCS12

To configure your software program to work with the OpenBLT bootloader, some modifications are needed. These modifications are detailed in this section. Note that the demo programs are working examples that you can refer to, to determine how to implement these modifications.

Bootloader size

For a typical HCS12 bootloader the flash memory from 0xe800 to 0xfff (6 kbyte) is reserved. The linker descriptor file of the user program should be modified to make sure no code or data is placed in this memory region by the linker:

Checksum location

A 16-bit checksum value is programmed by the bootloader at the end of a programming session. Upon startup, the bootloader verifies the correctness of this checksum to determine if a valid user program is present and can be started.

The user program must reserve space for this 16-bit checksum value. The bootloader programs this value at the begin of the interrupt vector table. To reserve this space, simply enter one extra dummy entry into the interrupt vector table:

Vector table location

The bootloader itself occupies the location where normally the user program's vector table is located. All interrupts from the user program are rerouted by the bootloader to a fixed location that is available to the user program, which is from 0xe780 to 0xe7ff. The vector table relocation can be achieved by changing the ROM start address of the user program's vector table. Note that the size of the user program's vector table is 2 bytes larger than usual as a result of adding the 16-bit checksum. Therefore the start address should be 0xe780 - 0x0002 = 0xe77e:

manual/ports/hcs12.1381324071.txt.gz · Last modified: 2019/09/24 22:14 (external edit)