embedded software boot camp

Programming as Profession

January 14th, 2009 by Michael Barr

Doing my daily reading around the embedded systems press, I happened across this gem in an article by Jim Turley:

Programming is often treated as a creative endeavor, undertaken by spirited and talented artistes who cannot or should not be shackled to convention, regulations, or reasonable hygiene. Get over it. Programming is a job like any other, and an employer’s responsibility is to ship a profitable product, not coddle and babysit self-indulgent hackers.

I couldn’t agree with Jim more. It is especially unfortunate when a lack of professionalism shows itself in the realm of embedded systems, such as medical devices, that put human lives at risk. I regret to inform the reader that from Netrino‘s vantage point as consultants we see everyday the train wreck that results from poorly managed and unprofessional programmers working in the embedded systems space.

You need a license from the state to to be a barber. To write embedded software, you simply need to be able to spell ‘C’. But I’m on a mission to change that.

RTOS Myth #4: The RTOS is in Charge

June 6th, 2008 by Michael Barr

The Myth: The operating system is in charge and it decides when to switch from one application task to another.

The Truth: A real-time operating system (RTOS) is a very different beast than a multi-user desktop operating system, such as Linux. In fact, an RTOS is simply a library of functions plus a timer tick interrupt handler.

The only opportunities for an RTOS to effect a context switch from one task to another are:

1. If a running task deletes itself (or exits, if your OS allows that). In this case, a function in the RTOS library detects the lack of a running task and can directly invoke the scheduler function to select the next task to run.

2. When a running task blocks, which can only happen by making a function call into the RTOS library.

3. If a running task creates a new task with a priority higher than it’s own.

4. When a previously blocked task of higher priority is unblocked, which could happen as a result of:

a. The running task made a function call into the RTOS library (e.g., semaphore post).

b. An interrupt service routine executed with that side effect.

These four (or, five, if you prefer) points of entry into the RTOS are the only mechanisms by which control of the CPU can be transferred from one task to another. They are called “scheduling points”.

The implication here is that your application code is actually in charge. If it were to avoid calling into the RTOS library while simultaneously disabling interrupts, the running task could steal control of the CPU for any length of time.

Go back to RTOS Myth #3 or forward to RTOS Myth #5.

Windows Embedded Compact

April 27th, 2008 by Michael Barr

From a recent entry in VDC’s blog:

In an effort to remove any confusion around its embedded offerings, Microsoft has reorganized and rebranded its Windows Embedded product family. Going forward, new editions of Windows XP Embedded will be titled Windows Embedded Standard, Windows Embedded CE will be titled Windows Embedded Compact, and restricted licenses of Windows Vista and Windows XP will be offered through the Windows Embedded Enterprise group. In addition, new products specific to certain device categories, including the next generation of Windows Embedded for Point of Service, will be offered through the Windows Embedded Ready division.

Sure, that’s less confusing!

Real-Time Java is Dead

April 25th, 2008 by Michael Barr

A few months less than ten years ago, I presented a paper at the Embedded Systems Conference (ESC) for the first time. My 1.5 hour course was entitled “Embedded Java” or something similar. This was in Silicon Valley, and the audience was standing room only–despite a rather large room to start with.

I’ve tracked technical and business developments in the world of embedded and real-time Java for even longer–and written a number of articles on the subject. And so I didn’t miss that over the years the audiences for courses on either variant of Java dwindled. After a hopeful year or two too long, I gave up on Java in our space and stopped proposing the topic at ESC.

Then, last Spring, I had the refreshing experience of teaching a two-day hands-on real-time Java programming class in the Netherlands. The room was packed. There was enthusiasm. And these guys were really using Java to develop software (though it wasn’t truly embedded code). So I thought I’d try again at ESC and reproposed the topic.

Last week I taught a course called “Real-Time Java Programming” at the ESC Silicon Valley venue. A lot had changed about the audience size. This time, in a room of a similar size, there were many empty chairs and tables. I think there were perhaps 15 people attending this time.

By my reckoning, Java is officially dead in the embedded systems community–especially in the U.S.

Embedded History Month

April 8th, 2008 by Michael Barr

This seems to be the month for celebrating the history of embedded systems.

Twenty-five year old compiler vendor IAR, which just launched a nicely redesigned website, has published an interesting history of the company and its founder, Anders Rundgren.

And next week I’ll be out at the Embedded Systems Conference, which is celebrating twenty consecutive years of bringing the community together with a backward-facing keynote led by Jack Ganssle.