2.1 Introduction to MPLAB Harmony v3
MPLAB Harmony v3 together with the MPLAB X IDE, enhances the application development experience through the simple and user-friendly peripheral libraries (PLIBs), abstracted drivers, and modular software downloads.
The MPLAB® Code Configurator (MCC) is a free graphical programming environment that generates easy-to-understand C code for the project. It provides an intuitive interface to configure peripherals and functions specific to the application. MCC supports 8-bit, 16-bit, and 32-bit devices, including PIC®, AVR®, SAM microcontrollers (MPUs, MCUs), and dsPIC® Digital Signal Controllers (DSCs). The MCC consists of three content types: MCC Melody, MCC Classic, and MPLAB Harmony, offering application libraries and system and peripheral drivers for embedded software development.
MPLAB Harmony v3 is a fully integrated embedded software development framework for 32-bit microcontrollers (MCUs) and microprocessors (MPUs).
The key features of MPLAB Harmony v3 are as follows:
- Unified software development framework for 32-bit PIC, SAM MCUs, and MPUs
- MCC GUI tool to ease configuration of hardware components, for example, Clock, Pin, Interrupt, ADC, DMA, Memory Protection Unit (MPU)
- Framework downloader to simplify the process of downloading the firmware libraries, demonstration applications, and extensions to the MCC GUI
- Simple, light weight, and user-friendly peripheral libraries (PLIBs)
- Modular and interoperable drivers and system services
- Rich set of middleware
- Support for RTOS and other third-party libraries
- Flexible firmware design models
MPLAB Harmony v3 has a layered architecture that consists of several software modules. These modules are portable, compatible to each other and they communicate and exchange data and information with each other. The figure below illustrates the MPLAB Harmony architecture.
- PLIB: This layer is the closest to the hardware with no abstraction and direct register access.
- Driver: This layer is the
software peripheral drivers written on top of the PLIBs.Note: The term driver has a different meaning in MPLAB Harmony v3, ASFv3, and Atmel START. A MPLAB Harmony v3 driver is rich in nature and abstracted from the hardware, whereas ASFv3 driver has a little software handling and complete hardware access. Atmel START drivers are divided into HAL, HPL, and HRI layers.
- System Configuration: The system service manages shared system resources. These resources can be used by drivers, middleware or applications, such as Timer service, debug console, Clock, and DMA configurations.
- Middleware: Middleware typically consists of softwares that involves using protocols (sometimes related to IEEE® standards) such as, USB software stack, TCP/IP network stack, Graphics stack, Bluetooth, and other Wireless stacks
- Third-party libraries: Consists of few RTOS options, Graphics stack from Segger, Secure Socket Layer (SSL), Transport Layer Security (TLS), and Cryptographic libraries from WolfSSL Inc®.
- Plugin: Custom Bluetooth Profiles or USB function classes are available as plug-ins. For example, the USB protocol stack is a plug-in.
- MCC: A GUI tool used to configure the MPLAB Harmony v3 projects and generate codes. Users can configure the clock, pins, peripherals and so on to fit the needs of their application and generate the code. Then PLIBs and driver content might change according to the configuration. The code rendering or code generation is part of the MCC, and is used to maintain the drivers, and to avoid unwanted code.