embedded and real time systems training and consultancy

Advanced Embedded Linux C and Posix Programming

Duration: 5 Days

Course Background

The C programming language is over 40 years old. It is a testament to the genius of the gifted researchers at Bell Labs who developed it that it is still very widely used. C programming is a mainstay of embedded systems programming. In an age where traditional analog systems have. laregely, been replaced by digital systems capable of capturing and processing analog inputs digitally and controlling analog outputs digitally knowing how to program in C is an essential skill. The genius of C is that it is both a high level programming language, and yet, one that is very close to assembler. The aim of an advanced C programming course is to provide an overview of more advanced C programming techniques. These include coverage of dynamic data structures and algorithms such as linked lists and binary trees, the implementation and use of circular buffers and simple memory management systems as well as the use of state machine based approaches to areas such as protocol implementation and multi-tasking.

Course Prerequisites and Target Audience

A sound basic knowledge of C, preferably in the context of embedded systems application development is assumed, to the level covered e.g. in the Introduction to Embedded Linux C programming course.

Course Overview

The course emphasises the implementation of disciplined and well structured code and the design of modules with clean interfaces. Topics include:

Lab exercises are used to consolidate key concepts.

The course uses PC workstation and Embedded Linux systems as a platform for hands-on work. The course also covers basic multi-tasking techniques using state machine driven scheduling approaches and simple timer interrupt driven deterministic scheduling techniques. The course uses the Eclipse IDE and the GNU C compiler.

Course Benefits

Students successfully completing this course will have a sound understanding of C and Posix API programming. You will understand the basic C data types, arrays and pointers. You will have a good appreciation of data structures and their uses, and the use of pointers to data structures and arrays of data structures. You'll learn how to use arrays to implement circular buffers and how to use them, and how to use arrays to implement stacks, and the uses of software stacks.
You will also be introduced to basic techniques of memory management and programming with dynamic data structures - and to circular buffers and stacks and linked lists. You'll also learn techniques multi-tasking and multi-thread programming and inter-task / inter-thread communication patterns.

Students completing this course will considerably improve the discipline and rigour with which they design and write embedded systems applications in C.

You'll be able to implement classical data structures such as circular buffers, linked lists, and trees -- and you'll know when it's appropriate to use them.

You'll be exposed to a variety of advanced programming idioms and algorithms with their associated data structures, for tasks such as indexing, data compression and error detection.

You'll learn to write event driven programs, to implement Finite State Machines, and to design hierarchical state machines using statecharts.

You'll learn structured programming techniques for implementing multi-tasking applications.

Course Outline