This course is delivered in co-operation with Doulos' training partner Feabhas, who specialise in training courses for real-time embedded developers.
Many engineers work with the C programming language everyday for real-time embedded development. However some hit a plateau and never feel comfortable with certain aspects of the language. This course aims to move people off that plateau and give them a fuller appreciation of the more advanced aspects of the language. Because of the requirements for programming real-time embedded systems, this course goes beyond just addressing the language issues and explores compile, link and run-time issues. In addition it covers interrupts and multi-tasking areas specific to C.
As part of the course, approximately 50% of the time is given over to writing code for a real target.
• To become comfortable with the advanced aspects of the C programming language
• To gain an in-depth knowledge on what is happening at compile, link and runtime on a target processor
• To introduce good quality and style for real-time embedded programming
• To gain hands-on experiences of programming up interrupts and real-time operating systems.
The course is designed for engineers who want to improve their grounding and understanding of the C programming language. It is specifically aimed at issues relevant to real-time embedded software engineers.
Course Outline
Day 1
Introduction
Program Structure
- Importance of good structure
- Quality and style
Pointers, Arrays & Dynamic
Allocation
- Arrays & pointers; compatibility
and incompatibility
Function Pointers
- Basics
- Callbacks
- State machine
Unscrambling Declarations
- Rules
- Using typedef
Day 2
Enumerations, Structures and
Unions
- Enum vs. #define
- Struct layout
- Uses of union
Interrupts
- Hardware interrupt models
- Software interrupts
Multi-Tasking (Multi-Threading)
- Terminology
- Advantages and disadvantages
- Intertask Communication &
synchronisation
Day 3
The Linker
- Memory sections
Start-up, Runtime and the Stack
- What happens before main
- What is happening at runtime
- Estimation of stack requirements
Dynamic Memory
- Malloc, calloc and realloc
- Variable sized structures
- Dangers
Memory Management and Protection
- Memory protection
- MMU
- Segmentation and paging
Day 4
Writing Safer C
- MISRA-C Guidelines
OOP with C
- Object-based and objectoriented
- Classes, inheritance and polymorphism
- Associations and aggregation
Number Crunching
- Floating-point and fixed-point number systems
- IEEE Standard 754
The Standard Library
- Major issues
C99
- Summary of significant new features