Specifications

PC bootloader master software
Developer’s Serial Bootloader, Rev. 13
Freescale Semiconductor 57
required for USB are also inside the JW32 folder of the AN2295SW software package. Alternatively, the
latest on-line version of the PC drivers is available on the ZSTAR summary page (RD3152MMA7260Q).
NOTE
Although serial COM emulation on the JW32 has been successfully tested
in Linux, a Linux port of hc08sprg executable of the AN2295 bootloader
master was not tested together with theJW32 bootloader USB
implementation.
8.13 HCS08JM and MCF51JM
The MCF51JM family has a built-in USB 2.0 Full Speed module. This allows a direct connection through
a true USB interface with the PC. As described in AN3492: USB and Using the CMX USB Stack
application note, the emulation of the serial COM port can be easily designed. This way, a fully compatible
bootloader (written in C) for the HCS08JM and MCF51JM families has been designed. This USB driver
is used for communication with the PC Communication Device Class (CDC). The basis of this
communication is creating a Virtual Serial Port on the PC side. This feature allows using master bootloader
software without any modification of the source code. For more information, refer AN3492 : USB and
Using the CMX USB Stack.
9 PC bootloader master software
This section provides a detailed description of the bootloader host computer master software, which is
downloadable as a zip file from the Freescale Semiconductor website, freescale.com. All code is written
in C language and is compatible with Linux
and Win32 platforms.
The bootloader specifications dictate that, as much as possible, intelligence is executed in the host
computer instead of MCU, minimizing MCU memory consumption. Only primitive functions are
implemented in the MCU.
In this section, portions of the master bootloader code will be described in more detail. All actions required
for reprogramming the M68HC(S)08, Coldfire V1, and Kinetis devices are described in the slave
implementation and protocol sections of this document. The specific master characteristics are
emphasized.
The host computer master software design is straightforward and is a sequence of several steps:
Opening the serial port
Opening the source S19 file
Waiting for the reset of the MCU
Calibrating the MCU
Reading MCU information
Remapping MCU interrupt vectors
Checking if the source S19 data fits into the physical MCU memory
Erasing and programming MCU
Cleaning up, exiting program