Overview. Introduction to Embedded Systems. What is an embedded system? What are some of their characteristics? What is the required skill set?

Similar documents
10 C Language Tips for Hardware Engineers

Developing Reusable Device Drivers for MCU's

Bootloader Design Techniques for Microcontrollers

In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured

Programming Languages and Program Development

What are Embedded Systems? Lecture 1 Introduction to Embedded Systems & Software

PC204. Lecture 5 Programming Methodologies. Copyright 2000 by Conrad Huang and the Regents of the University of California. All rights reserved.

Code Convention and version control help us to success in Botball

Robotic Systems ECE 401RB Fall 2006

CSE 70 Final Exam Fall 2009

Chapter 9. Software Testing

Systems Software. Recitation 1: Intro & Revision Control. Quite different from 213. Our Philosophy. Partly-free lunch

The Nios II Family of Configurable Soft-core Processors

Lethbridge/Laganière 2005 Chapter 9: Architecting and designing software 6

Audience: Info Workers, Dev

An overview of Interrupts ECE3534

AMD actual programming and testing on a system board. We will take a simple design example and go through the various stages of this design process.

Software Engineering Lifecycles. Controlling Complexity

Modular Design of Embedded Software for Distributed Robot Control

Test Driven Development (TDD)

Computer Hardware Requirements for Real-Time Applications

Review&Preview 1/23/15, 4:08:07 PM 1. 3rd edition - standardized, and standard library allows programmer to start from a higher level

Introduction to Embedded Systems

Task Partitioning and Placement in Multicore Microcontrollers. David Lacey 24 th September 2012

NCC EDUCATION INTERNATIONAL DIPLOMA IN COMPUTER STUDIES SYSTEMS DEVELOPMENT. 5 th June 2005

Examples. Object Orientated Analysis and Design. Benjamin Kenwright

Operating- System Structures

ECE332, Week 2, Lecture 3. September 5, 2007

ECE332, Week 2, Lecture 3

Heresies and Dogmas in Software

SOFTWARE LIFE-CYCLE MODELS 2.1

4/28/2014. Defining A Replacement Cycle for Your Association. Introductions. Introductions. April Executive Director, Idealware. Idealware.

Data Structures and Algorithms

Low-Level Languages. Computer Programs and Programming Languages

The Embedded System Design Process. Wolf Text - Chapter 1.3

All the subjective part of 2011 papers solved complete reference numbers

ARM Simulation using C++ and Multithreading

Excel programmers develop two basic types of spreadsheets: spreadsheets

EECS 373 Design of Microprocessor-Based Systems

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin

Best practices for OO 10 content structuring

OBJECT-ORIENTED MODELING AND DESIGN. Process Overview

CSCI 445 Amin Atrash. Control Architectures. Introduction to Robotics L. Itti, M. J. Mataric

Multi-core microcontroller design with Cortex-M processors and CoreSight SoC

Application Note Software Device Drivers for the M29Fxx Flash Memory Device

Improving Software Testability

PROCESS DEVELOPMENT METHODOLOGY The development process of an API fits the most fundamental iterative code development

Command and Control Tutorial

Author: Steve Gorman Title: Programming with the Intel architecture in the flat memory model

Java Software Solutions

Introduction to Software Engineering

Chapter 1: Programming Principles

Systems Analysis and Design in a Changing World, Fourth Edition

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file?

Job Posting (Aug. 19) ECE 425. ARM7 Block Diagram. ARM Programming. Assembly Language Programming. ARM Architecture 9/7/2017. Microprocessor Systems

Analysis of the Test Driven Development by Example

Introduction to Computer Systems and Operating Systems

Using the HID class eases the job of writing USB device drivers

Learning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli

Heresies and Dogmas in Software Development

E-companion. Quiz for IT-knowledge

COP 1170 Introduction to Computer Programming using Visual Basic

ECE332, Week 8. Topics. October 15, Exceptions. Hardware Interrupts Software exceptions

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6

Chapter 1: Principles of Programming and Software Engineering

News. CSE 130: Programming Languages. Environments & Closures. Functions are first-class values. Recap: Functions as first-class values

UNIT 1.1 SYSTEMS ARCHITECTURE MCQS

CA ERwin Data Modeler r9 Rick Alaras N.A. Channel Account Manager

Changes in timetable (changes in GREEN)

Software Development Project. Kazi Masudul Alam

A First Look at Microprocessors

Chapter 5. Introduction ARM Cortex series

4. Hardware Platform: Real-Time Requirements

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

PC Interrupt Structure and 8259 DMA Controllers

COMPUTER ORGANISATION CHAPTER 1 BASIC STRUCTURE OF COMPUTERS

Foundational Design Patterns for Moving Beyond One Loop

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Object Oriented Programming

Making USB Device Drivers Easier Using the HID Class

Lecture 15 Distributed System Architectures

This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units.

Rediscovering. Modularity. Stuttgart JUG November 20 th 2012

Sample Exam. Advanced Test Automation - Engineer

LENOVO BUSINESS SOLUTIONS AND INTEL OPTANE MEMORY

CMPSC 311- Introduction to Systems Programming Module: Systems Programming

Introduction to VHDL. Module #5 Digilent Inc. Course

Java Software Solutions for AP Computer Science 3rd Edition, Lewis et al. 2011

