We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X

MPLAB® Harmony v2 - Integrated Embedded Software Development Framework


MPLAB® Harmony is a flexible, abstracted, fully integrated embedded software development framework for the PIC® family of 32-bit microcontrollers (MCUs). It takes key elements of modular and object-oriented design, adds in the flexibility to use a Real-Time Operating System (RTOS) and provides a framework of software modules which are easy to use, configurable for your specific needs and work together seamlessly. 

MPLAB Harmony works closely with MPLAB X Integrated Development Environment (IDE) to provide you with a unified software development environment. It can be easily configured with MPLAB Harmony Configurator (MHC), which is available as a plug-in within MPLAB X IDE. The MPLAB Harmony development environment provides software portability across the entire family of 32-bit PIC microcontrollers. 

MPLAB Harmony v2 provides extensive middleware support for developing graphical embedded software. The MPLAB Harmony Aria library is integrated into the MPLAB Harmony Graphics Suite (MHGS) to provide an easy to use What-You-See-Is-What-You-Get (WYSIWYG) editor which accelerates development of graphical user interfaces. Additionally, the MPLAB Harmony Display Manager makes it easy to support new display hardware. Other MPLAB Harmony v2 middleware libraries provide support for TCP/IP (including IPv4, IPv6 and many other Internet protocols), popular classes for USB embedded hosts and devices and seamless third-party RTOS integration to simplify embedded software development.

MPLAB Harmony

New Version of MPLAB Harmony Now Available

  • Now supports 32-bit SAM MCUs and MPUs
  • Optimized peripheral libraries
  • Simplified drivers
  • Same middleware as Harmony v2
  • Standalone libraries
  • Smaller modular download
  • Supports multiple development models

MPLAB Harmony Features


  • Code interoperability
    • Modular architecture allows drivers and libraries to work together with minimal effort
  • Faster time to market
    • Integrated single platform enables shorter development time
  • Improved compatibility
    • Scalable across PIC 32-bit MCUs to custom fit your requirements
  • Quicker support
    • One-stop support for all customer needs including third-party solutions
  • Easy third-party software integration
    • Seamlessly integrates third-party solutions (RTOS, middleware, drivers, etc.) into the embedded software development framework
Print

The MPLAB Harmony embedded software development framework is free to download. For information on what is included within the framework and their release versions please read "Release Notes." Additional premium products, including third-party and Microchip solutions, are available for purchase.

Premium Software Solutions:

Benefits of Using MPLAB Harmony v2:


We’ve made the foundational code for MPLAB Harmony more compact, enabling efficient designs in small devices.

The foundational Peripheral Library Code conforms to MISRA-C: 2012 Mandatory Specifications. The high quality of design, testing and documentation mean shorter design cycle times, translating to faster time to market.

A plethora of new tools that are built to work with MPLAB X IDE are available to enable you to use your work time more effectively and efficiently for application development.

MPLAB Harmony Features


Feature Description
The Framework

MPLAB Harmony is a framework of system services, device drivers, and other libraries that are built upon a base of portable peripheral libraries to provide flexible, portable, and consistent software "building blocks" that you can use to develop your embedded PIC32 applications.

TCP/IP Stack and Wi-Fi support

