User guide
Atmel AVR2054
11
8390B-AVR-12/11
when the DFU component is installed, it may stop responding due to application
failure. In these cases the device will not be able to process commands from the PC
tool and thus initiate reset and perform the firmware upgrade.
To load an image using bootloader into such device, connect JTAG’s PB7 pin to
ground and reset the device. On an Atmel SAM3S USB stick, these are the first two
pins of the JTAG port and so can be connected with a jumper wire.
3.2.2.3 Additional remarks
Below are some more features:
• If one loads a firmware image to a device via the embedded bootloader for SAM3S
and then reads the image using JTAG it will not equal the initial binary image. The
difference will be in the first four bytes where the bootloader replaced the reset
vector
• Both the embedded bootloader and an application cannot be loaded via JTAG. If
the device is first programmed with the embedded bootloader and then with the
application, by default the execution will start with the application code. And if the
application is programmed first, the embedded bootloader once programmed will
not be aware of the presence of the application
3.3 Configuration and compilation
Application configuration options are collected in the configuration.h file. Use this
file to configure the following:
• Serial interface used to receive a firmware image from the host: skip to the
#ifdef
section regarding the MCU. For example, setting the USART1 port for an Atmel
ATmega128RFA1 MCU is done like this:
#ifdef ATMEGA128RFA1
// Use USART0
//#define USART0_
// Use USART1
#define USART1_
// Use USB_FIFO
//#define USB_FIFO_
#endif
• (Not applicable to SAM3S) Type of external flash device used to store the
application image during an over-the-air upgrade (
TYPE_EXTERNAL_MEMORY
parameter). For example, the default setting is given by the following line:
#define TYPE_EXTERNAL_MEMORY Atmel25F2048
//#define TYPE_EXTERNAL_MEMORY Atmel45DB041
To use an alternative option, Atmel45DB041, uncomment the corresponding line.
Build configuration options for compilation with the make utility are contained in
makefiles in the
makefiles directory, while build configuration options for compilation
in IAR Embedded Workbench are contained in IAR project files.










