|
Provided by: The Software Experts Software Design Training for MicrocontrollersAutomotive |
![]() |
Training
Provided by The Software Experts
1. Example of a "Bad Design"
2. Requirements for a Good Design
3. A Sample Architecture
4. Object Orientation
5. Interrupts, Timing and Operating Systems
6. Module design
7. Control and Data Flow
8. Include Structure
9. General Module Structure and Encapsulation
10. Design of Data and Interfaces
11. Design Example - ADTs
|
|
||||||||||||
Software Design Training for Microcontrollers
1. Example of a "Bad Design"
Starting from a real life bad design, a Design "by Chance", I show how this leads to the typical problems of: Loss of Portability, Bad Maintainability, Unclear Interfaces, Possible Cross Influences, Complex Data Flow
2. Requirements for a Good Design
There is a reason for attempting a better design. A good design should have the features as outlined below. I will explain these concepts and show their benefits: Correctness and Safety of an application, Stability, Robustness, Portability, Testability, Maintainability, Reusability
3. A Sample Architecture
To achieve the outlined requirements for a good design the architecture has to be well defined. I will show a sample architecture for medium sized and large microcontroller applications which supports these requirements for a good design. The following architecture components will be explained: Overview and Aims of the Architecture, HW Abstraction Layer, OS Abstraction Layer, Physical Layer, Frame Work, Functional Library, C Library, Benefits and Examples of Libraries
4. Object Orientation
Object Orientation is a good design choice, which I will pick up in the later part about module desing. However OO programming is often confused with the use of certain programming languages such as C or Java which have a build in support of OO programming. However OO programming is much older than these languages and also can be done in simple C. The principles of object orientation are explained in a refreshing way, free of any programming language specific details.
5. Interrupts, Timing and Operating Systems
The microcontroller itself has a vital influence on the architecture of the software. There are different types of microcontrollers and one of them predestines the use of a cooperative operating system. I will explain in detail whichkind of microcontrollers are available on the market, which basic types of operating systems are used, and I will explain their features, advantages and disadvantages in te following main sections: Non-Optimized Architecture of Microcontrollers based on General Purpose CPUs, Optimized Dedicated Microcontroller Architectures, Operating Systems (Behavior of Preemptive vs. a Cooperative OS, Features of a Preemptive Operating System, Features of a Cooperative Operating System, Example of an OS Design for a Safety Critical System)
6. Module design
The Module Design is concerned about the break down of the software into modules, the design of the interfaces between the modules and the related concepts of object orientation. Include structure of header files, templates which support a certain way of design etc. are also part of the subject. I will give an overview on the subject and discuss the issue of interfaces, control flow and data flow in detail. Further I will present two possible solutions including the related templates to perform an object oriented design in C. The contained lecture and examples will enable you to set up a good and robust module design for your software. The following details are part of the lectures:
7. Control and Data Flow
In a software system there is always a control flow and a data flow. Generally speaking the control flow triggers actions in your system by calling C functions. The data flow is a different view on your software. This is the use of certain data (e.g. a variable) throughout the complete system and considering the lifetime of the data. This can be a great soure of problems. I will discuss the various possibilities and interactions and finally present a good solution to deal with the problem: The problems of an unsynchronized data flow, Uni-directional vs. bi-directional data flow, Benefits of a Synchronized Control and Data Flow.
8. Include Structure
Also the include structure of the header files has to be designed well. They are part of the two OO design concepts which are addressed in the course. Some rules about a good header design are expalined and a sample desing may serve as a reference for your own designs.
9. General Module Structure and Encapsulation
Encapsulation is one of the basic concepts of an object oriented design. It should be also applied in normal C programming. There is a method to achieve this. I will explain this method and supply the templates for it. This set of templates can be used for C and via a compiler switch be used as a C class. This part of the course will teach you how to structure you modules, achieve encapsulation of private data and functions and how to design you interfaces: Public, protected and private data, Component interfaces and how they look like, How to design good modules, Encapsulation of functions and interface functionsm, Templates for a common use in C and C
10. Design of Data and Interfaces
Designing your data the right way is also a vital part in the overall software design. Do you use global variables because they are easy to use and believed to save RAM and runtime? There are better alternatives which will be discussed in the course. Scope and validity of data
Principles of data useage Design pattern for static variable initialization Access to the data in a module (object) via get-functions The resource problem with global or static data
11. Design Example - ADTs
There is a second design option to do OO programming in plain C. This method is called "Abstract Data Types" (ADT) and was first published 19080 in the Microsoft Press. It did not loose it's cutting edge since then. The set of templates and design ideas are explained in the course. The same OO principles apply as for the first method so that only the differences are explained in the course.
Starting from a real life bad design, a Design "by Chance", I show how this leads to the typical problems of: Loss of Portability, Bad Maintainability, Unclear Interfaces, Possible Cross Influences, Complex Data Flow
2. Requirements for a Good Design
There is a reason for attempting a better design. A good design should have the features as outlined below. I will explain these concepts and show their benefits: Correctness and Safety of an application, Stability, Robustness, Portability, Testability, Maintainability, Reusability
3. A Sample Architecture
To achieve the outlined requirements for a good design the architecture has to be well defined. I will show a sample architecture for medium sized and large microcontroller applications which supports these requirements for a good design. The following architecture components will be explained: Overview and Aims of the Architecture, HW Abstraction Layer, OS Abstraction Layer, Physical Layer, Frame Work, Functional Library, C Library, Benefits and Examples of Libraries
4. Object Orientation
Object Orientation is a good design choice, which I will pick up in the later part about module desing. However OO programming is often confused with the use of certain programming languages such as C or Java which have a build in support of OO programming. However OO programming is much older than these languages and also can be done in simple C. The principles of object orientation are explained in a refreshing way, free of any programming language specific details.
5. Interrupts, Timing and Operating Systems
The microcontroller itself has a vital influence on the architecture of the software. There are different types of microcontrollers and one of them predestines the use of a cooperative operating system. I will explain in detail whichkind of microcontrollers are available on the market, which basic types of operating systems are used, and I will explain their features, advantages and disadvantages in te following main sections: Non-Optimized Architecture of Microcontrollers based on General Purpose CPUs, Optimized Dedicated Microcontroller Architectures, Operating Systems (Behavior of Preemptive vs. a Cooperative OS, Features of a Preemptive Operating System, Features of a Cooperative Operating System, Example of an OS Design for a Safety Critical System)
6. Module design
The Module Design is concerned about the break down of the software into modules, the design of the interfaces between the modules and the related concepts of object orientation. Include structure of header files, templates which support a certain way of design etc. are also part of the subject. I will give an overview on the subject and discuss the issue of interfaces, control flow and data flow in detail. Further I will present two possible solutions including the related templates to perform an object oriented design in C. The contained lecture and examples will enable you to set up a good and robust module design for your software. The following details are part of the lectures:
7. Control and Data Flow
In a software system there is always a control flow and a data flow. Generally speaking the control flow triggers actions in your system by calling C functions. The data flow is a different view on your software. This is the use of certain data (e.g. a variable) throughout the complete system and considering the lifetime of the data. This can be a great soure of problems. I will discuss the various possibilities and interactions and finally present a good solution to deal with the problem: The problems of an unsynchronized data flow, Uni-directional vs. bi-directional data flow, Benefits of a Synchronized Control and Data Flow.
8. Include Structure
Also the include structure of the header files has to be designed well. They are part of the two OO design concepts which are addressed in the course. Some rules about a good header design are expalined and a sample desing may serve as a reference for your own designs.
9. General Module Structure and Encapsulation
Encapsulation is one of the basic concepts of an object oriented design. It should be also applied in normal C programming. There is a method to achieve this. I will explain this method and supply the templates for it. This set of templates can be used for C and via a compiler switch be used as a C class. This part of the course will teach you how to structure you modules, achieve encapsulation of private data and functions and how to design you interfaces: Public, protected and private data, Component interfaces and how they look like, How to design good modules, Encapsulation of functions and interface functionsm, Templates for a common use in C and C
10. Design of Data and Interfaces
Designing your data the right way is also a vital part in the overall software design. Do you use global variables because they are easy to use and believed to save RAM and runtime? There are better alternatives which will be discussed in the course. Scope and validity of data
Principles of data useage Design pattern for static variable initialization Access to the data in a module (object) via get-functions The resource problem with global or static data
11. Design Example - ADTs
There is a second design option to do OO programming in plain C. This method is called "Abstract Data Types" (ADT) and was first published 19080 in the Microsoft Press. It did not loose it's cutting edge since then. The set of templates and design ideas are explained in the course. The same OO principles apply as for the first method so that only the differences are explained in the course.
About The Training Provider: The Software Experts
The Software Experts - We are a group of professional software developers and university professors. We provide lectures for microcontroller software development. The main courses are: SW Design, Safe Coding in C, SW Testing, Software Inspection. The courses can be held as inhouse trainings. The SW Design Training is available as an online course.