The MPLAB Harmony TCP/IP Stack provides a foundation for embedded network applications by handling most of the interaction required between the physical network port and your application. It includes modules for several commonly used application layers, including HTTP for serving web pages, SMTP for sending e-mails, SNMP for providing status and control, Telnet, TFTP, Serial-to-Ethernet, and much more. In addition, the stack includes lightweight and high-performance implementations of the TCP and UDP transport layers, as well as other supporting modules such as IP, ICMP, DHCP, ARP, and DNS.

  • Multiple interfaces - Ethernet and/or Wi-Fi interfaces are supported
  • Dual stack with IPv4 and/or IPv6 support
  • Fully dynamic
  • Improved modularity and stack layout
  • Run-time configuration through the TCP/IP console
  • Interrupt driven operation
  • RTOS-friendly, with easy RTOS integration
  • The BSD layer compatibility has been greatly improved, and new dynamic socket options have been added as well as IPv6 support
  • Run time benchmarking support using standard industry tools - Iperf
  • The MPLAB Harmony file system (SYS FS) is used by the HTTP, FTP, SNMP, modules, among others. This makes the stack independent of the specific file structure of a particular media and allows web page storage on a multitude of storage media.
  • The stack uses the high performance MPLAB Harmony Cryptographic Library, which is an efficient and modern implementation supporting the latest encryption and key exchange algorithms
  • The stack security has been greatly improved by adding support of the modern wolfSSL TLS libraries
  • TCP/IP Stack and Wi-Fi support
  • IGMPv3 support
Wi-Fi

The Wi-Fi software library, in conjunction with the MRF24WG0MA and MRF24WN0MA module, allows an application to:

  • Join an existing 802.11 Wi-Fi network
  • Create a 802.11 Wi-Fi network
USB Device Stack

The MPLAB Harmony USB Device Library (referred to as the USB Device Library) provides embedded application developers with a framework to design and develop a wide variety of USB Devices. A choice of Full Speed only or Full Speed and Hi-Speed USB operations are available, depending on the selected PIC32 microcontroller. The USB Device Library facilitates development of standard USB devices through function drivers that implement standard USB Device class specification. Custom USB devices can also be implemented via a USB Generic Device Driver. The USB Device Library is modular, thus allowing application developers to readily design composite USB devices. The USB Device Library is a part of the MPLAB Harmony installation and is accompanied by demonstration applications that highlight library usage. These demonstrations can also be modified or updated to build custom applications. The USB Device Library also features the following:

  • Supports different USB device classes (CDC, Audio, HID, MSD, and Generic)
  • Supports multiple instance of the same class in a composite device
  • Supports multiple configurations at different speeds
  • Supports full speed and high speed operation
  • Supports multiple USB peripherals (allows multiple device stacks)
  • Modular and Layered architecture
  • Supports deferred control transfer responses
  • Completely non-blocking
  • Supports both polled and interrupt operation
  • Works readily in an RTOS environment
USB Host Stack

The USB Host Layer in the MPLAB Harmony USB Host Stack performs the tasks of enumerating an attached device and interfacing the HCD. The following are the key features of the MPLAB Harmony USB Host Layer:

  • Supports multi-configuration and composite USB Devices
  • Supports VID PID and class, subclass, and protocol devices
  • Can manage multiple USB devices through the Root Hub
  • Concise API simplifies application development
  • Modular architecture allows support for multiple (and different) USB controller in one application. Can operate multiple USB segments.
  • Supports Low-Speed, Full-Speed, and High-Speed USB devices
Fixed-Point DSPk Math Libraries

The DSP Fixed-Point Library contains building block functions for developing digital signal processing algorithms. The library supports the Q15 and Q31 fractional data formats. The functions are implemented in efficient assembly specifically targeted at the DSP extensions in this core family. The library makes these functions available in a simple C-callable structure.

  • complex math
  • vector math
  • matrix math
  • digital filters
  • transforms
Graphics Library
  • Completely overhauled library improves drawing performance to enable faster updates and reduced need for screen painting
  • Updates to MPLAB Harmony Graphics Suite (MHGS) includes the ability to undock all windows within the tool, the ability to zoom and copy/paste in composer window, and the addition of new resource utilities
  • New MPLAB Harmony Event Manager to provide simplified coordination of graphics activity to external events
  • Support for GPU-enabled MCUs (PIC32MZ DA family)
  • New Image and Font Asset Manager gives fine-grained understanding of memory footprint and enables resizing to meet specific application needs and target MCU memory sizes
  • New MPLAB Harmony Display Manager to quickly enable the use of displays with non-standard formats
