Function of the software
After
RESET the bootloader is started instead of the application program. The
bootloader waits for a configurable time (default .5 sec.) for a data
frame from the PC. It it does not receive a data frame from the PC
within this time, the bootloader starts the application by accessing
the RESET vector of the application. The application program is not
affected by the bootloader and has all resources available.
Interrupts
Interrupts
are fully supported. The bootloader itself does not use any interrupts;
for different processors we use different mechanisms to make sure the
interrupts are fully usable.
Safety, reliability
The
transmission uses parity as well as a protocol with checksum to make
sure the transmission works reliably. In AUTO-mode, a CRC-check is
executed on both sides to finally make sure that the program on the
target side is identical to the one loaded into the HEXLOAD Windows
program.
Availability
The
software is written completely in ANSI-"C" and can therefore be used on
most microcontrollers. The only things needed to port the bootloader
for a particular application are: a "C"-module for access to the
peripherals of the microcontroller and a "C"-module containing the
programming algorithm for the FLASH-memory chip(s). At this moment
ports are available for Renesas M16C and M77 controllers and for a
variety of FLASH chips. Ports to other microcontrollers can be made in
short time.
|
Memory
The
bootloader is located in an 8kb memory area. The RESET vector is
generally part of this memory area. This way, after RESET the
bootloader is automatically started instead of your application
program. With most CPUs, this boot area is located at the top of the
program memory (top 8kb). However, with some CPUs, which have the
RESET-vector at the bottom of their program memory area, this boot
block is also located at the bottom. Even other configurations, where
the RESET-vector is located in the middle of the program memory (e.g.
the top end of the bottom 64kb bank, as with the Renesas MELPS series)
are supported. Everything but this boot block can be used for the user
program. The only difference for the application program is that it is
relocated, including its reset vector.
|
Configuration
The
target program can be configured to meet the requirements of the
application by modifying a configuration file CONFIG.H. Adjustable are
baudrate, system frequency of the CPU, interface selection, reset delay
and the optional password.
Sample for a configuration file CONFIG.H:
|
/******************************************************** * * * Configuration of Boot loader * * * ********************************************************* */
/* CPU settings */ #define UPCLOCK 10000000 /* CPU frequency [Hz] */
/* Password / Name settings */ #define APPNAME "Unspec. Application" #define PASSWORD "" /* password, optional */
/* Address settings */ #define FLASH_USER_START 0x10000 /* start of USER area */ #define FLASH_USER_LEN 0x18000 /* length of USER area */
/* Communication parameters */ #define UARTSEL 0 /* select UART to use */ #define BAUDRATE 19200 /* select baudrate */
/* Preferences */ #define RESETDELAY_MS (500) /* dwell time after reset before application is started [ms] */
Further
customizations - i.e. special initialization of the hardware - can be
achieved by modifying the source code. Using a different FLASH chip is
no problem, even automatic recognition of the used FLASH chip is
possible through reading of device- and manufacturer ID.
|
HEXLOAD PC-Program for Windows
HEXLOAD
is a 32-bit Windows program for Windows NT, 95, 98. It is very easy to
use. Any Intel Hex or Motorola file can be loaded and transferred to
the bootloader for a program update. The program can also be run from
the command line.
|
 |
A progress indicator informs you about the status of all data transfers:
 |
|
Click Here for Information about the emLoad Updater.
|
|