Setup Procedure

This chapter describes the setup procedure from creating an example project based on firmware pack to running a bootloader demo.

In the following, Atmel Studio is taken as an example to describe the setup procedure.
  1. Download the example firmware package for Atmel Studio from Atmel | START.
  2. Create firmware project with the firmware package in Atmel Studio (7 or higher).
  3. Set linker options and pre-defined symbles for the project in Atmel Studio.
    On the project property window, trace ToolChain--AVR/GNU Linker--Miscellaneous, and add the following line:

    -Wl,--relax -Wl,--section-start=.mysection=0x1E000 -Wl,--section-start=.text=0x20000

    Trace ToolChain--AVR/GNU C Compiler--Symbols, and add the following symbols:

    BOARD=XMEGA_A1U_XPLAINED_PRO
    IOPORT_XMEGA_COMPAT
    SD_MMC_ENABLE

  4. Build the firmware and generate a bootloader image file (.elf, .hex, etc).
  5. Connect the I/O1 Xplained Pro board to the XMEGA A1U Xplained Pro board at EXT1 connector, and connect the latter to the PC by the EDBG USB port on the board.
  6. Program the fuse bit BOOTRST, which makes the XMEGA A1U run from the bootloader section.
  7. Program bootloader image into the flash memory.
  8. Store test.bin to the SD card, and mount the card on the I/O1 Xplained Pro board.
  9. If SW0 is pressed after reset or no application firmware in application flash section, the boot mode is triggered. It will try to find an SD card and re-program the application section with the test.bin file in the SD card.