weAut_01 / weAutSys    R 2.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Functions | Variables
D:/eclipCeWS/atMegaBootloader/bootloader/boot109.c File Reference

Overview

Implementation of weAutSys' serial bootloader program.

weAutSys comes with a serial bootloader according to Atmel Corporation application note AVR109 on "Self-programming".

This bootloader is (as of end 2014) implemented for and tested on four different target platforms respectively µControllers:

By C macro control and by Make support this implementation covers said platforms respectively µControllers.

Besides to those targets this serial bootloader can easily be adapted to all similar platforms respectively to all AVR 8 bit ATmega µCs featuring self-programming capability.

In this implementation the serial bootloader's baudrate is defaults to

  1. This setting yields quite a good performance as well as good transmission quality. In a way 38400 is the best value for serial boot-loading. Using lower rates would throw performance away, while higher baud-rates might require more buffering as flashing would get much slower than serial transmission in some cases.
    Regarding the transmission quality 115200 was tested successfully on (real) RS232 links and with excellent cabling conditions and very accurate clock frequency generators.

An exception to the 38400 baud rule is the easyAVR evaluation board. It is shipped with a 8 MHz quartz for the CPU clock generator, even if the ATmega32 could use 16 MHz. 8 MHz gives poor accuracy for 38400 baud; hence we use 19200 as standard (set in the respective includes) for this platform.

All target platform's specific settings are organised in include files for both the C-Compiler and the make-tool. Please read those files for the respective platform and on how to extend this project to other hardware targets.

For technical background information on serial bootloading for ATmegas and this bootloader please read a-weinert.de/pub/AVRserBootl.pdf.

Revision:
1
Date:
2017-01-25 12:03:06 +0100 (Mi, 25 Jan 2017)

Functions

void basicSystemInit ()
 Initialise system resources.
void bootLoaderGreet (void)
 Send the greeting lines for bootloader's start.
int main (void)
 The bootloader's start.

Variables

char const bootRevDat []
 The bootloader's revision and date.
char const greetByCLI []
 Greeting text for the case of being entered by CLI.
char const programmerHWver []
 The programmers hardware version.
char const programmerSign []
 Software identifier/programmer signature.
char const programmerSWver []
 The programmers software version.

Variable Documentation

char const greetByCLI[]

Greeting text for the case of being entered by CLI.

If the bootloader was entered by a command line interpreter (CLI) due to human command via UART, a greeting response may be sent via that serial line extended by below hints on (AVR109) bootloader commands.

This response will only be sent if the macro ALLOW_UART_GREET_BOOTLOADER_BY_CLI is defined with a value !=0. This setting if usually done in a platform specific include file.