emLoad is a software for program updates for embedded applications via serial interface from a PC. The software consists of a Windows program and a program for the target application (bootloader) in source code form.
An increasing number of embedded applications uses in-circuit re programmable memory chips. These chips can be dedicated EEPROM or FLASH-memory chips or microcontroller with on-chip FLASH-memory. The advantage of this technology compared to the old generation of on-time programmable or mask programmed chips is obvious: The application can be reprogrammed at any time, i.e. after assembly of the hardware or even after shipment at customers site in case of a bug or new features. The only things required are an embedded application with a FLASH-type memory for program storage, a communications interface (type. RS-232) and the software for application and PC: emload.
Features
|
File types and conversion
|
Function of the software | Memory |
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 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
|
Interrupts | Safety, reliability |
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.
|
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
|
Configuration | Availability |
The target program can be configured to meet the requirements of the application by modifying a configuration file CONFIG.H. Adjustable are baud rate, system frequency of the CPU, interface selection, reset delay and the optional password.
|
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. |
/******************************************************** * * * 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 initialisation 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.