Getting Started with USB on SAM MCUs Using MPLAB® Harmony v3: Step 1

Last modified by Microchip on 2023/11/09 09:08

Create and Configure Harmony v3 Project

Install the MPLAB® Harmony Configurator (MHC) Plug-in in MPLAB X IDE.

Verify that MPLAB® Harmony Configurator (MHC) is installed.

  • Launch MPLAB X IDE.
  • Go to Tools > Embedded.
  • You will see MPLAB Harmony 3 Configurator in the menu.
Check if Harmony 3 plugin is installed

Figure 1: Check if Harmony 3 plugin is installed

Information

If you don't see MPLAB Harmony 3 Configurator in the menu, install MHC.

Back to Top


Create MPLAB Harmony v3 Project Using MPLAB X IDE

Select File > New Project from the IDE main menu or click on the New Project button Main new project icon.

In the Categories pane of the New Project dialog, select Microchip Embedded. In the Projects pane, select 32-bit MPLAB Harmony 3 Project, then click Next.

Select 32-bit MPLAB Harmony 3 project

Figure 2: Select 32-bit MPLAB Harmony 3 Project

Information

If 32-bit MPLAB Harmony 3 Project is not displayed, install MHC.

In the Framework Path edit box, browse to the folder you downloaded the framework to. If you haven't done this, or want to download it to a different folder, click the Launch Content Manager button, then click Next.

Information

Note: For more information on the Harmony Content Manager, see the Download MPLAB Harmony Framework section of the MPLAB Harmony v3 Configurator Overview page.

Verify framework path

Figure 3: Verify Framework Path

Harmony content manager

Figure 4: Harmony content manager

In the Project Settings window, apply the following settings:

  • Location: Indicates the path to the root folder of the new project. All project files will be placed inside this folder. The project location can be any valid path, for example: C:\Projects\getting_started_drivers_middleware.

  • Folder: Indicates the name of the MPLAB X Project .X folder. Enter "sam_e70_xpld" to create a sam_e70_xpld.X folder.

This must be a valid directory name for your operating system.

  • Name: Enter the project’s logical name as "getting_started_drivers_middleware_same70_xplained". This is the name that will be shown from within the MPLAB X IDE.
Information

Note: The Path box is read-only. It will update as you make changes to the other entries.

  • Click Next to proceed to Configuration Settings.
Project name and location

Figure 5: Project name and location

Information

Note: Clicking on the Show Visual Help button will open a help window providing a detailed description of the various fields in the Project Settings window.

MPLAB Harmony new project wizard visual help

Figure 6: MPLAB Harmony New Project Wizard Visual Help

Follow the steps below to set the project’s Configuration Settings.

  • Name: Enter the configuration name as "sam_e70_xpld".

  • Target Device: Select ATSAME70Q21B as the target device.
Information

Note: You can select the Device Family or enter a partial device name to filter the list in Target Device to make it easier to locate the desired device.

  • After selecting the target device, click Finish to launch MHC.
Configuration settings

Figure 7: Configuration Settings

Information

Note: The New Project Wizard opens the MPLAB Harmony Configurator automatically for a 32-bit MPLAB Harmony 3 Project.

Back to Top


Open MPLAB Harmony Configurator and Configure Project Settings.

Once the New Project Wizard finishes, MHC will launch automatically. Complete the other steps before using MHC.

MHC launches

Figure 8: MHC Launch

Set the created project as the main project if you have multiple projects open.

Set as main project

Figure 9: Set as Main Project

Open the Project Properties window and verify that the compiler is set to XC32 (v2.50) and the Tool is set to SAM E70 Xplained (EDBG). You need to connect the tool using the DEBUG USB port on the SAME70 Xplained Evaluation Kit to your PC for this option to be visible. Also, verify the package version numbers.

Open project properties

Figure 10: Open Project Properties

Configure project properties

Figure 11: Configure Project Properties

Information

Note: This project has been verified to work with the following package versions:
CMSIS v5.4.0, SAME70_DFP v4.4.78.

You are free to try the latest packages. However, since we regularly update our tools, you may occasionally discover an issue while using the newer versions. If you suspect that to be the case, we recommend that you double-check and use the same versions that the project was tested with.

Back to Top