kbootfs - Freescale Semiconductor

Bootloader for Kinetis MCUs
Flash Programming Utility over Serial Communication
The bootloader for Kinetis MCUs is a configurable flash programming utility that operates over
a serial connection on Kinetis MCUs. It enables quick and easy programming of Kinetis MCUs
through the entire product lifecycle from application development to final product manufacturing
and beyond for updating applications in the field with confidence. The bootloader for Kinetis
MCUs is delivered in two ways. It is provided as full source code that is highly configurable
and is also pre-programmed by Freescale into ROM or flash on select Kinetis devices.
Host-side command line and GUI tools are available to communicate with the bootloader.
Users can utilize host tools to program application code via the bootloader.
The bootloader for Kinetis MCUs has three different configurations in order to suit various
customer needs. Flash-resident bootloader, ROM bootloader and Flashloader are all developed
from a single source with different configurations.
Kinetis MCUs Configurations
ROM Bootloader
(Binary, MCU specific)
(Binary, MCU specific)
= Freescale validation and automated test
(Source, Configurable)
Bootloader Configuration Comparison
Bootloader Configuration
ROM Bootloader
Flash Bootloader
Factory flash programming &
fIeld update
Factory flash programming
Field update
Delivery Mechanism
Binary preprogrammed in ROM
by Freescale
Binary preprogrammed in flash
by Freescale
Source code provided in major release
Supported Devices
All Kinetis devices with a boot ROM
Select Kinetis devices without a ROM*
Select Kinetis devices*
Clock Configuration
Configurable by user
Is configured by Freescale to a
default setting
Configurable by user
Can run at system startup or callable
from user application
Always run at system start-up
Can run at system startup or callable
from user application
Can jump to user application after
peripheral timeout
Overwritten by user application
Can jump to user application after
peripheral timeout
Use Case
*List of supported devices on www.freescale.com/kboot
Flash-resident Bootloader
ROM Bootloader
The flash-resident bootloader for Kinetis
The ROM bootloader for Kinetis MCUs is a
The Flashloader is another specific
MCUs is provided as a source code which
specific implementation of the bootloader
implementation of the Kinetis bootloader. The
showcases the full features of the bootloader
for Kinetis MCUs. The bootloader command
bootloader command interface is packaged
for a Kinetis device. Customers could either
interface is packaged as an executable
as an executable that is loaded from flash
use it as a flash-resident bootloader example
that is part of the device ROM. The ROM
and executed from RAM. This configuration
or have the option to customize it for their
bootloader can never be erased and thus
allows the user application to be placed
specific needs. The flash-resident bootloader
can be used to program the Kinetis MCU
at the beginning of the flash where it will
resides persistently in device flash and load
flash memory at manufacturing time and
automatically be launched upon boot from
the user application to the rest of the flash
to update the user application image in the
flash. The Flashloader in the flash will be
region. The starting address of user application
field. On a blank flash, the ROM bootloader
erased by the user application and thus it is
is configurable by users at the bootloader
will execute. Once the flash is programmed,
intended to be a one-time programming aid.
compile time for maximum flexibility.
the value of the FOPT field in the flash and
the NMI pin will determine if the device
boots from the ROM bootloader or the user
Bootloader Block Diagram
application in flash.
Bootloader Block Diagram
Peripheral Interfaces
Memory Interfaces
USB Device HID
Command &
Data Processor
• Command phase state machine
• Command handlers
Abstract Memory Interface
SPI Slave
Abstract Byte and
Packet Interfaces
I2C Slave
Get Started
• A common bootloader for Kinetis MCUs
Learn more:
• C/C++ source code provided under a
permissive BSD open source license
• Supported serial communications with
active peripheral detection
Get Connected
Join the Freescale Community
Follow Freescale on Twitter
• Common packet-based protocol for
Visit Freescale on Facebook
all peripherals
Packet error detection and
• Configurable for Flash-resident and
ROM bootloaders
Options for executing bootloader at
startup or application runtime
Communication peripherals
Peripheral timeout
Data/clock rate for various
communication interfaces
• Flash security and flash region
protection options
• Command-line and GUI tools provided
for Windows
• IAR toolchain support
For more information visit freescale.com/kboot
Freescale, the Freescale logo and Kinetis are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. All other
product or service names are the property of their respective owners. All rights reserved. © 2015 Freescale Semiconductor, Inc.
Document Number: KBOOTFS REV 0