Cryptographic Library

This library provides a software Cryptographic Library that is available on the Microchip family of microcontrollers with a convenient C language interface. The Cryptographic Library includes functions to perform encryption, decryption, hashing, authentication, and compression within the embedded application. Random number generation (RNG) functions are also provided.

Block Ciphers - The library provides DES, 3DES, and AES for block cipher needs. Depending on the algorithm in use, CBC and CTR modes are supported.

Public Key Cryptography - The library provides RSA and Elliptic Curve Cryptography (ECC) for Public Key Cryptography, and Diffie-Hellman (DH) for key agreement arrangements.

Hash Functions - The library provides MD5, SHA, SHA-256, SHA-384, and SHA-512 for hashing. These functions do not require keys or initialization vectors (IV).

Random Number Generation Functions - The library provides functions to generate either a single pseudo-random number or a block of such numbers.

File System

The File System service is a framework designed to support multiple file systems (native file system) and multiple media in the same application. Supported file systems are FAT12, FAT32, MPFS, and JFS. Each of these native file systems have a common set of APIs that can be used to access the files of that particular native file system.

  • Supports multiple file systems (FAT, MPFS)
  • Supports multiple physical media (NVM, SD card)
  • More physical media can be interfaced with the FS once the driver is available for the media
  • Modular and Layered architecture
Peripheral Library
  • Compliance with all MISRA-C: 2012 Mandatory Standards
  • Re-implemented to more directly access physical registers
  • More efficient and easier to read and understand
  • No changes to interface APIs
  • Support for all PIC32 Devices and peripherals, including:
    • PIC32MX320_340_360_420_440_460
    • PIC32MX575/675/695/775
    • PIC32MX534/564/664/764
    • PIC32MX1XX/2XX
    • PIC32MX1XX/2XX (256 KB/64 KB)
    • PIC32MX330_350_370_430_450_470
    • PIC32MX320_340_360_420_440_460
    • PIC32MX1XX/2XX/5XX
    • PIC32MX1XX/2XX (256 KB/16 KB)
    • PIC32MZEC
    • PIC32MZEF
    • PIC32MK
    • PIC32MZ DA
Device Drivers

Static and/or Dynamic drivers for the following peripherals: ADC, CMP, I2C, I2S, IC, NVM, OC, PMP, RTCC, SD, SPI, External Flash (SST25VF016B, SST25VF020B), Timer, UART.

System Services

MPLAB Harmony system services are responsible for managing shared resources so that other modules, such as drivers, middleware, and applications, do not conflict on shared resources.

Clock - This library provides an interface to manage the Oscillator module on the Microchip family of microcontrollers during different modes of operation.

Console - This service routes data or message traffic between a console device and a middleware layer or application. The most common use of the Console Service is to route debug or error messages from a PIC32-based device to a terminal program on a host development system.

Debug - This service provides a set of functions that allow the developer to output debug and/or error messages based on a global error level. The messages are sent to the System Console Service, where they are routed to a console device.

Device Control - This service provides the developer with simple APIs to configure and control device-specific functions.

DMA - This library provides an interface to interact with the DMA subsystem to control and manage the data transfer between different peripherals and/or memory without intervention from the CPU.

Interrupt - This service provides support for initializing the processor's interrupt controller, registering Interrupt Service Routines (ISRs) and managing interrupts. These features enable making efficient and dynamic applications, drivers, and middleware that respond to external events as they occur in real time.

Messaging - This library provides intra-process and inter-process communication by the sending and receiving of simple messages.

Ports - This library provides an interface to manage and control general purpose input or output ports controlled by the Ports modules.

Random Number Generator - This System Service provides a simple C-language interface for generating random numbers at both pseudo-random and cryptographic strengths.

Reset – This service can be used to identify the reason for the most recent processor reset, manage the system's reset reason status flags, and even cause a reset under software control if the processor in use supports that functionality.

