SAM9X75 Curiosity Pro - Getting Started With Application Development Using MPLAB® for VS Code®
Purpose
This section describes how to develop an application for the SAM9X75 Curiosity Pro board using MPLAB® for VS Code®, while gaining hands‑on experience with peripheral configuration through MPLAB Code Configurator (MCC). The goal is to help you become familiar with the end-to-end development workflow, including project setup for successful builds
Overview
In this tutorial, attendees will gain hands‑on experience developing an application for the SAM9X75 Curiosity Pro Development Board using the MPLAB for VS Code and Microchip’s code‑generation tools. The tutorial demonstrates a complete development workflow, from project creation and peripheral configuration to code generation using a practical, hardware‑based example.
The application developed in this tutorial is a user-input-based LED ON/OFF by pressing the USER button on the SAM9X75 Curiosity Pro Development Board. This example will help you understand how core peripherals are configured and integrated in an MPU‑based system while maintaining an MCU‑like development experience.
After completing this tutorial, you will know how to:
- Create a new application project using MPLAB for VS Code
- Add and configure peripheral support using MCC
- Generate C source code using MCC and integrate it into the project
Configure project settings, enabling you to efficiently develop and build applications

- One USB Type-C® cable
- Power the board via the USB Type-C connector on the USB Type-A port (J3) or via the DC jack connector (J1)
- Jumper settings:
- Close jumper J85 to enable VDDBU
- Close 2-3 on jumper J65 for Debug Unit (DBGU) Tx interface on Future Technology Devices International (FTDI)
- Close 2-3 on jumper J67 for DBGU Rx interface on FTDI
- One OpenOCD Debug Probe DV22S07A and one USB Type-C cable
Procedure
Part 1: Creating an Application Using MPLAB for VS Code
The first step is to launch VS Code.
To create a new MPLAB Harmony project, go to View > Command Palette > MPLAB: Welcome > Create New Project.

The next step in creating an MPLAB Harmony project is to define the following:
Specify the project name in the text box.

Select Custom Location Select a custom project location.

Choose SAM9X75D2G MPU as shown in the accompanying image.

Select Application as Standard application project (default) as shown in the accompanying image.

Choose the latest MPLAB XC32 Compiler (in this example 5.10) as shown in the accompanying image.

Once the project creation is complete, you will be in Restricted Mode. To enable all features, you need to trust the folders.
Confirm by clicking Trust and proceed to the next step.

Observe that the MPLAB Harmony project for the SAMA7D65 Curiosity Pro Development board has been created and the initial setup is complete.

Now create the MCC configuration to add the necessary peripheral libraries essential for application creation.
Go to View > Command Palette > MPLAB MCC: Launch.

Now, click Create New MCC Config.

Select the project to associate it with.

Select Proceed With Default Values from the Associated Project.

In addition to the required packages (csp), download the optional packages bsp, and core.
Click on Device Resource, then Content Manager.

Choose bsp and core and then click Select Latest Version. Then click Apply. The content download will take some time, so be patient and wait until all content is downloaded.

The Project Graph window will be displayed.
From the Device Resource window, click the add button next to SAM9X75 Curiosity_pro BSP.

Board Support Packages (BSP) will be reflected in the Project Graph.

The Project Graph will appear as in the accompanying image.

Refer to the user interface sections of the SAM9X75 Curiosity Pro User Guide to verify the pin assignments for the user LED and Push Buttons Switches.


Now launch the Pin Configuration tool in the Project Graph.
To do this, go to the Project Graph. From the Plugin drop-down menu, choose Pin Configuration to configure the required pinout, referring to the SAMA7D65 Curiosity Pro User Guide for correct assignments.

Now enable Interrupt for USER-BUTTON. To do this, go to the Pin Settings tab and look for the PC9 pin number under Pin ID. Now select the PIO interrupt settings to Both Edge from the drop-down list for PC9. Once done, close the window.

Generate the code by clicking the Generate button. Wait until the code generation is complete.

Now you can observe that C code for all the added peripherals are being generated.

Write main.c to create your own application integrating the USER button and the LED output.
Add MPLAB® AI Coding Assistant to VS Code.

The sample user-input-based LED ON/OFF application and main.c file can be found in the folder under sam9x75_led_button\config.mcc\src. You can copy this main.c to your project.
This completes the application development.
Part 2: Project Setup for Successful Builds
To build the project successfully, confirm the compiler details. To do this, go to Command Palette and launch MPLAB: Edit project properties (UI). Go to Toolchain and confirm that XC32 compiler is chosen.

By default, MPLAB X IDE only generates ELF and HEX format output files. To generate application output in binary format, a post-build step needs to be added to the project properties. To do this, go to Overview > Post-build Steps > Add Item. Then add the following command:

Note that the Open On-Chip Debugger (OpenOCD) configuration files are in the project folder:
sam9x75.cfg defines settings such as the interface, target device, transport, reset behavior, and Joint Test Action Group (JTAG)/Serial Wire Debug (SWD) parameters, which are essential for establishing the debug session.
Copy the sam9x75.cfg file from the GitHub® directory to the user project.
launch.json specifies details such as the executable file, GNU Debugger (GDB) path, OpenOCD server connection, configuration files, and debug actions like reset, halt, load, and run.
Copy the launch.json file from the GitHub directory to the user project/.vscode.

Copy at91bootstrap.elf from GitHub into the ./binaries folder of the project directory. This at91bootstrap is used to debug an MPLAB Harmony application in VS Code.

Project properties are configured with the required settings to ensure a successful and error-free build of the application.
Results
You have successfully created and built an application for the SAM9X75 using MPLAB for VS Code. They configured the required peripherals using MCC and set up the necessary project properties to ensure a successful build.