C for Embedded

Essential C for Embedded Developers

Course Description:

Learning the ‘C’ Programming language is one thing, but learning to use it effectively and appropriately in a real-time embedded environment is another. For many programmers, these skills are learnt the hard way, through trial and error and the job. This course addresses this issue by not only teaching the ‘C’ programming language, but through emphasizing the pragmatic use of C in a real-time environment. This is achieved through both lecture and direct hands-on-experience

Duration: 20 hours

Course Objective:

  • To provide an understanding of the core essentials of the ‘C’ programming language
  • To give you practical experience of writing C for real-time & embedded systems
  • To demonstrate the traps and pitfalls of the language when used in a real-time system

Delegates will learn:

  • The core C syntax and semantics
  • How to access hardware
  • About memory and performance issues associated with C
  • How Real-Time Operating Systems (RTOS) affect the use of the language

Who should attend:

  • The course is designed for engineers who are embarking on a project using C for the first time under Embedded Environment.
  • Fresh engineers / graduates in E&C, E&E and CE or equivalent.

Course Material:

  • Soft and Online reference

Course Outline

Introduction to Embedded System and language

  • Generic embedded features
  • Language used under Application
  • The Development Environment
  • Application development strategies
  • Wrapper routines and portability
  • Advantages under C
  • Problems under C
  • C basis program structure and tools
  • A simple C program dissection
  • Discuss the image lifecycle
  • Hands on GNU tool chain for C build process

Making the most out of C [Knowing processor and compiler]

  • Using Bit-wise Expressions, Controls, Loops effectively
  • A close look at const and volatile
  • Cast and weakly typed language
  • Arrays and effective usage
  • Function, Structures and Union

C core features in Embedded

  • Endean’s – MSB – LSB
  • Packed Vs Unpacked
  • Bit fields
  • Writing portable codes that are not compiler dependent
  • Unspecified behavior
  • Undefined behavior

Pointers and effective use

  • Memory Crash and corruption

Function pointers and FSM

  • Design of some practical sub system
  • Memory leaks corruption

Hands on to GNU-X tool-chain

  • Using tools to build image
  • Using Makefile for multiple/separately translated programs
  • Creating static library [Embedded Application’s backbone]
  • Image and placement using Idscript

Hands on Configuring the X-Toolchain

  • Installing the software
  • Steps in building the Standalone C code
  • Running C on X86 targets without OS
  • Creating a binary image file and running it stand alone
  • Understanding the X86 hardware support needed for running C