Arm® TrustZone® Getting Started Application on SAM L11: Step 1
Verify Whether the MPLAB® Harmony Configurator (MHC) Plugin is Installed in MPLAB X IDE
You will see MPLAB Harmony 3 Configurator in the menu.
If you don't see it in the menu, install MHC.
Set Up MHC Plugin Window to Open in Standalone Mode
Go to Tools > Options. You will see the Options window open.
Go to Plugins > Window Manager and select Standalone mode. Click Apply and then click OK.
Create MPLAB® Harmony v3 Arm® TrustZone® Project using MPLAB X IDE
Select File > New Project from the main IDE menu.
In the Categories pane of the New Project dialog window, select Microchip Embedded.
In the Projects pane, select 32-bit MPLAB Harmony 3 Project, then click Next.
Browse to the folder you downloaded the framework to in the Framework Path edit box.
If you haven't done this, or want to download it to a different folder, click the Launch Content Manager button, then click Next.
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: <Your_folder>\dev\saml11_trustzone_getting_started.
- Folder: Indicates the name of the MPLABX .X folder. Enter "sam_l11_xpro" to create sam_l11_xpro_Secure.X and sam_l11_xpro_NonSecure.X folders.
- Name: Indicates the name of the project that will be shown in MPLAB X IDE. Enter "trustzone_sam_l11_xpro" to set the project's name.
Click Next to proceed to Configuration Settings.
Follow these steps to set the project’s Configuration Settings.
Name: Enter the configuration name as "sam_l11_xpro".
- Target Device: Select ATSAML11E16A as the target device.
After selecting the target device, click Finish to launch the MHC.
Click Launch to launch the MHC tool with the selected packages.
The MHC plugin’s main window for the project will be displayed.
Verify Device Family Pack (DFP) and Compiler Toolchain
Click on the Projects tab on the top left pane in MPLAB X IDE. Right click on the project name trustzone_sam_l11_xpro_NonSecure and go to Properties.
Make sure that XC32 (v2.41) is selected as the Compiler Toolchain for XC32 and select the SAML11_DFP package 4.0.115. Click on Apply and then click on OK.
Click on the Projects tab on the top left pane in MPLAB X IDE. Right click on the project name trustzone_sam_l11_xpro_Secure and go to Properties.
Verify that XC32 (v2.41) is selected as the Compiler Toolchain for XC32 and select the SAML11_DFP pakcage 4.0.115. Click on Apply and then click on OK.
Verify Clock Settings
Launch Clock Easy View by going to the Tools menu of the MHC window and then selecting Clock Configuration.
A new window, Clock Easy View, is opened inside MHC.
Click on the Clock Easy View tab, scroll to the right and verify that the Main Clock is set to 32 MHz.
Configure Secure and Non-Secure Peripherals
Launch TrustZone-M Manager by going to the Tools menu of the MHC window and then selecting TrustZone-M Manager.
A new window, TrustZone-M Manager, is opened inside MHC.
Click on the Peripheral Configuration tab to configure Peripherals to run in Secure and Non-Secure mode.
Default SAM L11 Peripheral Configuration.
As per the project design, configure DMAC and SERCOM0 as NonSecure Peripherals.
Verify Secure and Non-Secure Memory Regions
Click on the Memory Configuration tab to verify the default Memory Configuration.