SAMA7D65-Curiosity – Configure and Build at91bootstrap to Load an MPLAB® Harmony v3 Application from SD Memory Card
Introduction
This training describes how to download, configure, and build at91bootstrap to load an MPLAB® Harmony v3 software framework application binary image (harmony.bin) from an SD memory card to DDR3L SDRAM on the SAMA7D65-Curiosity kit using MPLAB X Integrated Development Environment (IDE).
Once at91bootstrap has been built, the resulting binary image (boot.bin) needs to be converted to a binary image with header. The converted binary image can be copied to the SD memory card.
Prerequisites
Download at91bootstrap.
Create a Project Directory.
For the purposes of this training, we’ll name our project directory "at91bootstrap".
Download or clone at91bootstrap version 4.0.10.
Download or clone from the Linux4sam GitHub repository.
Open the at91bootstrap project.
From MPLAB X IDE, select File > Open Project…
An Open Project dialog is displayed.
Find and select the at91bootstrap project directory.
Click on the Open Project button.
The at91bootstrap project will be displayed in the Projects pane (upper left) and in the at91bootstrap – Dashboard pane (bottom left).
Configure the at91bootstrap Project Properties.
Open the at91bootstrap Project Properties using one of the following methods:
- In the Projects pane, highlight at91bootstrap and click on the wrench icon in the at91bootstrap - Dashboard.
- In the Projects pane, right-click on at91bootstrap and select Properties from the menu.
The Projects Properties – at91bootstrap dialog box opens.
Configure the MPLAB XC32 compiler.
In the Categories pane, select Makefile.
Enter the following text in the Build command and Debug build command boxes:
make CROSS_COMPILE="C:/Program Files/Microchip/xc32/v4.45/bin/bin/pic32c-"
Enter the following text in the Clean command box:
make mplabclean CROSS_COMPILE="C:/Program Files/Microchip/xc32/v4.45/bin/bin/pic32c-"
Click on the Apply button.
Configure at91bootstrap to load harmony.bin from an SD memory card.
In the Categories pane, select Kconfig and click on the Load button.
Find the at91boostrap project directory and select configs directory and then select sama7d65_curiositysd1_uboot_defconfig and click on the Open button.
Make the following changes:
In this step you are taking an existing default configuration and altering it to load the MPLAB Harmony v3 application (harmony.bin) from an SD memory card. This makes configuration a little bit easier than starting from scratch.
Expand Next Software Type and select the Load 4 MB into start of SDRAM radio button.
Expand Demo Application Image Storage Setup.
Enter the address to load the application 0x66f00000 to The External Ram Address to Load Demo-App Image.
This value should match the .text load address in the applications linker script (ddr.ld). This value is shown in the accompanying image for the pio_led_on_off_interrupt application.
Enter "harmony.bin" to Next Software Image File Name.
Click on the Apply and OK buttons.
Build at91bootstrap.
Build the at91bootstrap project using one of the following methods:
- In the Projects pane, right-click on at91bootstrap and select Build from the menu.
- Click on the Build icon (hammer) in the tool ribbon.
Observe that the build is successful.
Note the location of boot.bin:
<project_directory>\at91bootstrap\build\binaries\boot.bin
The boot.bin file is the binary image of at91bootstrap. The boot.bin image needs to be converted to a binary image with header. The converted binary image can be copied to an SD memory card with a FAT formatted partition.
Summary
The at91bootstrap has been configured and built to load an MPLAB Harmony v3 software framework application from an SD memory card on the SAMA7D65-Curiosity.