QUIZ Friends class Y;

Foundations of object orientation

Figure 1 - EDGE Developer Suite Block Diagram

Agile Accessibility. Presenters: Ensuring accessibility throughout the Agile development process

A VIRTUALLAB APPROACH FOR WIRELESS SENSOR MOTES AND WIRELESS SENSOR NETWORKS

3. The MC6802 MICROPROCESSOR

CS112 Lecture: Defining Instantiable Classes

Midi2Org_16. An electronic board for automating a musical instrument. User Manual

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design

TESTING TRENDS IN 2016: A SURVEY OF SOFTWARE PROFESSIONALS

Embedded Controller Programming 2

Worlde TUNA MINI MIDI Controller User s Manual

Transcription:

Embedded Basics

Overview Introduction to Embedded Systems What is an embedded system? What are some of their characteristics? What is the required skill set? Software Development Process Waterfall vs Agile Tips and Tricks for writing embedded software 20 common tips and tricks to improve software

Introduction to Embedded Systems What is an embedded system? - An embedded system is a microprocessor used as a component in another piece of technology - The end product is not by definition a computer such as a laptop or desktop - Examples include

Introduction to Embedded Systems What are some of their characteristics? Resource constrained compared to traditional computer Limited Memory (RAM and ROM) Processor clock (8 MHz to 48 MHz typical) Bus Bandwidth ( 8 bit, 16 bit and 32 bit) Power Consumption Real-time response often critical or time guaranteed in safety critical applications ( must respond within x ms) Interacts with environment through the use of sensors, displays, etc Reliable ( the goal anyways)

Introduction to Embedded Systems What is the required skill set? Digital Electronics Communication interfaces Sensors Programming languages (C/C++, Java, etc) Algorithms Real-time programming Debugging skills Project management etc Tight coupling between software/hardware requires an understanding of both to be successful!

Software Development Process Waterfall Development Process Time spent early in the design cycle (Requirements) can lead to greater economy later Emphasis on documentation Difficult to perfectly move through one stage, changes result in scrapping time and work done Need a magic 8 ball to properly predict challenges that could affect design and requirements

Software Development Process Used to provide an iterative development process which adds flexibility to the design process Feedback is used at the end of each release as the primary control mechanism Basic functionality is developed first allowing critical components and primary functionality to be tested and adjusted Each iteration involves planning, requirements analysis, design, coding and testing

#1 Flowchart First, Implement Second

#2 Write Lasagna not Spaghetti Code!

#3 Use State Machines to Control Program Flow - Actions dictate program flow - Event driven - Easy to follow and implement - Program flow controlled by decision making - Continuous conditional checking

#4 Take Advantage of Modularity

#5 Limit Function Complexity Many methods to measure complexity Cyclomatic Complexity Kolmogorov complexity Function points

#6 Avoid using Assembly Language

#7 Don t use goto statements - Poor program structure - Difficult to follow and maintain - Results in spaghetti code! - Good program structure - Easier to follow and maintain - Results can be spaghetti code!

#8 Use for(;;) or while(1) - For(;;) is always considered to be true with no expressions - For(;expression;) behaves like a while loop - Typically used to seeing for(i=0; i<val; i++); - Any none zero value is considered to be true - While(expression);

#9 Use the appropriate conditional statement for the job - If / else - If / else if / else - Switch - While - Do while

#10 Use #pragma statements sparingly

#11 Use Descriptive Naming Conventions Don t use abbreviations but the whole descriptive word! If you use abbreviations then create a lookup table Call it what it is and don t be cryptic! (Use long variable names) Use broad terms first then get specific Choose naming conventions and be consistent! Develop a coding standard to keep track of your conventions so that future you or maintainer can understand

#12 Keep Interrupt Service Routines Simple Concurrent Interrupts Real-time response Avoid loops and complex calculations Do minimum of what needs to be done and return. Another task or module can handle processing Clear and re-enable interrupts ASAP

#13 Avoid the Use of Global Variables Encapsulate variables Use data hiding Object oriented design Prevents data corruption Reduces reentrancy issues Use static to declare local variables Use static to declare private functions

#14 Errors aren t always as they seem

#15 Use Processor Example Code to Experiment with Peripherals

#16 Document the Code Thoroughly Function Inputs Function Outputs Function use and behavior Related Functions Plenty of comments on what it does Maintainers and future self will thank you Use tools like Doxygen to generate documentation from code comments

#17 Use a Source Code Repository and Commit Frequently SVN is used to provide a method of source control. Completed modules are checked into SVN which then assigns a version control number to the software. This keeps the code constantly under revision control and allows for a method to examine changes in the code base between revisions. It can also prevent the code from being accessed if it has been checked out.

#18 Good Programmers don t necessarily write fewer lines of code Good Programmers.. Write structured, maintainable code Document their code in a clear manner Recognize and reuse design patterns Are passionate about writing code (find it fun) Never stop learning and honing skills Enjoy challenges Thoroughly test their work Are humble and adapt to change easily Strive for perfection but identify limits

#19 Stay on Top of Developing Technologies

#20???????????????? Audience Tips

Questions Contact Info Jacob Beningo jacob@beningo.com www.beningo.com EDN Blog: http://www.edn.com/electronics-blogs/4375394/embedded-basics