Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microcontrollers, Basics Successful Software Development for MCUs

Similar presentations


Presentation on theme: "Microcontrollers, Basics Successful Software Development for MCUs"— Presentation transcript:

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

2 Anyone Can Program in C! Sidney Harris
...but that doesn’t 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 LabVIEW and MatrixX: National Instruments Maple and MapleSim: Maplesoft

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, ISBN:

13 Model-Based Design Helpful white papers:
"Adopting Model-Based Design Interactive Kit," The MathWorks "Shortening the Embedded Design Cycle with Model-Based Design," National Instruments "High-Performance Physical Modeling and Simulation," MapleSoft "Developing Quality Embedded Systems Using Model-Based Design," The MathWorks

14 Software Development If model-based design isn’t 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.

16

17 Statechart Design "Practical UML Statecharts in C/C++," 2nd ed., Miro Samek, Newnes-Elsevier, ISBN:

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 Custom Computer Services
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, ISBN: "Automated Defect Prevention: Best Practices in Software Management," by Dorota Huizinga and Adam Kolawa, Wiley Interscience, ISBN: "The Art of Designing Embedded Systems," 2nd ed., by Jack Ganssle, Newnes, ISBN: "The Firmware Handbook," Jack Ganssle, ed., Newnes, ISBN:

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


Download ppt "Microcontrollers, Basics Successful Software Development for MCUs"

Similar presentations


Ads by Google