Sie sind auf Seite 1von 5

Embedded C Programming, Linux,

and Vxworks.
Synopsis

This course is extensive and contains many advanced concepts. The range of modules covers a full
introduction to C, real-time and embedded systems concepts through to the design and
implementation of real time embedded or standalone systems based on real-time operating
systems and their device drivers. Vxworks is used as an example of such system. The modules
include an introduction to the development of Linux device drivers.

Predominantly intended to be taught to development teams at customer sites it is not expected that
any one course would cover the full range of modules in a typical two month period. For teams
without experience of C and high-end real time operating systems it would typically require three
months of intensive training to give full coverage to the topics included here. The course covers all
of the important features of the C language as well as a good grounding in the principles and
practices of real-time systems development including the IPC specification.

The design of the modules is intended to provide an excellent working knowledge of the
embedded C language and its application to serious real time systems. Those wanting in-depth
training other system applications and kernel internals should contact us to discuss their
requirements; this set of modules is geared more towards providing the groundwork for
approaching those domains.

The course contains essential information for anyone developing embedded systems such as
microcontrollers, real-time control systems, mobile device, PDAs and similar applications. This
embedded C course is based on many years experience of teaching C, extensive industrial
programming experience and also participation in the ANSI X3J11 and BSI standards bodies that
produced the standard for C. We focus on the needs of day-to-day users of the language with the
emphasis being on practical use and delivery of reliable software.

Suitable for

Programmers and engineers who already have some understanding of programming and who now
wish to gain a solid understanding of the use of C for embedded and real-time systems software
development.

Prerequisites

• A degree ( B.E., B.Tech, MCA, M.Tech ) in Electronics/Electrical, Computer Science or


Information Technology.
• Programming experience
• Working capability on any one operating systems (Windows,Linux).

Delivery

This is instructor led C training. Each section of the material covered by the tutor is followed by
hands-on practical exercises for which worked examples of the solutions are typically provided.

Miracle Corporate Solutions Pvt. Ltd


Our embedded C courses now have a monthly public schedule for Pennsylvania (USA) and Noida
(India). Please see www.miracleindia.com for details.

For details of the in-house and bespoke C courses that we can provide, please email

info@miracleindia.com

