At TTE Systems, we receive many enquiries from people who want to learn how to program embedded systems. The questions come from professional programmers (particularly those who are considering a career change from “desktop” to “embedded” systems) as well as from students and hobbyists.
In many cases, the people concerned have limited funds available.
In response to these questions, we’ve created this webpage. On this page, we provide an “8-step guide” for people who want to learn how to program embedded systems. Our focus is on ways in which people can learn how to create reliable systems.
Before you can start to program embedded systems, you need to learn how to program. While it is not impossible to begin programming using an embedded board, most people find it much easier to learn how to program on a desktop computer before they start to deal with the complexities of cross-compilation, debugging over a JTAG link, etc.
We therefore recommend that you learn how to program a desktop computer, in C, before you start trying to program an embedded processor.
To explain why we recommend learning C, we make the following observations:
Of course, not all of the issues involved in language selection are purely technical:
Even this short list immediately raises the paradox of programming language selection. From one point of view, only machine code is safe, since every other language involves a translator, and any code you create is only as safe as the code written by the manufacturers of the translator. On the other hand, real code needs to be maintained and re-used in new projects, possibly on different hardware: few people would argue that machine code is easy to understand, debug or to port.
Inevitably, therefore, we need to make compromises; there is no perfect solution. All we can really say is that we require a language that is efficient, high-level, gives low-level access to hardware, and is well defined. In addition - of course - the language must be available for the platforms we wish to use. Against all of these points, C scores well.
We can summarise C’s features as follows:
Overall, C’s strengths for embedded system development greatly outweigh its weakness. It may not be an ideal language for developing embedded systems, but is unlikely that a perfect language will ever be created.
When you are familiar with desktop C, we suggest that you begin to explore embedded systems using a simple processor. For example, the 8051 microcontroller is a popular “starter” processor which is still used in many “real” systems.
If you decide to start with the 8051 microcontroller, “Embedded C” provides a gentle introduction to the programming of embedded systems (using 8051 microcontrollers). Please note that Embedded C is a self-contained “teach yourself” program: the package includes both a compiler and processor simulator (on CD), which means that you can run all of the examples in the book (and learn a great deal about the programming of embedded systems in C) without buying — or building — any hardware.
Please note that two Chinese translations of “EC” are available (one for Taiwan, one for mainland China).
If you can’t afford to buy a textbook at this time, a set of lecture notes are available which provide an introduction to the programming of embedded systems with C are available from the University of Leicester (please scroll to the bottom of the page and follow the links to “lecture handouts”).
When you have learned the basics of “Embedded C”, you are ready to buy (or borrow) an evaluation board with an appropriate chip. At this stage, we recommend that you consider a board with an ARM-based microcontroller or an FPGA.
We suggest that you don’t buy an evaluation board unless it has at least one LED connected to a port pin. Ideally the board should have at least one push-button switch too.
We suggest that you also ensure that the board can be programmed easily and cheaply (ideally by means of a JTAG interface, which will allow you to work with breakpoints, etc, as you start debugging).
As a flexible and cost-effective evaluation platform, we suggest you consider the LPC-P2129 board from Olimex Ltd, along with an Olimex USB-based (JTAG) debugger.
For example, a complete set of this hardware is available from SK Pang Electronics. This starter kit includes an Olimex LPC-P2129 board plus Olimex USB-based (JTAG) debugger hardware and all necessary cables.
In the Netherlands, you can buy Olimex LPC2129 boards and JTAG debuggers from Van Ooijen Technische Informatica.
In the US, you can buy Olimex LPC2129 boards from MicroController Pros Corporation, or from SparkFun Electronics.
Also in the US, you can buy Olimex JTAG debuggers from SparkFun Electronics.
For your first set of development tools, may we suggest that you consider RapidiTTy™ Lite?
RapidiTTy™ Lite is a simple but complete development tool based on the industry-standard Eclipse IDE.
Your next step is to find a simple C program (ideally one which matches your board and compiler precisely) which will flash the LED on your board. You need to compile and link this program and download it to the board.
As you would expect, RapidiTTy™ Lite includes a number of suitable example programs.
You may also wish to refer to the manuals for the NXP LPC2129 processor as you work on this example (but we suggest that you don’t try to read everything at this stage).
When you have the LED flashing, congratulate yourself (you’ve come a long way already).
Now it’s time to experiment. Add some breakpoints. Change the rate at which the LED flashes. Flash a different LED.
Add a switch interface (when you press the switch, the LED flashes, etc).
Having got this far, you’ve dealt with both “input” and “output” operations. Every real embedded system you create will build on these skills.

“Patterns for Time-Triggered Embedded Systems” is a 1000-page book which illustrates how you can create a range of reliable embedded systems.
In total, PTTES contains details of more than 70 useful “design patterns”, complete with guidelines to help you apply these techniques in your own projects: full source code for all of the patterns is also included.
Following an agreement with the original publishers, PTTES will now be distributed by TTE Systems Ltd.
You can now download the complete book from this WWW site.
Complete sets of code examples from the book are also available.
Downloads are free (and no registration is required).

At TTE Systems, we develop and sell:

Our dedicated Training Team develops and delivers a range of training courses, including:

Members of our Custom Design Team have had many years of experience developing reliable systems based on embedded processors, FPGAs or ASICs, in a wide range of sectors (including aerospace, medical, general automotive, electric vehicles, factory automation, condition monitoring and control systems, and high-end consumer goods).
If you require a custom electronic system for use in any of these (or related) market sectors, we can offer a very flexible design service.