Create New Quickstart MPLABX Project - mchpgfx/legato.docs GitHub Wiki
Create New Quickstart MPLABX Project
Create a new Quickstart MPLABX Project. You’ll start by launching MPLABX IDE, create a new Harmony3 project, launch MHC,set MPLABX as the compiler, create project configuration, launch composer, create a UI design, generate, build and program your project.
Launch MPLAB® X
Launch MPLAB® X IDE. From the File pull-down menu, select New Project. This will display the New Project dialog window.
Create a new Project
Under File menu, click New Project.... In Categories: window, Click Microchip Embedded. In Projects window, Click 32-bit MPLAB® Harmony Project. Click Next.
If 32-bit MPLAB® Harmony Project is not visible repeat software installation steps Install MHC above.
Framework Selection
Set Framework Path: to your Harmony v3 root installation directory. This path is not set by default. You must enter the path used at installation. Select Convert to Relative Path for Configuration. Click Next.
The Launch Framework Downloader button is used to download or configure a local framework. Because you have already installed H3, this button click is not required.
Project Settings
Set Location: field to C:\microchip\harmony\v3
. Set Folder: field to legato_quickstart_e70_xult_wqvga
. This will be the name of the MPLAB® X project folder configured for SAM E70. Set Name: field to legato_qs_e70_xu_tm4301b
. This will be the name of your application displayed in MPLAB® X. Click Next.
Configuration Settings
Set Name: field to legato_qs_e70_xu_tm4301b
. This will create a legato_qs_e70_xu_tm4301b folder for configuration settings. Select for Device Family: drop down, ATSAM
. This optional step helps narrow the possible Device Filters selections to AT SAM. Select for Device Filter: same70
. This optional step helps narrow the possible Target Device selections to only this family. Select for Target Device: drop down, ATSAME70Q21B
. Click Finish.
The selection of Target Device ATSAME70Q21B
is required. The device name will enable the listing of the supported BSP specific for this board later in this tutorial. Using a different device may not give any selections for the BSP.
When Finish is clicked, the following message may be displayed while the configuration database setup dialog is loaded.
Configuration Database Setup.
Click Launch
This will automatically launch MHC. MHC can also be launched in stand-alone mode. Go to MHC folder directory (/<Harmonypath>/mhc/) and double click the runmhc.bat file.
The following message will be displayed while the project is loaded into MPLAB® X.
The following will be displayed after project is loaded into MPLAB® X.
Set Compiler Option
MHC can be configured to use one of three compiler options. For this MPLAB® X project, we will use XC32. Select System component. Under Configuration Options window, expand Device & Project Configuration, expand Project Configuration, expand Tool Chain Selections, set Compiler to XC32.
Create a E70 based application
Load SAM E70 BSP into the workspace. Under Available Components, expand Board Support Packages (BSPs). Double-click SAM E70 Explained Ultra BSP.
Load SAM E70 Graphics Template for 4.3 display into workspace. Under Available Components, expand Graphics/Templates double-click MGS Harmony w/ PDA TM4301b Display.
When Confirm Component Auto-Activation? dialog is displayed, select Yes.
When Confirm Component Auto-Activation? dialog is displayed for FreeRTOS, select No.
When Confirm Attachment Auto-Connect? dialog is displayed for maxtouch, select Yes.
When Confirm Component Deactivation? dialog is displayed , select Yes.
When Confirm Component Auto-Activation? dialog is displayed for SCM LCC, TWIHS, I2C, and TIME select Yes.
When Confirm Attachment Auto-Connect? dialog is displayed for SCM LCC TMR and I2C, select Yes.
When Confirm Attachment Auto-Connect? dialog is displayed for LCC TMR, select Yes.
Create a simple pre-configured graphics UI design
Design your UI - For a walkthrough with Legato composer that teaches some development fundamentals, check out tutorial How to create a New Project. Besure to select start with basic template.
Generate Harmony3 code and project files
Save configuration and generaton project. MHC will generate all required projects files including a skeleton application code. These files are located in the project.
MHC will create the project directory legato_qs_e70_xu_tm4301b.X and create all project Harmony3 files.
Build Quickstart
Build the quickstart workspace.
Under Project menu, select Rebuild All.
Program Quickstart
Set project properties. Right mouse click on the project’s name and bring up the Project Properties dialog
- Under Hardware Tool, select
EDBG
. - Under Compiler Toolchain, select XC32 compiler
V2.50
or earlier. - Click OK.
Select Run Main Project. This button will build, program, and run the application.
Summary
In this guide, you learned to create a new MPLABX Harmony3 project. The steps were to launch MPLABX IDE, create a new Harmony3 project, launch MHC, set MPLABX as the compiler, create project configuration, launch composer, create a UI design, generate, build and program your project.
Next Step
If you are new to MPLAB® Harmony, you should probably start with these tutorials:
- MPLAB® Harmony v3 software framework
- MPLAB® Harmony v3 Configurator Overview
- Create a New MPLAB® Harmony v3 Project