User guide
14
Atmel AVR2054
8390B-AVR-12/11
Another use of the Bootloader PC tool is initiating Over-the-Air Upgrade. This
document does not cover this usage of the tool. A complete guide to Over-the-Air
Upgrade of ZigBee networks is given in [3].
4.1 Using the Bootloader PC tool
To install the Bootloader PC tool, launch the installation file and proceed with
instructions. After setup is completed both GUI and console versions of the
bootloader are extracted to the provided installation path. The Bootloader PC tool is a
Java application, and to launch it Java must be installed on the host PC. If Java is not
installed, it can be downloaded from http://java.com/en/download/.
As a firm
ware image the Bootloader PC tool requires a file in the Motorola S-record
hexadecimal format, also known as SREC or S19 format. Such file names have the
.srec extension and can contain both flash memory and EEPROM images.
NOTE An application that is to be loaded by the embedded bootloader with DFU support
should include the DFU component as well. See Section 3.2.2.1.
NOTE
To program a device that contains the embedded bootloader with DFU support (such
as the embedded bootloader for Atmel SAM3S) you may also use the third-party
software, since DFU components provided with this software package closely adhere
to the DFU standard.
4.1.1 Generating SREC image
4.1.1.1 Usi
ng GCC tools
An SREC image can be generated from initial binary image with the help of a special
tool supplied with a tool chain.
• For Atmel AVR use
avr-objcopy.exe tool provided in AVR toolchain for Atmel
AVR Studio 5 (as well as in WinAVR)
• For ARM use
arm-elf-objcopy.exe tool, which is a part of the Yagarto GCC
toolchain
For example, to generate an SREC image from a .hex image for AVR run a command
in the following format from the command line:
avr-objcopy.exe -O srec --srec-len 128 <srcFile> <destFile>
For ARM just replace the name of the AVR tool with arm-elf-objcopy.exe. Note
that this tool takes an image in the .elf format as input.
4.1.1.2 Using IAR tools
If you use IAR toolchain to compile applications you may also specify a directive for
the linker to create an SREC image:
• For command line compilation add
-Omotorola-s28=<path>/<fileName>.srec to
the linker flags
• For IAR Embedded Workbench
o Open configuration’s options and go to
Linker
o On the
Extra Output tab check the Generate extra output file
box, specify the image name and select
motorola-s28 as Output
format
NOTE An image generated by the IAR compiler may be also converted to SREC format with
the
avr-objcopy.exe or arm-elf-objcopy.exe.