Contents
An Introduction to C Real-Time - C Techniques for Dealing with
• Overview Time
• The C Programming Language • What is Real-Time?
• The C Standards • Characteristics of Real-Time Applications
• The Importance of Standards • Synchronising I/O with CPU Via Polling
• A Simple C Program • Synchronising I/O with CPU Via
• Comments Interrupts
• Preprocessor Directives • Interrupts in Real Time O/S
• Functions • Generating Delays Via Software
• main • C Delay Loops
• stdio • Generating Delays Via Hardware
• Libraries • Generating Delays in RTOS
• printf • Introducing Multi-Tasking
• Strings • Real-Time Operating Systems
• Return Values • RTOS Overview
• Statements • Scheduling Algorithms
• Review Tasks, Threads,
Introduction to Embedded C Programming • Basics
• Overview • Why Tasks?
• Embedded C and Standard C • Multitasking Example
• Simple Embedded C Program • Processes and Threads Analogy
• Practical — Compiling the Program • Synchronisation, Scheduling and Races
• Differences Between the Standard and • Thread Basics
Embedded Versions • Creating Threads Example
• Benefits of Using C for Embedded • Example of Multiple Threads
Systems • Shared Data Problems
• C in the Embedded Environment • Race Conditions
• C in the Real Time Linux Environment • Dealing with Critical Sections
• Learning Standard C • Example of Unprotected Critical Section
Variable Types and Constants • Protecting Critical Sections
• Overview • Drawbacks to Mutexes
• Variables • Using Condition Variables
• Basic Variable Types • Operations on Condition Variables
• Other Variable Types • Semaphores
• Sizes of Data Types • Spinlocks
• Declaring Variables • Debugging Multithreaded Programs
• Declaring Multiple Variables • Thread-Safe Functions
• Variable Names • Deadlocks
• Initialising Variables at Declaration • Priority Inversion
• Character Constants Self-Referential and Dynamic Data Structures
• Named Constants • Objectives
• Boolean Type — Truth Values • Common Data Structures
• Casting — Type Conversion • Circular Buffers
• Decimal, Octal, and Hexadecimal • Race Conditions
Notations • Singly Linked List
Operators • Data Allocation
• Overview • Using malloc and free
• Operators • Heap allocation example
• Expressions
Miracle Corporate Solutions Pvt. Ltd
• Assignment Operator • Details of malloc and free
• Chaining Assignments • Doubly Linked Lists
• Arithmetic Operators Developing on Real Time Operating Systems
• Arithmetic Operators: Division and • Real Time O/S Environment
Remainder • Typical RTOS Features
• Example of Remainder • Core RTOS Facilities
• Increment and Decrement Operators • VxWorks
• Postfix Increment and Decrement • Architecture of Vxworks Application
• Relational Operators • Vxworks Module Example
• Logical Negation • Compiling and Running Modules
• Logical Operators • Tiers of Services
• Short-Circuiting • Creating a Vxworks Thread
• Compound Assignment Operators • Simple Parallel Port Manipulation
Flow Control • Requesting IO Ports
• Overview • Measuring Time
• The if Statement • Elapsed Time in Vxworks
• Assignment and Equality Inter-process Communication in Real Time
• Nested if Statements Operating Systems
• Multi-Way if Statements • Basics of IPC
• The for Loop • FIFOs
• for Loop Syntax • Shared Memory in Vxworks
• The while Loop • Allocating Shared Memory
• The do-while Loop • User-Level Shared Memory
• Infinite Loops • Shared Memory Thread
• break Statement • Shared Memory Module
• continue Statement • IPC Practical
• Conditional Operator • Servo Control Example
• switch Statement • Servo Controlled Via IPC
• switch Caveats • Software Interrupts
• Shortened Statements • Software Interrupt API
• if Statement Trap • Real (Hard) Interrupts
• goto Statement • Hard Interrupt Example
Functions Vxworks Device Drivers
• Overview • Vxworks Device Drivers
• The Rôle of Functions • Driver Types
• Function Libraries • Device Number
• Functions — Syntax • Driver Initialization
• Return Values • Module Load/Unload
• Function Arguments • Providing Module Parameters
• Local Variables • Open and Release Functions
• Scope and Lifetime • Read and Write
• Functions Calling Functions • Write
• Call-by-Value • Reading from Device
• Definition and Declaration • Read Code
• Definition After Use • Tasklet and Bottom Half Code
• Prototypes and Old-Style Declarations • Interrupt and Tasklet Code
Arrays Further Pointers
• Overview • Pointers to Pointers
• Array Basics • Using Pointers to Pointers to Structures
• Array Example • Pointers to Constant Values
• Looping Over an Array • Constant Pointers
• Array Sizes • Increment Operators and Pointers
• Copying Arrays • Pointers to Functions
• Initializing Arrays • Initialising Function Pointer Values
• Strings • Calling Functions Through Pointers
• Array Caveats • Call-Back Functions
Evaluating Expressions • Arrays of Pointers to Functions
• Truth Values • Function Pointers for State Machines
• Precedence • State Machine Example: a Toaster
Miracle Corporate Solutions Pvt. Ltd
• Associativity Building Software with Make
• Operand Evaluation • Introduction
• Casting - Type Conversion • Different Versions of Make
• Operator Precedence Table • A Simple Project
• Operator Precedence Table Continued • Software Building Concepts
Bit Manipulation • Targets and Prerequisites in Make
• Objectives • Building an Object File with Make
• Introduction • Pattern Rule Variables
• Bit Twiddling Operators • Building an Executable with Make
• Bit Shifting • Rebuilding When Prerequisites Change
• Portable Bit Manipulation • Default Rules
• Print Bit Representations • Substitution References
• Example — Bit Manipulation • Implicit Rules
• Summary • Configuring Implicit Rules
Pointers • Adding More Rules
• Overview • Advanced Features
• What is a Pointer? Advanced Use of the Preprocessor
• Creating a Pointer • Parametric Macros
• Pointer Types • Problems with Macros
• Uninitialised Pointers • Macros and Scope
• Null Pointers • Macros and Precedence
• Pointers as Function Arguments • Testing Assertions
• Pointers and Arrays • Stringification
• Pointer Arithmetic • Assertions with Side Effects
• Using sizeof • Token Pasting
• Array/Pointer Equivalence • When to Use Parametric Macros
• Passing Arrays to Functions Efficient C Programming
• Pointers to Constant Data • Basics
• Passing Pointers-to-Const • Principal Causes of Inefficiency
• Converting Pointers-to-Const • Architecture Issues
Other Data Types: Structures, Unions, and • Efficient Algorithms
Enums • Coding Tactics and Compilers
• Overview • Difficulties with Code Optimisation
• Defining Structures • Common Tricks - Subexpressions
• Using Structures • Using register Variables
• Initialising Structure Variables • Loop Unrolling
• Problems with Initialising Structures • Space-Time Tradeoffs
• Initialising Arrays of Structures • Floating-Point Arithmetic
• Pointers to Structures • Compiler Optimisation
• Passing Structures to Functions • Avoid Pass-by-Value of Large Objects
• Passing Structure Pointers Understanding Embedded Systems
• Structures as Data Types • Introduction to Embedded Systems
• Enumerations • What is Unique about the design goals for
• Unions Embedded Software?
• Discriminating a Union • Developing an Embedded Application
The Preprocessor and Multiple-File Programs • Microprocessor versus Micro controller.
• Overview Processor Architecture and Memory
• Standard Headers Organization
• The Preprocessor • Processors and Memory Organization.
• The #define Directive • Von Neumann and Harvard Architecture.
• Large Programs • RISC vs. CISC
• Deciding How to Split a Program • Processor Selection of an Embedded
• Sharing Declarations System.
• Using Header Files • ARM Architecture.
• Writing a Header File Linux Internals
• Conditional Compilation • Device Driver and Interrupt Service
• Module-Private Functions Mechanism.
• Module-Private Variables • Linux Internals Kernel Programming
• Function-Private Variables • Inter Process Communication

