An Introduction to Embedded Software Architecture and Design

Slides:



Advertisements
Similar presentations
Chapter 3: Modularization
Advertisements

Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Implementation and Testing.
MotoHawk Training Model-Based Design of Embedded Systems.
Introduction To System Analysis and Design
Handheld TFTP Server with USB Andrew Pangborn Michael Nusinov RIT Computer Engineering – CE Design 03/20/2008.
Component-Level Design
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
CS 8532: Adv. Software Eng. – Spring 2007 Dr. Hisham Haddad Tuesday Class will start momentarily. Please Stand By … CS 8532: Advanced Software.
Sage CRM Developers Course
Managing the development and purchase of information systems (Part 1)
1 BTEC HNC Systems Support Castle College 2007/8 Systems Analysis Lecture 9 Introduction to Design.
Introduction To System Analysis and Design
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
CS 4850: Senior Project Fall 2014 Object-Oriented Design.
RL78 Code & Dataflash.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Payment processing re-invented Mark Bradbury, CEO.
FlowLevel Client, server & elements monitoring and controlling system Message Include End Dial Start.
Presented by: © 2015 Jacob Beningo All Rights Reserved Writing Portable and Robust Firmware in C September 2, 2015 Jacob Beningo, CSDP Class 3: Uart Driver.
Presented by: © 2015 Jacob Beningo All Rights Reserved Writing Portable and Robust Firmware in C September 4, 2015 Jacob Beningo, CSDP Class 5: Robust.
Oracle APPS Technical Course Online Training CONTACT US: USA: , INDIA: ,
Introduction to OOAD and UML
Advanced Higher Computing Science
Embedded System Design Techniques™:
Business Process and Functional Modeling
Software Design Refinement Using Design Patterns
Chapter 5 System modeling
Embedded Software Development with Python and the Raspberry Pi
Chapter 6 The Traditional Approach to Requirements.
Modern Systems Analysis and Design Third Edition
School of Business Administration
Embedded Software Development with Python and the Raspberry Pi
Chapter ? Quality Assessment
Architecture Concept Documents
Testing Process Roman Yagodka ISS Test Leader.
Modern Systems Analysis and Design Third Edition
Unified Modeling Language
System Design and Modeling
System Design.
Part 3 Design What does design mean in different fields?
Object-Oriented Design
An Introduction to Embedded Software Architecture and Design
Baremetal C Programming for Embedded Systems
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Embedded Software Development with Python and the Raspberry Pi
Introduction to Software Testing
CLINICAL INFORMATION SYSTEM
Modern Systems Analysis and Design Third Edition
Component-Level Design
Writing Portable and Robust Firmware in C
Writing Portable and Robust Firmware in C
February 26, 2015 Jacob Beningo, CSDP
Baremetal C Programming for Embedded Systems
Modern Systems Analysis and Design Third Edition
Baremetal C Programming for Embedded Systems
CS 8532: Advanced Software Engineering
An Introduction to Embedded Software Architecture and Design
An Introduction to Embedded Software Architecture and Design
Applying Use Cases (Chapters 25,26)
Stumpf and Teague Object-Oriented Systems Analysis and Design with UML
Applying Use Cases (Chapters 25,26)
An Introduction to Embedded Software Architecture and Design
Embedded System Design Techniques™:
February 24, 2015 Jacob Beningo, CSDP
NIEM Tool Strategy Next Steps for Movement
CSCI1600: Embedded and Real Time Software
Modern Systems Analysis and Design Third Edition
UML Design for an Automated Registration System
Presentation transcript:

An Introduction to Embedded Software Architecture and Design Class 4: From Architecture to Implementation December 4, 2014 Jacob Beningo, CSDP

Course Overview Introduction to Embedded Software Architecture Software Architecture using UML Understanding Embedded Software Architectures From Architecture to Implementation Software Architecture of a UAV and Review

Session Overview Review of the Example Problem Architecture to Design Design to Implementation Tips and Tricks

An Example Problem Review Remote firmware updates System requires periodic firmware updates in the field without the use of specialized hardware Must blink an led in this mode Seamless ability to switch between app and update mode System requires the ability to be updated via UART simulates radio connectivity

Architecture to Design Software Architecture Provides us different views of software in regards to User interactions with the system Environmental conditions Timing System states Etc Relate to requirements of the system Does NOT provide low level details

Architecture to Design

Architecture to Design What is included in the design phase? Detailed planning of the software to the lowest levels! Such as ….. Flowcharting Function definitions Variable naming Task declarations API’s

Architecture to Design Flow Charts Most common design element Consists of Entry point Conditionals Actions Exit point Keep them simple! Highlight enum and const

Architecture to Design Flowcharting of the boot-loader

Architecture to Design API’s Critical to creating reusable software Defines a common interface that can be used from one project to the next Identifies useful peripheral features If adhered to code can be reused and ported with ease Examples include ….

Architecture to Design API’s continued Digital Input / Output API’s EEPROM

Architecture to Design Operating System Selection What did the architecture dictate? Polling Interrupt Driven (Event-driven) Cooperative Scheduling Real-time Operating System Hybrid systems

Architecture to Design Coding Standards Design stage is the perfect time to pick a coding standard! Sets the tone for how the firmware should look and feel Sets the do’s and don’t Sets the best practices to follow Hopefully verifiable by tools

Design to Implementation Implementation is easy! Architecture for the general roadmap Design for the detailed flowcharts and layout What could possibly go wrong?

Design to Implementation Bootloader Implementation // When the checksum has completed and the timer has expired for waiting for a // programming tool to respond, perform the branch checks. if((Checksum_Complete == TRUE) && (StartUpTmr == EXPIRED)) { if((*ResetVector != 0xFFFF) && // Does app reset vector exist? (Status != 'B') && // EEPROM status set? (Boot_ToolPresent != TRUE) && // Tool present? (Checksum_Valid != FALSE)) // Checksum valid? App_LoadImage(); } else Boot_LoadImage();

Design to Implementation Tip #1 Limit Function Complexity Cyclomatic Complexity Kolmogorov complexity Function points

Design to Implementation Tip #2 – Use Assertions

Design to Implementation Tip #3 – Document 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

Design to Implementation Tip #4 – 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

Design to Implementation Tip #5 – 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

Additional Resources Download Course Material for Edraw UML Templates Updated C Doxygen Templates Misc Papers and Websites for further reading From www.beningo.com under - Blog and Articles > Software Techniques > CEC Software Architecture Materials

Jacob Beningo Newsletters P.O. Box 400 Embedded Monthly Linden, Michigan 48451 www.beningo.com Newsletters Embedded Monthly Low Power Design http://eepurl.com/2xJFr Training Bootloaders Embedded Software C/C++ : jacob@beningo.com : 810-844-1522 : Jacob_Beningo : Beningo Engineering : JacobBeningo : Embedded Basics Jacob Beningo Principal Consultant