Microcontrollers, Basics Successful Software Development for MCUs - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Microcontrollers, Basics Successful Software Development for MCUs

Description:

... several teams Hardware engineers Software engineers Mechatronics engineers Sensor experts Graphical-user-interface ... LabVIEW and MatrixX: National ... Arduino ... – PowerPoint PPT presentation

Number of Views:197
Avg rating:3.0/5.0
Slides: 37
Provided by: test454
Category:

less

Transcript and Presenter's Notes

Title: Microcontrollers, Basics Successful Software Development for MCUs


1
Microcontrollers, Basics Successful Software
Development for MCUs
  • 18 January 2012
  • Jonathan A. Titus

2
Anyone Can Program in C!
Sidney Harris
...but that doesnt mean they write GOOD code.
3
How Do You Start a Software Project?
  • You must have a clear objective!
  • Describe system architecture and behavior
  • Simple projects 1- to 5-person team
  • Complex project several teams
  • Hardware engineers
  • Software engineers
  • Mechatronics engineers
  • Sensor experts
  • Graphical-user-interface designers

4
Investigate Model-Based Design
  • In the not-so-good old days...

Courtesy of The MathWorks
5
Model-Based Design I
Courtesy of The MathWorks
6
Model-Based Design II
Courtesy of Texas Instruments
7
Create an Executable Model
  • Use modeling and simulation tools
  • MATLAB and Simulink MathWorks
  • www.mathworks.com
  • LabVIEW and MatrixX National Instruments
  • www.ni.com
  • Maple and MapleSim Maplesoft
  • www.maplesoft.com

8
Clutch-Control Model
Courtesy of The MathWorks
9
Vehicle-Control Model
Courtesy of Maplesoft
10
Model-Based Design
  • Benefits
  • Everything traces back to requirements
  • Teams work with the same information
  • Data flows up and down
  • No prototypes needed to begin
  • Tools can produce known-good code
  • VHDL, Verilog, C, C
  • Program MCUs and FPGAs

11
Model-Based Design
  • Problems
  • Large commitment of time and money
  • Requires commitment to a new design discipline
  • Needs a team evangelist
  • Difficult to convince teams to use new tools

12
Model-Based Design
  • "Driving Technical Change Why People on Your
    Team Don't Act on Good Ideas and How to Convince
    Them They Should," by Terrence Ryan, The
    Pragmatic Programmers, 2010. ISBN
    978-1-93435-660-9.

13
Model-Based Design
  • Helpful white papers
  • "Adopting Model-Based Design Interactive Kit,"
    The MathWorkshttp//www.mathworks.com/programs/te
    chkits/techkit_adopting_mbd.html.
  • "Shortening the Embedded Design Cycle with
    Model-Based Design," National Instruments
  • http//zone.ni.com/devzone/cda/tut/p/id/4074.
  • "High-Performance Physical Modeling and
    Simulation," MapleSoft
  • http//www.maplesoft.com/products/maplesim/index.a
    spx.
  • "Developing Quality Embedded Systems Using
    Model-Based Design," The MathWorkshttp//www.gist
    l.com/2008/Using_Model_Based_Design.pdf

14
Software Development
  • If model-based design isnt right for you, what
    other approaches can you take?
  • IAR VisualSTATE software
  • Statecharts State-machine designs
  • Flow-chart models
  • DIY techniques?

15
IAR VisualSTATE
"Designing a state machine to solve a problem,"
IAR Systems. http//tinyurl.com/7ckyejf
16
(No Transcript)
17
Statechart Design
"Practical UML Statecharts in C/C," 2nd ed.,
Miro Samek, Newnes-Elsevier, 2009. ISBN
978-0-7506-8706-5.
18
Coding Tools I
  • MCUs have an associated C/C compiler
  • MCU vendors supply software tools
  • Microchip -- MPLAB X
  • Texas Instruments -- Code Composer Studio
  • Freescale -- CodeWarrior
  • Renesas -- High-Performance Embedded Workbench
  • Rabbit Semiconductor -- Dynamic C
  • Vendor tools close to the chips
  • Try free or limited versions before you buy

19
Coding Tools II
  • Third-Party Tools
  • Atollic
  • GreenHills Software
  • Hitex
  • IAR
  • Code-Red Technology
  • Keil (ARM)
  • HiTech (Microchip)
  • Raisonance
  • Rowley
  • Custom Computer Services
  • CodeSourcery (Mentor)
  • MikroElektronika

20
What Should Software Tools Do?
  • Compile C, C, and assembly-language
  • Easily mix C/C and in-line assembly code
  • Simplify tracking projects, files, and revisions
  • Provide a smart color-coding editor
  • Simplify I/O and peripheral setup
  • Provide debug and test capabilities
  • Quickly connect with program/debug pods
  • Link to latest documents and manuals

21
What Should Software Tools Do?
  • Simplify tracking projects, files, and revisions

Courtesy of Keil Software
22
What Should Software Tools Do?
  • Provide a smart color-coding editor

23
What Should Software Tools Do?
  • Simplify I/O and peripheral setup

Courtesy of Texas Instruments
24
What Should Software Tools Do?
  • Provide debug and test capabilities

Courtesy of Microchip
25
What Should Software Tools Do?
  • Quickly connect with program/debug pods

26
Take Advantage of Other Resources
  • Use dev kits as golden platforms for code tests
  • Adopt a consistent coding style
  • Google C Style Guide
  • If you are new to MCUs, start with a small board
  • Arduino Uno, Digilent Uno32, ARM mbed
  • Use vendor code libraries
  • Visit and join MCU-user and MCU-software forums
  • Embedded Systems Conference (ESC)
  • 26 through 29 March 2012, San Jose, CA, USA

27
Good Embedded-System Books
  • "Test-Driven Development for Embedded C," James
    W. Grenning, The Pragmatic Programmers, 2011.
    ISBN 978-1-93435-662-3.
  • "Automated Defect Prevention Best Practices in
    Software Management," by Dorota Huizinga and Adam
    Kolawa, Wiley Interscience, 2007. ISBN
    978-0-470-04212-0.
  • "The Art of Designing Embedded Systems," 2nd ed.,
    by Jack Ganssle, Newnes, 2008. ISBN
    978-0-7506-8644-0.
  • "The Firmware Handbook," Jack Ganssle, ed.,
    Newnes, 2004. ISBN 978-0-7506-7606-9.

28
Hed
  • Text
  • Bullets
  • If
  • Needed

29
Hed
  • Text
  • Bullets
  • If
  • Needed

30
Hed
  • Text
  • Bullets
  • If
  • Needed

31
Hed
  • Text
  • Bullets
  • If
  • Needed

32
Hed
  • Text
  • Bullets
  • If
  • Needed

33
Hed
  • Text
  • Bullets
  • If
  • Needed

34
Hed
  • Text
  • Bullets
  • If
  • Needed

35
Hed
  • Text
  • Bullets
  • If
  • Needed

36
Hed
  • Text
  • Bullets
  • If
  • Needed
Write a Comment
User Comments (0)
About PowerShow.com