Timer - This library provides interfaces to manage alarms and/or delays.

WDT - This library provides a low-level abstraction of the Watchdog Timer peripheral.

Operating System Abstraction Layer (OSAL)

The OSAL provides the interface to commonly available Real-Time Operating Systems (RTOS) such that drivers and middleware (and optionally, applications) may be written using a single interface to a minimal set of OS-specific features needed to provide thread safety. The OSAL interface can be implemented appropriately to support almost any desired RTOS. For applications where no RTOS is available, or desired, a bare version of the OSAL supports either polled or interrupt-driven environments running directly on the hardware. This allows applications designed with the MPLAB Harmony stack to be executed in all three common embedded environments: polled (shared multi-tasking), interrupt-driven, or RTOS-based.

Support for the following RTOS:

  • FreeRTOS
  • OpenRTOS
  • µC/OS-III, µC/OS-II
  • ThreadX
  • embOS
MPLAB Harmony Configurator (MHC) Tool

MPLAB Harmony provides a MPLAB Harmony Configurator (MHC) MPLAB-X IDE plug-in that can be installed in MPLAB X IDE to help you create your own MPLAB Harmony applications. It supports configuration and code generation for all MPLAB Harmony components and 3rd-party software (coming soon). Additional features:

  • Graphical clock configuration
  • Graphical Pin management
  • MPLAB Harmony® Graphics Composer and GRC integration

The Display Manager plug-in for MHC was added which includes the following features:

  • Automatically configures display drivers
  • 8-bit pallet support
  • WVGA double-buffer support
3rd-Party Software

wolfSSL - A lightweight C-language-based SSL/TLS library targeted for embedded, RTOS, or resource-constrained environments primarily because of its small size, speed, and portability. wolfSSL supports industry standards up to the current TLS 1.2 and DTLS 1.2 levels, is up to 20 times smaller than OpenSSL, offers a simple API, an OpenSSL compatibility layer, OCSP and CRL, and offers several progressive ciphers. wolfSSL is under active development, and should be chosen over yaSSL when possible.

  • Segger emWin Pro Library: emWin from SEGGER Microcontroller GmbH & Co. KG is a software graphics library that provides an efficient, processor and LCD controller-independent Graphical User Interface (GUI) for applications that operate with a graphical LCD. emWin provides a graphical user interface for a graphics application that is independent of the LCD controller and CPU.

MPLAB Harmony v2.0x Downloads

