Different Bit Types in Different Registers

Several years ago I came across a register that, at first glance, seemed to be a typical register with several read/write bits. Upon closer inspection, I saw that one bit behaved differently, depending on its state and whether I was writing a 1 or a 0 to it. Since firmware had to handle that one […]

Read More

Hardware vs. firmware naming conventions

Today’s post is motivated in part by Gary Stringham. Gary is the newest member of EmbeddedGurus and he consults and blogs on what he calls the bridge between hardware and firmware. Since I work on both hardware and firmware, I’m looking forward to what Gary has to say in the coming months. Anyway, I’d recently read his […]

Read More

How to Set the Size of your C Stack

A reader of my monthly Firmware Update newsletter recently sent an e-mail to ask: I am a firmware engineer. I read your recent blog post regarding the C stack, about which I have two questions: First, how can I increment or decrement the size of the stack in my code? Second, what size should I choose? Here’s what […]

Read More

Toyota’s Embedded Software Image Problem

It remains unclear whether Toyota’s higher-than-industry-average number of complaints regarding sudden unintended acceleration (SUA) is caused (in whole or in part) by an embedded software problem. But whether it is or it isn’t actually firmware, the company has clearly denied it and yet still developed an embedded software “image problem”. They’ve brought some of this on themselves. Side Note: […]

Read More

Firmware-Specific Bug #5: Heap Fragmentation

Dynamic memory allocation is not widely used by embedded software developers—and for good reasons. One of those is the problem of fragmentation of the heap. All data structures created via C’s malloc() standard library routine or C++’s new keyword live on the heap. The heap is a specific area in RAM of a pre-determined maximum size. Initially, […]

Read More

Reading a register for its side effects in C and C++

Although today’s post is the first real post on the new EmbeddedGurus, it’s special for another reason. This post is being jointly written with John Regehr. John is an Associate Professor of Computer Science at the University of Utah and maintains an excellent blog, Embedded in Academia which I heartily recommend. This blog posting grew out of […]

Read More

Early Hardware/Firmware Collaboration

A few years ago, I was invited to a high-level design review of a new SoC. The proposed design contained an I/O block that needed features added. I successfully convinced them to replace that block instead with an existing block that had the needed features, had seen silicon, and had a functional driver. Months later […]

Read More

Firmware-Specific Bug #4: Stack Overflow

Every programmer knows that a stack overflow is a Very Bad Thing™. The effect of each stack overflow varies, though. The nature of the damage and the timing of the misbehavior depend entirely on which data or instructions are clobbered and how they are used. Importantly, the length of time between a stack overflow and […]

Read More

Bad Engineering… or Just Good Marketing?

The other day I went to the gas station and encountered a shiny new pump.  It had a liquid crystal display to interact with me and on top of the pump was a medium sized monitor.  My first thought was “wow – nice”, but that first impression didn’t last very long.  I was a little […]

Read More

Welcome to the new stack-overflow!

Regular visitors will no doubt have noticed a rather dramatic change to the visual appearance of this blog. EmbeddedGurus has grown dramatically in the last year and so we’ve moved to a better platform (WordPress) to manage the growth. Although the switch over from Blogger has been relatively painless, it’s still necessary for me to […]

Read More