# Embedded C programming material [closed]

I am looking for some material (books/sites) related to embedded system programming in C language. Here in the lab we have available three plataforms: one Microchip PIC18f4550, one Freescale HC12 and one ARM (Beagleboard).

We are willing to teach embedded C with the PIC, assembler with Freescale and embedded operational systems with Beagleboard. Each class will be a six month course.

Thanks

• Are you looking for general C programming tutorials? Or architecture specifics? – Toby Jaffey Nov 25 '10 at 12:23
• Its not just C programming, the students had alredy a background on C. I'd like some thing more specific to the architecture. – RMAAlmeida Nov 25 '10 at 15:26
• What is that background? A brief course on "This is a for loop" etc., writing simple console apps, or OS/systems programming? – Kevin Vermeer Dec 8 '10 at 15:28
• Why change processors when you change languages? You could program all of the above with all of the above, that might teach students a useful lesson about the pros and cons of each approach for various purposes. – John U Jan 22 '13 at 12:25

For C programming - embedded or otherwise, you need The C Programming Language by Brian Kernighan and Dennis Ritchie, popularly known as K&R.

I have one book on PICs, I like it: The Quintessential PIC® Microcontroller by Sid Katzen.

For the BeagleBoard, some background in embedded Linux will be important. Here's a good book written by a good friend: Building Embedded Linux Systems by Karim Yaghmour, Jon Masters, Gilad Ben-Yossef and Philippe Gerum.

• I read the datasheet back to front to learn the PIC, I think building embedded linux systems sounds interesting. – Kortuk Nov 25 '10 at 16:55
• Which PIC families does that PIC book cover? The PIC18 family is the one I'd try to program in C; not the PIC16 family. – Craig McQueen Dec 8 '10 at 9:19

I wanted to comment on "Practical BeagleBoard" above. This book was posted by Apress by mistake.

In fact, the book does not actually exist yet - I am the author and I haven't finished writing it yet. It should be ready in late spring 2011 (Note: it will not be published by Apress.) I apologize for the confusion. Please feel free to contact me with any questions.

As a further comment, I also highly recommend Chris Hallinan's Embedded Linux Primer, for which the 2nd edition was just released. It is an excellent introduction to embedded Linux, and to embedded systems programming in general.

• @Jeff Osier-Mixon, Thank you for giving us feedback on your book. We are happy to see you come visit our corner of the internet. Try not to use signatures though, every post you make automatically has yours tagged in the bottom corner! – Kortuk Dec 8 '10 at 2:56
• @Jeff Osier-Mixon, When you get more rep you will be able to leave comments, but for now, you should edit your answer and give us more information about why your book is the best guide available! – Kortuk Dec 8 '10 at 2:57
• @Jeff Osier-Mixon Please note than on this site and others on Stack Exchange, there is no up or down . Over time, arrangement of answers will change and there are also user options for sorting answers. If you need to refer to an actual answer, you can copy it's link which is available on the bottom left of the answer area. In my case for example, your answer was above O Engenheiro's with default settings. Yes, we're a bit different that traditional forums. – AndrejaKo Dec 8 '10 at 3:43

An excellent resource for learning Embedded Linux is the following book:

Embedded Linux Primer:A Practical Real-World Approach By Christopher Hallinan

It isn't too expensive for students to buy and starts off with the basics and builds on them thereon. An excellent read with lots to learn, with tons of practical examples you can try out on the development boards you mentioned.

Another source for some excellent everyday encountered Embedded systems dilemmas (to arouse your students curiosity and enthusiasm) can be found under:
Ganssle's Articles

What about FreeRTOS, it's very well supported and documented and furthermore should be portable across all of your development boards.

• Having the same operational system on all boards is a really nice study case! – RMAAlmeida Nov 26 '10 at 15:07

## Books:

• Beagleboard: Practical Beagleboard, but the estimated ship date for this item will be only in April 28, 2011

I have both books about PIC18, and I recommend them.

I have found Programming Embedded Systems: With C to be very good reading.

I am not able to purchase the hardware they reference in the book, but the example code could be ported to whatever target you choose fairly easily.

smileymicros.com carries a line of embedded C books, kits, and tutorials. He uses the Atmel Butterfly kit and Arduino.

I find the articles at netrino.com very insightful.

Also see the Microchip Compiled Tips 'N Tricks Guide.

I suggest that once your students have a decent working knowledge of C and can write, compile, debug and run simple "blinky" type code, you introduce them to a simple task scheduler. RIOS is an excellent choice. It is simple but it already bridges from "doing everything in the loop" to an application which is broken into a number of tasks which time share. This is a great intermediate step between bare-metal and OS's of whatever flavour.