MPLAB® Harmony v3 Drivers and System Services on SAM E70/S70/V70/V71: Step 1

Last modified by Microchip on 2024/09/27 09:24

Create an MPLAB® Harmony v3 with drivers and systems services on SAM devices using MPLAB® X IDE.

Select File > New Project from the main MPLAB X IDE menu.

Open a New Project

Figure 1

Information

Note: Close all existing opened projects before you start creating a new project.

In the Categories pane of the New Project dialog, select Microchip Embedded.

In the Projects pane, select Application Project(s), then click Next.

Project Creation Setup

Figure 2

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 Next to select the compiler.

Project Dev Name

Figure 3

In the Select Compiler window, expand XC32 from the Compiler toolchains pane, and select XC32 (v4.45) [C:\Program Files\Microchip\xc32\v4.45\bin].

Click Next to proceed to the Select Project Name and Folder pane.

Project Compiler

Figure 4

In the Select Project Name and Folder pane, apply the following settings:

  • Project Name: Indicates the name of the project that will be shown in MPLAB X IDE. Enter "drivers_sam_e70_xult" to set the project's name.
  • Project 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:\01_training_module\getting_started_drivers\firmware.
Project Path Setup

Figure 5

Information

Note: The Project Folder is read-only. It will update as you make changes to the entries.

After selecting the Project Name and Folder, click Finish to launch MPLAB® Code Configurator (MCC).

The MCC plugin’s main window for the project will be displayed as shown in Figure 6.

Launched MCC View

Figure 6

Before proceeding, set up the Device Family Pack (DFP) and Compiler toolchain.

  • Click the Projects tab on the top left pane in MPLAB X IDE. Right-click on the project name drivers_sam_e70_xult.
  • Go to Set Configuration and click Properties.
Nonsecure Project View

Figure 7

  • Check that XC32 (v4.45) is selected as the Compiler Toolchain for XC32 and select the PIC32CM-LS_DFP package 4.11.257.
  • Click on Apply and then click OK.
xc32 setup

Figure 8

Tool Tip:

  • Make sure to select the same DFP package and MPLAB XC32 compiler version for both the Secure and Non-Secure projects.
  • If you closed MCC accidentally and would like to open it again, go to Tools > Embedded > MPLAB Code Configurator v5: Open/Close in MPLAB X IDE.

Back to Top


Verify the Clock Settings.

Launch Clock Easy View by going to the Project Graph tab in MPLAB X IDE and then select Plugins > Clock Configuration.

secure project view

Figure 9

A new window, Clock Easy View, is opened inside MCC.

Click on the Clock Easy View tab, scroll to the right and verify that the Processor Clock (HCLK) and Master Clock (MCK) are set to 300 MHz and 150 MHz, respectively.

secure xc32 setup

Figure 10

Double-click on Clock Diagram tab to maximize the window.

Back to Top