Title Date Published D/L
v2.05
Windows (x86/x64)
MPLAB® Harmony Integrated Software Framework v2.05.01 1/12/18 zip-16
MPLAB Harmony Release Notes and Contents (v2.05.01) 1/12/18 zip-16
MPLAB Harmony Release Brief v2.05.01 1/12/18 zip-16
Linux 32-Bit and Linux 64-Bit
MPLAB Harmony Integrated Software Framework v2.05.01 1/12/18 zip-16
MPLAB Harmony Release Notes and Contents (v2.05.01) 1/12/18 zip-16
MPLAB Harmony Release Brief v2.05.01 1/12/18 zip-16
Mac (10.X)
MPLAB Harmony Integrated Software Framework v2.05.01 1/12/18 zip-16
MPLAB Harmony Release Notes and Contents (v2.05.01) 1/12/18 zip-16
MPLAB Harmony Release Brief v2.05.01 1/12/18 zip-16
v2.04
Windows (x86/x64)
MPLAB Harmony Integrated Software Framework v2.04 8/16/2017 ZIP
MPLAB Harmony Release Notes and Contents (v2.04) 8/16/2017 ZIP
MPLAB Harmony Release Brief v2.04 8/16/2017 ZIP
Linux 32-Bit and Linux 64-Bit
MPLAB Harmony Integrated Software Framework v2.04 8/16/2017 ZIP
MPLAB Harmony Release Notes and Contents (v2.04) 8/16/2017 ZIP
MPLAB Harmony Release Brief v2.04 8/16/2017 ZIP
Mac (10.X)
MPLAB Harmony Integrated Software Framework v2.04 8/16/2017 ZIP
MPLAB Harmony Release Notes and Contents (v2.04) 8/16/2017 ZIP
MPLAB Harmony Release Brief v2.04 8/16/2017 ZIP
v2.03b
Windows (x86/x64)
MPLAB Harmony Integrated Software Framework v2.03b 5/04/2017 ZIP
MPLAB Harmony Help Files/Release Notes(v2.03b) 5/04/2017 ZIP
MPLAB Harmony Release Brief v2.03b 5/04/2017 ZIP
Linux 32-Bit and Linux 64-Bit
MPLAB Harmony Integrated Software Framework v2.03b 5/04/2017 ZIP
MPLAB Harmony Help Files/Release Notes(v2.03b) 5/04/2017 ZIP
MPLAB Harmony Release Brief v2.03b 5/04/2017 ZIP
Mac (10.X)
MPLAB Harmony Integrated Software Framework v2.03b 5/04/2017 ZIP
MPLAB Harmony Help Files/Release Notes(v2.03b) 5/04/2017 ZIP
MPLAB Harmony Release Brief v2.03b 5/04/2017 ZIP
v2.02b
Windows (x86/x64)
MPLAB Harmony Integrated Software Framework v2.02b 1/19/2017 ZIP
MPLAB Harmony Help File/Release Notes (v2.02b) 1/19/2017 ZIP
MPLAB Harmony Release Brief v2.02b 1/19/2017 ZIP
Linux 32-Bit and Linux 64-Bit
MPLAB Harmony Integrated Software Framework v2.02b 1/19/2017 ZIP
MPLAB Harmony Help File/Release Notes (v2.02b) 1/19/2017 ZIP
MPLAB Harmony Release Brief v2.02b 1/19/2017 ZIP
Mac (10.X)
MPLAB Harmony Integrated Software Framework v2.02b 1/19/2017 ZIP
MPLAB Harmony Help File/Release Notes (v2.02b) 1/19/2017 ZIP
MPLAB Harmony Release Brief v2.02b 1/19/2017 ZIP
v2.01b
Windows (x86/x64)
MPLAB Harmony Integrated Software Framework v2.01b 10/12/2016 ZIP
MPLAB Harmony Help Files/Release Notes (v2.01b) 10/12/2016 ZIP
MPLAB Harmony Release Brief v2.01b 10/12/2016 ZIP
Linux 32-Bit and Linux 64-Bit
MPLAB Harmony Integrated Software Framework v2.01b 10/12/2016 ZIP
MPLAB Harmony Help Files/Release Notes (v2.01b) 10/12/2016 ZIP
MPLAB Harmony Release Brief v2.01b 10/12/2016 ZIP
Mac (10.X)
MPLAB Harmony Integrated Software Framework v2.01b 10/12/2016 ZIP
MPLAB Harmony Help Files/Release Notes (v2.01b) 10/12/2016 ZIP
MPLAB Harmony Release Brief v2.01b 10/12/2016 ZIP
v2.00b
Windows (x86/x64)
MPLAB Harmony Integrated Software Framework v2.00b 8/1/2016 ZIP
MPLAB Harmony Help Files/Release Notes (v2.00b) 8/1/2016 ZIP
MPLAB Harmony Release Brief v2.00b 8/1/2016 ZIP
Linux 32-Bit and Linux 64-Bit
MPLAB Harmony Integrated Software Framework v2.00b 8/1/2016 ZIP
MPLAB Harmony Help Files/Release Notes (v2.00b) 8/1/2016 ZIP
MPLAB Harmony Release Brief v2.00b 8/1/2016 ZIP
Mac (10.X)
MPLAB Harmony Integrated Software Framework v2.00b 8/1/2016 ZIP
MPLAB Harmony Help Files/Release Notes (v2.00b) 8/1/2016 ZIP
MPLAB Harmony Release Brief v2.00b 8/1/2016 ZIP

