Professional Documents
Culture Documents
Getting Started With MPLAB Harmony
Getting Started With MPLAB Harmony
1 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
English
Search Microchip
Search Data Sheets
PRODUCTS
APPLICATIONS
DESIGN SUPPORT
TRAINING
ABOUT US
Contact Us
myMicrochip Login
[Signout, My Account]
Helpful Links
Software Libraries
Application Notes
Code Examples
Data Sheets
Development Tools
MCU & DSC Overview
8-bit
16-bit
32-bit
Application Design Centers
6.
MPLAB Harmony is a fully integrated firmware framework with associated libraries, example applications, and related collateral supporting features of PIC32
microcontrollers. Visit http://www.microchip.com/harmony for more information on this new framework.
Follow these steps to get started with MPLAB Harmony:
Download and Install MPLAB Harmony
Before You Start
Accessing MPLAB Harmony Documentation
Creating New Application
Configuring New Application
1. Start MPLAB X
IDE and select
Plugins from the
Tools menu as
shown
22/02/2014 17:42
2 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
5. Follow the prompts from the installation wizard and continue until the installation completes. Just click "continue"). Once the installation wizard has finished y
can close the "Plugins" dialog box.
You should now see a "MPLAB Harmony Configurator" option under the "Tools" menu. This indicates that the MPALB Harmony Configurator has been
successfully installed.
2. MPLAB
Harmony Help can
also be accessed
from MPLAB X
IDE Help Menu as
shown
22/02/2014 17:42
3 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
1. Open MPLAB X
IDE, and select
File > New Project
to open a project
wizard window. In
Categories, select
Microchip
Embedded and in
Projects, select
Standalone
Project. Click
Next.
2. Next, choose
the device. The
device you
choose will
determine what
peripheral libraries
are included in
your MPLAB
Harmony project
3. Continue in the
new project
Wizard, selecting
your hardware
and software
tools.
22/02/2014 17:42
4 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
4. When you name and locate your project there are two choices. You can locate it in the apps folder of the MPLAB Harmony installation or you can
locate it outside of the Harmony installation. Placing the project in the apps folder of MPLAB Harmony will require you to copy it if you install a new
version of MPLAB Harmony. Installing your project outside of the MPLAB Harmony installation will require you to modify your include paths when a new
version of MPLAB Harmony is installed. It is recommend to use relative paths when installing in the apps folder in MPLAB Harmony. Make sure that yo
new project is set to the main (active) project.
5. Once the
MPLAB X IDE
project is created,
you should see a
screen similar to
the picture as
shown below.
Determine which MPLAB Harmony Modules are needed for your Application
Modules are divided into four categories; Peripheral Libraries, System Services, Device Drivers and other libraries (commonly called middleware). To
determine your needs, read the MPLAB Harmony Overview and the Introductory sections for the modules of interest in the help file. Some modules hav
dependencies while others do not. Peripheral Libraries have no dependencies. Drivers depend on peripheral libraries. System Services depend on
Peripheral Libraries and or Drivers. Your application or its middleware will typically use drivers or system services
22/02/2014 17:42
5 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
include the pre-built peripheral library binary .a file for the processor you selected in your project
1. The MPLAB
Harmony
Configurator can
be found in the
Tools menu of the
MPLAB IDE.
2. MPLAB
Harmony
Configurator will
open in a new
dialogue, as
shown below.
3. Browse to the
root directory path
under "MPLAB
Harmony Root
Directory" option.
This path is
remembered by
the Configurator
for subsequent
usage. Check or
uncheck the
"Relative Path"
check box as
required. Once
the path is set,
click "Next".
22/02/2014 17:42
6 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
5. If selected
library supports
configuration via
Configurator, the
Library
Configuration
Pane will appear.
As an example,
the TCP/IP Library
configuration is
shown.
Select the required configurable items of TCP/IP, and click next (Next button in Library configuration navigation pane)
7. Select to
Include MPLAB
Harmony
Application
template files.
Tool would add
template files
(main.c, app.c,
system_init.c,
system_tasks.c,
system_int.c,
system_config.h
and app.h) to
MPLAB X IDE
project. Click
"Finish".
Note: If you run the template again, for the purpose of adding the supporting files for other framework libraries, you will not want to check Include MPL
Harmony application template as it will overwrite your existing project files.
22/02/2014 17:42
7 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
Initialize System
This task involves completing the system_init.c file.
1. Add the
necessary
configuration bits
for your processor
22/02/2014 17:42
8 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
2. Complete the SYS_Initialize function. Finish any necessary processor initialization (wait states, cache control, etc.) MPLAB Harmony may provide
services to accomplish this in the System Services Module. Initialize any features specific to the board that are not initialized by other modules such as
drivers or system services
3. Next, initialize all library modules selected to be used by your application. To do this you must first define the initialization data structure for each
module. This can be done statically in the system_init.c file and passed in by pointer to the appropriate initialization function for each library. Needed
initialization structures can be found in the help section for each module.
4. Add a call to the initialization function for each library module into the SYS_Initialize function. Each initialization function will return an object handle fo
the module instance. These should be captured so that they can be passed to the module task routine. Finally, add the call to APP_Initialize function int
the SYS_Initialize function.
22/02/2014 17:42
9 de 9
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG...
1. At minimum, the APP_Initialize function must put your application in its initial state. It may perform other initialization as long as it does not have to wa
for other modules. Any initialization that depends on other modules should be implemented as part of the application state machine.
2. Finally,
complete your
application
functionality by
implementing the
APP_Tasks state
machine function.
Downloads
No documents found. Please check back later
Products Applications Design Support Training Sample & Buy About Us Contact Us
22/02/2014 17:42