SAM9X60 Curiosity Development Board - Configuring and Building at91bootstrap for an MPLAB® Harmony 3 Project Using MPLAB® X IDE
- Configuring and Building AT91Bootstrap
- Prerequisites
- Download AT91Bootstrap
- Configure AT91Bootstrap Project Properties
- Configure Makefile Properties
- Build AT91Bootstrap
- Summary
- What's Next?
Configuring and Building AT91Bootstrap
This training topic describes configuring and building AT91Bootstrap using the MPLAB® X Integrated Development Environment (IDE) for loading and debugging on the SAM9X60 Curiosity Development Board an MPLAB Harmony 3 project.
Background
The AT91Bootstrap is used by MPLAB X IDE to initialize DRAM so that it can continue loading the MPLAB Harmony 3 project binary (harmony.bin). Once the project has been loaded onto the SAM9X60 Curiosity Development Board, MPLAB X IDE can be used to develop and debug the application.
Prerequisites
- MPLAB X IDE Installed
- MPLAB XC32 installed
Download AT91Bootstrap
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 into your project directory.
Configure AT91Bootstrap Project Properties
Open AT91Bootstrap Project
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).
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.
Load Default Configuration
Make Changes to the Default Configuration
Expand Primary Operation and select the Configure and stop radio button.
Expand DRAM. Next, expand the DRAM parts and select the DDR2 W971GG6SB (SAM9X60D1G SiP) radio button.
Scroll down and expand Board’s Workaround Options. Expand Workaround for Board Quirks and select the Quirks for SAM9X60_CURIOSITY board radio button.
Configure Makefile Properties
In this section, you will configure the MPLAB XC32 compiler to compile the AT91Bootstrap.
Open AT91Bootstrap Project Properties
Open the AT91Bootstrap Projects Properties.
Configure the MPLAB XC32 Compiler
In the Categories pane, select Makefile.
Copy and paste the following text in the Build command and Debug build command boxes:
Copy the following and paste into the Clean command box:
Build AT91Bootstrap
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 the Build is Successful
Note the location of at91bootstrap.elf:
Summary
The AT91Bootstrap has been configured and built to load and debug an MPLAB Harmony 3 project using the MPLAB X IDE for the SAM9X60 Curiosity Development Board.
What's Next?
Once the AT91Bootstrap has been configured and built, it can be used with an MPLAB Harmony 3 project. The at91bootstrap.elf file is configured in the Project Properties as shown in the example figure:
MPLAB X IDE uses AT91Bootstrap to initialize DRAM and continue loading the MPLAB Harmony 3 project binary (harmony.bin) using a Debug Probe. Once the project has been loaded onto the SAM9X60 Curiosity, MPLAB X IDE can be used to develop and debug the application. The "Migrating a MPLAB® Harmony 3 Software Framework Application from the SAM9X60-EK to SAM9X60-Curiosity: rtt_periodic_timeout" training provides step-by-step instructions.