Some people on this list may be aware of my book "Patterns for Time- Triggered Embedded Systems".
Following an agreement with the publisher, this book (and all the code examples) are now available for free download:
The book describes the programming of embedded systems from scratch. The code samples focus on 8051 microcontrollers, but the techniques are (I believe) quite general.
My next book (Rapid Development of Reliable Embedded Systems) is slightly more advanced. It has a focus on ARM7 / Cortex M3 and FPGA- based designs. Draft chapters from this book are now available for free download:
The RDRES book is associated with a free development tool (RapidiTTy Lite) which includes a compiler and debug support. RapidiTTy Lite also includes many of the book examples:
Enjoy!
Michael.