Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ASF SAM D21 Firmware Generator for USB Host Mass Storage Bootloader

Introduction

SAM D21 Firmware generator application is to provide a easy way to generate firmware with CRC32 and signature bytes. The firmware is fully compatible for the SAM D21 USB Host MSC Bootloader.

  • Do complete chip erase.
  • Program the firmware generator application
  • Load the application firmware into U-disk. Connect it to the SAM D21 USB MSC Host.
  • Application generates & appends CRC32 with signature bytes to the whole binary.

Bootloader Configuration

Bootloader Configurations are managed in conf_bootloader.h

  • CONSOLE_OUTPUT_ENABLED -> Enable/disable the Console message output
  • APP_START_OFFSET -> Application starting offset from Flash
  • FIRMWARE_IN_FILE_NAME -> Input Application Firmware
  • FIRMWARE_OUT_FILE_NAME -> Output Application Firmware for bootloader
  • APP_SIGNATURE -> Signature bytes to be verified

Application Output Format

The application binary structure is modified by the firmware generator. The final application binary structure would be as below

  • 4 bytes -> CRC
  • 12 bytes -> Signature Data
  • Rest data -> Input Firmware

A sample application binary output is provided for testing with the firmware generator.

Dependencies

The application uses the following module groups: