Specifications
MCU slave software
Developer’s Serial Bootloader, Rev. 13
Freescale Semiconductor 37
– The MCU with bigger/equal flash than 64 KB (2048 B flash protection block): In this case
the start of the user application should start on the second protection block plus vector table
size. The vector table basically should be placed on the start of second protection block.
– The MCU with smaller flash than 64KB: In this case the user application should start on
0x800 with interrupt vectors and the application follows above the interrupt table.
– To modify linker file in more detail, see Memory allocation.
2. Flash configuration registers: The configuration of Flash (protection, security and others) is placed
in Kinetis on address 0x400 because this address is placed in area of bootloader code, it should be
removed definition of these registers from the user application.
3. VTOR register: Some user applications setup the VTOR(Vector Table Offset Register) register on
startup with default value (0x0000), so the configuration of this register could be removed or
updated to point to currently used vector table (In general case is the first byte of user application).
7.9 Using Kinetis bootloader for MQX based application
Kinetis bootloader can be used for programming of MQX based application. This topic explains what has
to be done in MQX application to be ready for use with AN2295 bootloader.
The following steps are similar to the user application described in the Quick guide: How to prepare the
user Kinetis application for AN2295 bootloader section, modification of VTOR register does not required
by MQX based application.
The following two things must be updated in the MQX project:
1. Linker File: In the linker file of MQX the situation is similar to bare metal user application. The
MQX application has to be moved above the AN2295 bootloader code. The MQX Linker file is
using as standard linker definition as own some. For example the updated lines from Linker file for
K60N512 and IAR6.4 tool:
• define symbol __ICFEDIT_intvec_start__ = 0x00004000;
• define symbol __ICFEDIT_region_ROM_start__ = 0x00004000;
• define exported symbol __INTERNAL_FLASH_BASE = 0x00004000;
• define exported symbol __VECTOR_TABLE_ROM_START = 0x00004000;
2. Flash configuration registers: The setting of the flash configuration registers is simpler in MQX
application than in general bare metal application. It is enough to define one MQX macro:
• #define BSPCFG_ENABLE_CFMPROTECT 0
NOTE
There could be with disabling the CFMPRROTECT with some BSP, but this
should be solved individually.
8 MCU slave software
This section provides a detailed description of the five typical M68HC(S)08, Cold Fire V1 and Kinetis
bootloader implementations. All code is written in assembly language. Several selected targets and
different features are described in the following table:










