SAMA7G54-EK – Copy MPLAB® Harmony v3 Application and at91bootstrap to SD Memory Card

Last modified by Microchip on 2023/11/22 17:15


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: 


This training was developed with SAM-BA ISP v3.7.


For this training, you will use the SAMA7G54-EK Evaluation Kit.

SAMA7G54-EK Evaluation Kit

Setup the SAMA7G54-EK as listed below: 


SD Memory Cards

  • Ensure no SD memory cards are plugged into the SD card (J4) slot.


Back to Top

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.

Back to Top

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.

Back to Top

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:


Copy boot.bin to SD memory card.

Back to Top

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:


Copy harmony.bin to SD memory card.

Back to Top

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.

The USB-A port (J7) also functions as a secondary source to power the SAMA7G54-EK. The port is limited to 500 mA. If greater current is required, the SAMA7G54-EK should be powered via J1.

Ensure the DISABLE_BOOT (J22) jumper is open.

This will allow booting from the onboard memories.

The SD memory card is the default NVM boot memory provided the Boot Configuration Packet has not been written to one-time programmable (OTP) memory or emulation memory.

Insert the SD memory card into slot J4.

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.

The application uses the PIO Peripheral library to generate callback on switch press and release and drives the GPIO pin connected to the RGB LED to indicate the switch status.

Console: running application

Back to Top


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.

Back to Top

Learn More

For training topics on configuring at91boostrap for other Non-Volatile Memories (NVM), see:

Second-Stage Bootloader at91bootstrap

Writing to Non-Volatile Memory (NVM)

Back to Top