User guide

12
Atmel AVR2054
8390B-AVR-12/11
3.3.1 Compiler versions
The supported IAR compilers are IAR C/C++ Compiler for AVR v5.51.0.50312 and
IAR C/C++ Compiler for ARM
®
v6.20.3.52642.
The supported Windows
®
AVR GCC (WinAVR) version is 20100110, but it is
recommended to use the latest GCC compiler provided with Atmel AVR Studio 5.
3.3.2 Compilation from the command line and Atmel AVR Studio 4
Whe
n the embedded application is compiled using the command line or AVR Studio
4, compilation employs Makefile placed in the \
Embedded_Bootloader_src\ folder to
determine what makefile from the
makefiles directory shall be used. In Makefile,
specify
PROJECT_NAME to choose among supported MCUs and CONFIG_NAME to select
a particular configuration.
To open the project in AVR Studio 4, launch the
bootloader.aps file from the
\
Embedded_Bootloader_src\ folder.
3.3.3 Compilation from Atmel AVR Studio 5
To
compile the bootloader application in AVR Studio 5, open the appropriate project
file from the \
Embedded_Bootloader_src\as5_projects directory, choose a
particular build configuration from the list on the toolbar, and select
Build form the
Build menu.
3.4 Programming embedded bootstrap
If not already present on the MCU the firmware part of embedded bootloader (.hex
file) shall be uploaded to the device to enable programming over serial interface. AVR
Studio [1] and Atmel AVR JTAGI
CE mkll emulator [2] are recommended for loading
an embedded bootloader image. Note that to work correctly embedded bootloader
requires specific fuse bit settings that depend on the target platform and bootloader
functionality (see Section 2.2).
CAUTION Setting JTAG fuse bits incorrectly may cause improper device functionality.
3.5 OTAU/BitCloud bootloader features
The OTAU bootloader is a version of embedded bootloader that can additionally be
used to upload BitCloud application to a device through Over-the-Air upgrade
(OTAU). Unlike the common bootloader, the OTAU bootloader contains a driver,
which is able to transfer an image from the external flash device to the MCU’s flash
memory as illustrated in Figure 3-3.
The OTA
U bootloader is still able to write an application image received via a serial
interface to the flash as a common embedded bootloader. But it has more functions.
An application image, supporting OTAU typically includes the driver, which writes the
parts of the new application image received during the upgrade to an external flash
device. Once a new image is loaded, the application sets a new image available
status bit in EEPROM and resets. On startup after the reset the bootloader checks
this status bit and, if it is set, transfers the image from the external flash memory to
the internal MCU’s flash memory.