Miracle Corporate Solutions Pvt. Ltd


• Public Module Variables
• When to Use Global Variables
String Handling
• Passing Strings to Functions
• String Handling
• Standard String Functions
• Character Classes
• Available Character Classes
• Letter Case
• Converting a String to a Number
• Converting a Number to a String

• String Input

NOTE: The trainee has to sign the Non disclosure Agreement(NDA) before joining any industrial
project.
Features:

• The study material and references will be provided to the trainees by Miracle Embedded
Systems.
• This reference material is developed by our corporate trainers and software engineers from top
notch industries.
• There will regular attendance of the student. One has to show at least 75% attendance then
only he will be eligible for certification.
• The grades will be assigned on the basis of regular test results.
• There will be recognitions and rewards for well performing candidates.

Duration 3.0 Months

NOTE:- All training will be given by Corporate Trainers only .


All trainer from IIT (M.Tech.) background having four to seven years experience in respected field
,working with CMM Level 5 companies

Corporate Client: -L&T InfoTech , Motorola, Samsung Electronic, ST Microelectronic and many
more

The major aims of the Program are to:

1. Provide a strong foundation in the emerging disciplines of RTOS, Embedded Systems and its
applications for professionals in the software development industry.

2. Will improve the required skill set of the system software professional.

3. Program will provide perspective in RTOS, Embedding Systems and its applications in up
coming field like Telecom, Wireless communications, Network Management, Automation and
Process Controls.

4. Incorporates the required skills and experience on Embedded Systems and RTOS in the
professionals for the exponentially growing industrials demands on this line.

Miracle Corporate Solutions Pvt. Ltd