kbootfs - Freescale Semiconductor

Bootloader for Kinetis MCUs
Flash Programming Utility over Serial Communication
Overview
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
Bootloader
Bootloader
forConfigurations
Kinetis MCUs Configurations
Bootloader
Source
ROM Bootloader
Flashloader
(Binary, MCU specific)
(Binary, MCU specific)
= Freescale validation and automated test
Optional
Flash-resident
Bootloader
(Source, Configurable)
Bootloader Configuration Comparison
Bootloader Configuration
ROM Bootloader
Flashloader
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
Feature
*List of supported devices on www.freescale.com/kboot
Flash-resident Bootloader
ROM Bootloader
Flashloader
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
UART
USB Device HID
Additional
Interfaces
Command &
Data Processor
• Command phase state machine
• Command handlers
Abstract Memory Interface
SPI Slave
Abstract Byte and
Packet Interfaces
I2C Slave
RAM
Flash
I/O
Additional
Interfaces
Features
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
UART
www.freescale.com/kboot
Get Connected
Join the Freescale Community
www.freescale.com/community
SPI
Follow Freescale on Twitter
IC
www.twitter.com/freescale
2
USB HID
• Common packet-based protocol for
Visit Freescale on Facebook
www.facebook.com/freescale
all peripherals
Packet error detection and
retransmission
• Configurable for Flash-resident and
ROM bootloaders
Options for executing bootloader at
startup or application runtime
Communication peripherals
enabled/disabled
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