Chapter 11. eCos Examples

Henry Hill: You’re a pistol, you’re really funny. You’re really funny.Tommy DeVito: What do you mean I’m funny?Henry Hill: It’s funny, you know. It’s a good story, it’s funny, you’re a funny guy.Tommy DeVito: What do you mean, you mean the way I talk? What?Henry Hill: It’s just, you know. You’re just funny, it’s...funny, the way you tell the story and everything.Tommy DeVito: Funny how? What’s funny about it?

—the movie Goodfellas

In this chapter, we will go through some examples of embedded system code that use the operating system mechanisms we covered in the previous chapter, under the principle that seeing real implementations contributes to a better understanding of the mechanisms. This chapter uses the real-time operating system eCos for the examples. The concepts and techniques in this chapter apply to other RTOSes as well, but different operating systems use different APIs to carry out the techniques. In the next chapter, we will run through the same examples using the popular Linux operating system.

Introduction

We have decided to use two operating systems for the examples of operating system use—eCos and Linux. Why did we choose these two? Both are open source, royalty-free, feature-rich, and growing in popularity. Learning how to program using them will probably enhance your ability to be productive with embedded systems. In addition, both operating systems are compatible with the free GNU software development tools. ...

Get Programming Embedded Systems, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.