42
Overcoming Software Development Challenges by Using An Integrated Software Framework

Overcoming software development challenges by using an integrated software framework

Embed Size (px)

Citation preview

  • Overcoming Software Development Challenges by Using An Integrated

    Software Framework

  • q This webinar will be available afterwards at www.designworldonline.com & email

    q Q&A at the end of the presentation q Hashtag for this webinar: #DWwebinar

    Before We Start

  • Moderator

    Aimee Kalnoskas EE World

    Bud Caldwell Microchip Technology

    Anand Rangarajan Microchip Technology

    Presenters

    Richard Barry Real Time Engineers

  • Overcoming software development challenges by using an integrated

    software framework. MPLAB Harmony

  • Agenda

    Embedded software development challenges MPLAB HarmonyOverview Application migration video demo using MPLAB Harmony Third Party Feature Presentation: Q&A

  • Challenges??? Increasing development time. On time Project Completion.

    Time to Market, Competition. ($$$$$$$$$$$$)

  • Embedded Development Challenges Em

    bedd

    ed Develop

    ment

    Challe

    nges

    End Systems Sophistication Increasing Complexity of Projects Growing Development Time Stretching

    S/W % Total Development Time* 60%

    Switching between RTOS leads to reworkLack of software compatibility creates new bugs

    Greater Risk with Re-Work of Code

    Challenge to Integrate RTOS, Middleware,Drivers All in One Platform

    Generally Multiple 3rd Party Software Suppliers

    * 2014 UBM Embedded Market Study

  • Embedded Development Challenges

    Increased Verication & Debug Time MeansLess time to Focus on Critical Applications

    60% of Software Resource Involved in Verication**Defects Found during Verication Costs 10x More Than Found in Design***

    Unpredictable Future Competitive Environments

    Increasing Pressure to Quickly Adapt Economic Risks of 3rd Party Companies

    Dicult to Procure all the S/W Components from Single Vendors Website

    Full Feature Set Oerings are Costly Sca[ered Support for 3rd Party Oerings

    Embedd

    ed Develop

    ment

    Challe

    nges

    ** Defect Prevention: Reducing Costs and Enhancing Quality, isixsigma Mukesh Soni*** Frequently Forgo[en Fundamental Facts about Software Engg, IEEE Robert L Glass

  • MPLAB Harmony Solves! MPL

    AB

    Harmon

    y So

    lutio

    n

    *** Frequently Forgo[en Fundamental Facts about Software Engg, IEEE Robert L Glass

    Customer Code Developed in Harmony Framework has Higher Reusability

    COMPLEX

    ITY

    RE-WORK

    INCONSIS

    TENCY

    FRAGMEN

    TED

    OBSOLOSC

    ENCE

    Reduces Development Costs:

    REDUCE!

    Microchip Tested, Debugged, Interoperable Code is Ready for RE-USE

    RE-USE!

    Modular Architecture Enables Ecient Integration

    Pre-tested Software Eliminates These Bugs

    SAVE!

    Single Source Support for MPLAB Harmony Code (including 3rd party solutions) by Microchip

    Improved Reaction Time to Ever Changing Markets

    FUTURE

    PROOF!

  • MPLAB Harmony is a comprehensive, interoperable,

    tested software developmentframework for Microchip PIC32microcontrollers.

    o The frameworkintegrates both internal and 3rd party middleware, drivers, peripheral libraries andreal time operatingsystems, simplifying and acceleratingthe 32-bit code development process.

    o MPLAB Harmony works within the MPLAB X IDE development environment and is supported by Microchip.

    First Line of Support First line of support provided by Microchip for all Harmony

    components, including third-party solutions

    Comprehensive Web Portal Includes Licensing, Resale, Technical Support & Collateral

    for Microchip & third-party Harmony components

    What is MPLAB Harmony Flexible

    InteroperableCompatible

    MPLAB Harmony

    ModularRe-Usable

  • Overview

  • Architecture Capabilities

    Bare-Metal

    AddsISR Task Processing

    ISR Task Prioritization

    AddsMultiple Polled Task Processing

    Polled Task Prioritization

    AddsRTOS Specic CapabilitiesOS Programming Model

    RTOS-Based

    Consistent State-Machine Format Free FormRTOS

    PolledSolutions

    InterruptDriven

    Solutions

    RTOSAgnosticSolutions

    RTOSSpecicSolutions

  • Architecture

    Software Fram

    ework

  • Application

    Applications Application Initialization

    Application Logic

    System Conguration

    Dierent Parts of an embedded

    application serve dierent purposes.

    Peripheral Logic

    System Initialization

    System Control Logic

    Middleware Logic

    Middleware Initialization

    Peripheral Initialization

  • Applications Application

    Application Initialization

    Application Logic

    Framework

    Peripheral Initialization

    Middleware Logic

    Middleware Initialization

    Peripheral Logic

    System

    System Conguration

    System Initialization

    System Control Logic

  • Applications

    MPLAB Harmony Libraries

    System & Conguration

    Code

    Framework

    Peripheral Initialization

    Middleware Logic

    System

    System Conguration

    System Initialization

    System Control Logic

    Middleware Initialization

    Peripheral Logic

    Your Application Code

    Application

    Application Initialization

    Application Logic

  • Framework of Libraries Interface Functions

    o Input, Process, Output o May have Side Effects o Treated as a Black Box

    Module o One or more closely related functions o Share common data or resources o Maintain state of common resources o Interface stays the same, even if implementation changes

    Provides Ability to Divide & Conquer

  • Multiple Clients & Instances

    USART 1 USART 2

    USARTDriver

    Multiple Instances Dynamic library modules can manage multiple instances of same hardware. Avoids duplicating library code Simplies application or client code Requires use of an instance index

    Timer 1

    Timer 1Driver

    TCP/IP Console File System

    Multiple Clients Multiple unrelated clients can access common server modules. Localizes protection & maintenance of shared resources

    Isolates clients from each other Requires use of a client handle

  • SW

    SWSW

    HW

    HWHW

    Multiple Clients & Instances

    USART 2USART 1

    USART 2Driver

    USART 2Client 1

    USART 1Client

    USART 2Client 2

    USART 1 USART 2

    USARTDriver

    USART 1Client 1

    USART 2Client 3

    USART 1Client 2

    USART 1Driver

    Static Multi-ClientStatic Single-Client

    Dynamic Multi-Client

  • System Configuration

    int main(void) { SYS_Initialize(); while(true) { SYS_Tasks(); } return(EXIT_VALUE); }

    #define APP_TMR_HW_ID TMR_ID_3 #define SYS_CLK_FREQUENCY 0x0BEBC200 #define APP_LED_BLINKING_RATE 0x0002625A

    system_config.h

    system_initialize.c #pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FWDTEN = OFF #pragma config OSCIOFNC = ON, POSCMOD = HS, FSOSCEN = ON, FNOSC = PRIPLL #pragma config ICESEL = ICS_PGx2 void SYS_Initialize( void ) { /* Call all library & application initialization routines */ }

    void SYS_Tasks( void ) { /*Call all polled library & app "Tasks" routines*/ }

    system_tasks.c

    void __ISR ( _TIMER_3_VECTOR ) _ISR_TMR_3_stub ( void ) { /* Call the timer librarys interrupt routine */ }

    system_interrupt.c

  • Polled Configurations

    main(){ while(true) { GFX_Tasks();

    TCP_Tasks();

    SPI_Tasks(); }}

  • Interrupt Driven Configurations

    _SPI1_Interrupt(){ SPI_Tasks();}

    main(){ while(true) { GFX_Tasks();

    TCP_Tasks();

    }}

  • GFX_Thread(){ while(true) { GFX_Tasks(); }}

    RTOS Driven Configurations

    TCP_Thread(){ while(true) { TCP_Tasks(); }}

    _SPI1_Interrupt(){ SPI_Tasks();}

  • OSAL Services

    OSAL

    Semaphores

    Mutexes

    Memory Allocation

    Critical Sections

    Control and Diagnostics

    Multi-Thread Safety Multi-Thread

    Synchronization RTOS Compatibility OS Agnostic or

    Bare Metal" Light-weight

  • MPLAB Harmony Summary/Next steps

    Modular architecture allows Drivers and Libraries to work together with minimal eortApplications can be easily ported to dierent boardsImproved Code Interoperability

    Integrated single platform enables shorter development timeAble to easily add features

    Faster Time to Market for Customers

    Improves scalability across PIC32 Microchip parts to custom t customers requirementImproved Compatibility

    Common SW platform with standard interface ensures ecient Microchip supportOne stop support for all customer needsSimplied Support

    MPLAB Harmony integrates third party solutions (RTOS, Middleware, Drivers etc) into the software framework seamlessly

    Enhanced 3rd party software integration

    Where to get MPLAB Harmony?

    Basic framework is FREE!Select Tools & Libraries have a premium.Pricing

    Download MPLAB Harmony at www.microchip.com/Harmony

  • MPLAB Harmony Application Migration Demo

  • Application Overview Basic graphics application

    with USB and file system services.

    D4 on Display is synced up with on board LED D4.

    Display prompts the user to

    insert the USB drive. Once the USB Pen drive is

    inserted, the applications reads a le and displays the text on the screen.

  • Application Overview

    On USB Pen drive insertion, the applications reads a le from the drive and displays the text on the screen.

  • Application Migration Platforms PIC32MZ Embedded Connectivity Starter kit + PIC32 Multi-media Expansion Board II (MEB II)

    PIC32 Ethernet Starter kit II + PIC32 Multi-media Expansion Board (MEB I)

    Microcontroller : PIC32MZ2048ECH144 (200 MHz, 2 MB Flash and 512 KB RAM)

    Low Cost Controller less Graphics (L.C.C.G). 4.3" WQVGA PCAP touch display

    Microcontroller : PIC32MX795F512L (80 MHz, 512KB Flash and 128 KB RAM)

    Solomon Systech Graphics Controller (SSD1926) 3.2 color TFT touch-screen QVGA display

  • Microcontroller : PIC32MZ2048ECH144 (200 MHz, 2 MB Flash and 512 KB RAM)

    Low Cost Controller less Graphics (L.C.C.G). 4.3" WQVGA PCAP touch display

    Application Migration Summary

    Microcontroller : PIC32MX795F512L (80 MHz, 512KB Flash and 128 KB RAM)

    Solomon Systech Graphics Controller (SSD1926) 3.2 color TFT touch-screen QVGA display

    v Application Migration with just some basic configuration changes . v Not a single line of code needed to be written. v Efficient, time-saving.

    PIC32MZ Embedded Connectivity Starter kit + PIC32 Multi-media Expansion Board II (MEB II)

    PIC32 Ethernet Starter kit II + PIC32 Multi-media Expansion Board (MEB I)

  • Value Proposition

    FreeRTOSs compelling value proposition, which has made it the market leading RTOS in the MCU space, is delivered directly to Microchip customers within the Harmony ecosystem

    High quality C source code under strict quality control

    Safety critical version ensures dependability

    Tutorial books and training to educate engineers

    Pre-congured example projects

    Free rst class support

    Large/growing user base and community (>113K downloads in 2014)

    Peace of mind - low cost commercial options can be taken at any time

    = A low total cost of ownership, risk free, & compelling solution

  • Ease of Use Benefit #1 Automatic inclusion of correct

    source files

  • Ease of Use Benefit #2 Automatic creation of

    configuration file

  • Ease of Use Benefit #3 Automatic creation of

    system interrupts No need for any assembly

    coding

  • Ease of Use Benefit #4 Automatic creation of

    system tasks

  • Developer Support

  • MPLAB Harmony Configurator- graphical system and middleware configuration

    Attend the Second Webinar of the MPLAB Harmony series to learn: v In depth Hands-on Demo of MPLAB Harmony

    Configurator. v Integrating Network Connectivity in an embedded

    design. Featured Ecosystem Partner:

    May 20 2015 2-3pm EST

  • MPLAB Harmony Ecosystem

    Attend the third Webinar of the MPLAB Harmony series to learn: v Benefits of using MPLAB Harmony for integrating

    third party solutions. v How MPLAB Harmony simplifies software purchase

    and eases support. Featured Ecosystem Partner:

    May 27 2015 2-3pm EST

  • Questions?

    Bud Caldwell Microchip Technology www.microchip.com/harmony

    Aimee Kalnoskas EE World [email protected]

    Anand Rangarajan Microchip Technology www.microchip.com/harmony

    Richard Barry Real Time Engineers Ltd. www.FreeRTOS.org/contact

  • Thank You q This webinar will be available at

    designworldonline.com & email

    q Tweet with hashtag #DWwebinar

    q Connect with Design World

    q Discuss this on EngineeringExchange.com