Atmel AVR32931
9
32162A-AVR-03/11
blankcheck
loadbuffer
your_firmware_file.hex
program verify
start reset 0
5. The firmware should now be running.
NOTE
The bootloader can only be synchronized once after power up, which means it is
possible to connect to the target only once, using BatchISP. If everything was not
able to be done on the first try, power cycle the board and run the command again.
An example of programming the device via the bootloader can be seen in
Figure 5-2
.
Note that the output gives a warning about the user program and the bootloader
overlap. This happens because the bootloader resides in the start of the flash section,
which is the same area as the trampoline area in which the user code is located. As
the bootloader is protected, the bootloader will not be overwritten.
Figure 5-2.
Example of programming with BatchISP.
For more information about the BatchISP command line tool, run
batchisp –h
from a
command line to get a list of options and parameters. Read the help file for
FLIP
for
more detailed information.
The bootloader supports reading and writing of the following memories:
•
Flash (0x0000 - 0xFFFF, application section)
•
User (0x000 - 0x1FF, user signature row)
5.2 Restoring the bootloader
When the bootloader has been erased, it can be restored by using any of the
previously mentioned programming tools.
The source for the UART bootloader is part of ASF 2.2.x and later, and can be
downloaded and programmed into the device to restore the bootloader functionality, if
the bootloader was accidently erased.
NOTE
The bootloader section is protected, and can only be erased by using an external
programmer.