Embedded C/C++

Articles relating to C or C++ programming techniques used by embedded software developers.

In Praise of the C Preprocessor's #error Directive

One of the least used but potentially most useful C preprocessor directives is #error. Here's a look at a couple of clever uses for #error that have proven invaluable in embedded software development.

#error is an ANSI-specified feature of the C preprocessor (cpp). Its syntax is very straightforward:

Minimize Interrupt Service Routine Overhead

With all the automation available today, it's easy for programmers to overlook costly overhead introduced into machine code by the compiler. Interrupt handlers are one key area worthy of a closer inspection.

Fast Accurate Memory Test Suite

If ever there was a piece of embedded software ripe for reuse it's the memory test. This article shows how to test for the most common memory problems with a set of three efficient, portable, public-domain memory test functions.

Coding State Machines in C and C++

An overview of state-machine fundamentals and guidelines for coding state machines in C or C++.

Design by Contract (DbC) for Embedded Software

What is the Design by Contract programming philosophy, what can it do for you, and why should all embedded software developers care?

If you were to single out just one most effective programming technique for delivering high-quality code, what would you choose? Object-oriented programming? Generic programming? Design patterns? Software components? Frameworks? UML? CASE tools?

More Bug-Killing Coding Standards for Embedded C

This next installment of enforceable coding standards for embedded systems offers bug-killing rules for using certain C keywords and naming global variables.

Bug-Killing Coding Standard Rules for Embedded C

A C coding standard can help keep bugs out of embedded software by leveraging common language features and development tools.

Introduction to Hierarchical State Machines (HSMs)

The formalism of Hierarchical State Machines (aka statecharts) makes the state machine approach truly applicable to real-life embedded systems.

State Machines for Event-Driven Systems

State machines are perhaps the most effective method for developing robust event-driven code for embedded systems.

Polymorphism without Heap Memory

Rethinking basic programming techniques can avoid many of the problems that heap-based memory management poses for embedded real-time system designs.

Pages

Subscribe to RSS - Embedded C/C++