This training topic describes configuring and building at91bootstrap for loading and debugging an MPLAB® Harmony 3 project on the SAM9X60-EK Evaluation Kit using the MPLAB X Integrated Development Environment (IDE).
The at91bootstrap is used by MPLAB X IDE to initialize DRAM so that it can continue loading the MPLAB Harmony 3 Software Framework project binary (harmony.bin). Once the project has been loaded onto the SAM9X60-EK, MPLAB X IDE can be used to develop and debug the application.
at91bootstrap is a second-stage bootloader for Microchip Technology Arm®-based microprocessors (MPU). For more information see the "at91bootstrap: A Second Stage Bootloader for Microchip MPUs" page.
The following are prerequisites for this training:
This training topic was developed with MPLAB X IDE v6.05 and XC32 v4.21.
Create a Project Directory.
For the purposes of this training topic, we’ll name our project directory at91bootstrap.
Download or clone at91bootstrap version 4.
Download or clone from the Linux4sam GitHub repository.
This training topic was developed with at91bootstrap version 4.0.5.
Open Project at91bootstrap
From MPLAB X IDE, select File > Open Project…
An Open Project dialog is displayed.
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).
You may receive a Configuration Loading Error. This is due to an older version of the Device Family Pack (DFP) at the time of creating the at91bootstrap project. You will update the DFP to the latest version in the next steps.
Configure at91bootstrap Project Properties
Open 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.
If you received a Configuration Loading Error in the previous step, you may see a [Resolve] link next to a version of the DFP. Highlight the latest DFP and click on the Apply button. This will update the configuration to the latest DFP.
Configure the 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.21/bin/bin/pic32c-""
Click on the Apply button.
In the cross-compiler path entered above, type the version number of the XC32 compiler on your host computer. In this step, we are using version 4.21.
The installation location of the XC compiler versions can be found by selecting from the MPLAB X IDE toolbar: Tools > Options. An Options dialog box will open. Select Embedded from the toolbar and select the Build Tools tab.
When cutting and pasting, beware of hidden formatting characters.
Observe the following settings:
Click on the Apply and then the OK button.
The Project Properties dialog will close.
This concludes configuring the at91bootstrap Project Properties.
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.
Note the location of at91bootstrap.elf:
The at91bootstrap has been customized and compiled for debugging using the MPLAB X IDE for the SAM9X60-EK Evaluation Kit.
The at91bootstrap has been configured and built to load and debug an MPLAB Harmony 3 Software Framework project using the MPLAB X IDE for the SAM9X60-EK Evaluation Kit.
Once at91bootstrap has been configured and built, it can be used with an MPLAB Harmony 3 Software Framework project. The at91bootstrap.elf file is configured in the Project Properties as shown in the example figure below.
MPLAB X IDE uses at91bootstrap to initialize DRAM and continue loading the MPLAB Harmony 3 application binary image (harmony.bin) using a Debug Probe. Once the project has been loaded onto the SAM9X60-EK, MPLAB X IDE can be used to develop and debug the application.
For training topics on configuring at91boostrap from Non-Volatile Memories (NVM), see:
Second-Stage Bootloader at91bootstrap
- SAM9X60-EK – Configure and Build at91bootstrap to Load an MPLAB Harmony 3 Application from NAND Flash Memory
- SAM9X60-EK – Configure and Build at91bootstrap to Load an MPLAB Harmony 3 Application from NOR Flash (QSPI) Memory
- SAM9X60-EK – Configure and Build at91bootstrap to Load a MPLAB Harmony 3 Application from SD Memory Card