SAMA7G54-EK – Copy MPLAB® Harmony v3 Application and at91bootstrap to SD Memory Card
Introduction
In this training, you will copy two binary images, harmony.bin (an MPLAB® Harmony 3 Application) and boot.bin (Second-stage bootloader, at91bootstrap), to SD memory card for booting on the SAMA7G54-EK Evaluation Kit. Once the images are copied, the SD memory card is inserted, and upon reset, the SAMA7G54 will boot and run the application.
For this exercise, you will write the binaries that were created in the training topics:
- SAMA7G54-EK – Configure and Build at91bootstrap to Load a MPLAB® Harmony v3 Application from SD Memory Card
- SAMA7G54-EK – Getting Started with MPLAB® Harmony v3 Development: CSP Application: pio_led_on_off_interrupt
Prerequisites
- SAMA7G5 Series Boot Process
- SAMA7G5 Series Data Sheet Section 19. Boot Strategies
- SAM-BA® In-System Programmer (ISP) Host Application installed on the host computer
Hardware
For this training, you will use the SAMA7G54-EK Evaluation Kit.
SAMA7G54-EK Evaluation Kit
Setup the SAMA7G54-EK as listed below:
Jumpers
- Set the jumpers to their default positions as shown in the “Jumper Summary” section of the “SAMA7G54-EK - Features” page.
SD Memory Cards
- Ensure no SD memory cards are plugged into the SD card (J4) slot.
Power
- Apply power as shown in the “Power Options” section of the “SAMA7G54-EK - Features” page.
Secure Digital Multimedia Card (SDMMC)
The SAMA7G54-EK has a Secure Digital (SD) or MultiMediaCard (MMC) memory card slot (J4). It is connected to the Secure Digital MultiMediaCard port 1 (SDMMC1) of the SAMA7G54.
For this training, you will need an SD memory card formatted with the FAT file format.
Setup Console Serial Communications
To view the target console, connect the host computer running a terminal emulation program in accordance with the “SAMA7G54-EK – Console Serial Communications” page.
Copy boot.bin to SD Memory Card
In this section, you will copy the at91bootstrap binary image, boot.bin, to SD memory card.
Change the directory to the location of boot.bin:
<project_directory>\at91bootstrap\build\binaries\boot.bin
Write harmony.bin to SD Memory Card
In this section, you will write the MPLAB Harmony v3 application binary image, harmony.bin, to SD memory card.
Change the directory to the location of harmony.bin:
C:/Users/<user>/Harmony3/csp_apps_sam_a7g5/apps/pio/pio_on_off_interrupt/firmware/sam_a7g5_ek.X/dist/sam_a7g5_ek/production/
Run MPLAB Harmony v3 Application on the Target
In this section, you will insert the SD memory card and wake-up the SAMA7G54-EK to run the MPLAB Harmony v3 application.
Ensure power has been applied as shown in the “Power Options” section on the “SAMA7G54-EK – Features” page.
Ensure the DISABLE_BOOT (J22) jumper is open.
This will allow booting from the onboard memories.
To run the application, press the nSTART (SW3) push button to wake up the MPU. It will take a moment for the SAMA7G54 to boot. Observe the RGB LED (D7) lights green (during boot) and then turns off.
Press the USER BUTTON (SW1) and observe the RGB LED (D7) lights up blue. Release the USER BUTTON and the RGB LED will turn off.
Summary
In this training, you copied the binary files harmony.bin and boot.bin to SD memory card for booting on the SAMA7G54-EK and ran the application on the target.
Learn More
For training topics on configuring at91boostrap for other Non-Volatile Memories (NVM), see:
Second-Stage Bootloader at91bootstrap
- Configure and Build at91bootstrap to Load a MPLAB Harmony 3 Application from NOR Flash (QSPI) Memory
- Configure and Build at91bootstrap to Load a MPLAB Harmony 3 Application from e.MMC Memory
Writing to Non-Volatile Memory (NVM)