Interested in getting to know more about Harmony?

For Developers

If you have a great idea for embedded software that will enhance the MPLAB® Harmony engineer's experience or fill a technological need, then Microchip has everything you need to get started. This is your opportunity to open new avenues of business for you and your company by becoming an MPLAB Harmony third-party software provider, just like other leading software and operating system providers. This page contains the tools you need to build a set of solutions that other MPLAB Harmony developers worldwide can use to make the next generation of embedded products.

Getting Started

Are you ready to start developing with MPLAB Harmony? These guides will help you design your own software offering for MPLAB® Harmony:

Other Things to Check Out

  • For more information on MPLAB X IDE, including where to download the tools, check out the MPLAB Design Center.
  • Find out more about PIC32, Microchip's industry-leading 32-bit architecture, by going here.
  • Microchip partners with select software providers as part of our MPLAB® Harmony Premium Third-Party Solutions program. Go here to find out more.

Tell Us About Your Project

Do you have an MPLAB® Harmony project that you want other developers to hear about? Are you interested in becoming a featured MPLAB® Harmony Software Provider? We want to hear from you! Tell us more about you and what you're working on. We can't wait to hear about the great software that you are developing for PIC32 devices. We may even feature you in one of the many ways that we connect with our developer audience.

Contact Information

Please fill out your contact information below.
 
 

Porting from v1.XX

All MPLAB Harmony applications have already been ported to the MPLAB Harmony v2.0x framework and BSP. These should work without any other user changes. Considerations below may be needed for user code created in previous versions, depending on custom driver or other middleware usage.

BSPs have changed, and with them specifics about the pin and GPIO management, which may:

  • Impact custom drivers, and need refinement of the driver to correspond with pin names
  • Impact custom pin manager settings
  • Impact some applications, particularly that directly call GPIO (button, LED, external interrupt and enables)

Drivers have been changed

  • The APIs have not changed, so there should not be a direct reflection on applications that use them
  • Drivers provided in MPLAB Harmony will be updated by MHC configuration, and you will need to use the latest MHC version and reconfigure your project

PLIBs have changed

  • APIs for the PLIBs have not changed; however, implementation checking is more rigid
  • May cause some driver rewrite if they did not follow strict API convention

Compiler version has changed

  • MPLAB Harmony v1.08 and previous versions use MPLAB X IDE v1.40 (and parts support)
  • MPLAB Harmony v2.00 and later uses MPLAB X IDE v1.42 and later
  • More strict checking of some structures in later compilers make cross compilation problematic (e.g., Zero to pointer instead of null)

Graphics tools have changed (future release)

  • A one-way export from MPLAB Harmony v1.0x is possible
  • An import of the previous export will be possible in the new version
  • Some new elements like multi-layer and resource management will require additional data
  • You can continue to develop basic graphics in MPLAB Harmony v1.xx and port that to MPLAB Harmony v2.0 at any time; however, the reverse is not possible

In Graphics 2.0, all resources are by default stored in SRAM. If you want to use flash memory instead due to size constraints, please download and add the below file to your framework (framework\gfx\gac\gac_source.c.ftl) and provide flash memory access to MHGC.

MPLAB® Harmony Configurator

The MPLAB Harmony Configurator (MHC) is a time-saving hardware configuration utility for MPLAB Harmony, Microchip's award winning software framework. Developers use MHC to get visual understanding and control of the configuration of their target device and application. MHC is a fully integrated tool within MPLAB X IDE.

  • Generates all hardware configuration code
  • Generates all middleware framework related code
  • Automatically updates the active MPLAB X IDE project with all required files.
MHC is available as a plug-in within MPLAB X IDE.
 

Documentation


MPLAB® Harmony v2 Video Gallery