SAM9X75 Curiosity Pro - Configure and Build at91bootstrap for Application Debugging With MPLAB® VS Code®
Purpose
The purpose of this tutorial is to:
- Understand the role of at91bootstrap in the system boot sequence
- Configure at91bootstrap for debug support, enabling application loading via a debugger
- Gain experience in customizing bootloader settings such as memory initialization, clock setup and boot source selection
- Build and generate a bootable binary image compatible with the target hardware
Overview
This tutorial focuses on configuring and building the at91bootstrap bootloader for a Microchip Arm®-based platform. at91bootstrap acts as the second-stage bootloader responsible for initializing essential hardware components and preparing the system to load and execute the main application.
In this tutorial, you will modify at91bootstrap configuration to support both debugging and execution of bare-metal or MPLAB Harmony v3 application flow.
Configure at91bootstrap to Debug an MPLAB Harmony Application
The first step is to launch VS Code.
Ensure Kconfig for MPLAB Extension v1.5.0 or higher is installed by following the steps below:
- Open VS Code and navigate to the Extensions view (Ctrl + Shift + X)
- Search for “Kconfig for MPLAB” (Microchip official extension)
- Check the installed version:
- Ensure it is v1.5.0 or later
- If not installed:
- Click Install to add the extension
- Restart VS Code after install/update (recommended)

Clone or download at91bootstrap from GitHub®.
Launch VS Code (File > Open Folder…) and select the at91bootstrap directory.

Wait for the import to be completed. Verify the MPLAB project loads in the VS Code explorer and that the at91boostrap.mplab.json file is created.

There are several default settings files for different hardware configurations that are intended to give you a starting point when configuring at91bootstrap.
Examples of differences in the configurations are:
- Boot media:
- SD/MMC vs QSPI vs NAND (driver + where it looks for the next image)
- Early hardware init:
- DDR timing/init, clocks, pinmux
- Console/UART selection:
- Where you see logs
- Debug behavior:
- Whether it stops/waits so a debugger can attach vs. immediately loading the next stage
The MLPAB Harmony app debugging flow expects a bootstrap that:
- Initializes the board (especially DDR, clocks), and
- Loads/starts your application image in the right place or jumps to your application DDR start address
We recommend sam9x75_curiosity_pro_bkptnone_defconfig (found under the configs folder in the at91bootstrap directory) for the SAMA7D65 Curiosity debug flow used in these tutorials.
To load an existing at91bootstrap configuration in VS Code, first open the Command Palette by selecting View > Command Palette or pressing Ctrl + Shift + P, then type and select "MPLAB Kconfig Configure" to launch the Kconfig View for the project.
Once the Kconfig interface opens, verify that the at91bootstrap project is selected, and then click the Load button at the top of the Kconfig window. In the file selection dialog, navigate to the at91bootstrap/configs directory, select sam9x75_curiosity_pro_bkptnone_defconfig , and click Open.

The various boot configurations can be seen as depicted in the accompanying image.

Now click Apply.
Click Yes on the pop-up so the selected configuration is correctly saved to the .config file in the at91bootstrap directory.
This completes the configuration of at91bootstrap for debugging an MPLAB Harmony application

To build at91bootstrap follow the below steps:
- Open the Command Palette from View > Command Palette (Ctrl + Shift + P) and select Tasks: Run Task
- Choose the required task (e.g., clean - at91bootstrap (default)) from the list.
- Then select Continue without scanning task output
- The task executes and shows clean output in the terminal

- Open the command palette (Ctrl + Shift + P) from View > Command Palette and select Tasks: Run Task
- Choose the required task (e.g., build - at91bootstrap (default)) from the list
- Then select Continue without scanning task output
- The task executes and shows build output in the terminal

The generated at91bootstrap.elf file under build/binaries/ can be used to debug an MPLAB Harmony application.

Results
At the end of this tutorial, participants successfully
- Successfully configured at91bootstrap for:
- Debug-based application loading
- Generated the at91bootstrap binary image with required configuration
- Verified proper initialization of system components during boot


