UML Statechart tip: Handling errors when entering a state
This is my second post with advice and tips on designing software with UML statecharts. My first entry is here.
It has been nearly 20 years since I first studied UML statecharts. Since that initial exposure (thank you Samek!), I have applied event driven active object statechart designs to numerous projects [3]. Nothing has abated my preference for this pattern in my firmware and embedded software projects. Through the years I have taken note of a handful of common challenges when...
The Hardest Bug I Never Solved
I agreed to four hours.
Four hours to help hunt down and kill a bug. A terrible malicious bug that was eating away at this project, wreaking havoc upon the foundations of a critical feature, and draining time randomly from every one of eight firmware engineers on this project. Quite honestly, I can’t remember the last time it took more than an hour or two for me to locate, isolate, and fix a firmware bug. Surely I could help find and solve this issue within four...
Tenderfoot: How to Write a Great Bug Report
I am an odd sort of person. Why? Because I love a well written and descriptive bug report. I love a case that includes clear and easy to follow reproduction steps. I love a written bug report that includes all the necessary information on versions, configurations, connections and other system details. Why? Because I believe in efficiency. I believe that as an engineer I have a duty to generate value to my employer or customer. Great bug reports are one part of our collective never-ending...
Tenderfoot: Embedded Software and Firmware Specialties
Once upon a time (seven years ago) I answered a question on Stack Overflow. Then Stephane suggested I turn that answer into a blog post. Great idea! This post dives deeper into the original question: “Is it possible to fragment this field (embedded software and firmware) into sub-fields?”
This post represents a detailed and updated response to my original Stack Overflow answer. I hope this post provides guidance and useful information to the “tenderfoots” in the...
Tenderfoot: Recommended Reading
Twenty years ago I read Code Complete by Steve McConnell. And then read it again. And again. And again. Of all the books I have read during my career, I believe this was the book that catapulted me from a young electrical engineer to a young and aspiring embedded software engineer. So to all the ‘tenderfoots’ embarking upon an embedded systems and especially embedded software and firmware career, this entry is for you.
First, I would certainly recommend that all engineers read and read...
Tenderfoot: Introduction to Magic (Numbers that is...)
Once upon a time, while participating in a source code review, I stumbled across the following C code in a header file:
struct Foo { //various structure fields char string_buffer[45+3]; //buffer requires about 45 bytes };My right eyebrow raised, I took a note, and continued with the code review, only to later stumble into this line of code in the body of a C function:
char * temp_string_buffer = (char*) malloc(45+3);Again, I took a note on this function, and continued...
Favorite Tools: C++11 std::array
Many embedded software and firmware projects must be developed to high standards of reliability. To meet these reliability requirements, firmware project teams will consider many design tradeoffs. For example, an engineering team may avoid or outright ban the use of dynamic memory allocation, a feature typically accessed via the C library call "malloc" or the C++ allocator "new". When authoring software under such...
Favorite Tools: C++11 User-defined literals
In many software domains units of measurement are frequently critical to the software's data processing requirements. Those same units, or rather the use of the wrong units, are often the source of bugs and disastrous mistakes. Although useful for other purposes, user-defined literals are an excellent addition to the C++11 standard and handy when working with units of measurement.
Suppose a device measures velocity. To help prevent errors, the software specification requires...
Surprising Linux Real Time Scheduler Behavior
I have recently been helping with embedded software design and development for a data acquisition and visualization device. The software executes within an embedded Linux context and consists of various animated user interfaces rendering the acquired data.
The data is received via a UART and a SPI connection. During project development we noticed poor UART data latency issues during heavy user interface animations. For this product to properly meet its acquisition requirements, the UART...
Favorite Tools - Look Up Tables
As we grow in our engineering careers, we must continually add new tools to our collective tool kits. One favorite tool in my toolkit will be obvious to many experienced embedded software engineers. I still remember learning this approach early in my career via code written by colleague David Starling. The tool in question:
Look up tablesLook up tables simplify code and improve firmware maintenance. What is a look up table? A look up table is often nothing more complex than a...
UML Statechart tip: Handling errors when entering a state
This is my second post with advice and tips on designing software with UML statecharts. My first entry is here.
It has been nearly 20 years since I first studied UML statecharts. Since that initial exposure (thank you Samek!), I have applied event driven active object statechart designs to numerous projects [3]. Nothing has abated my preference for this pattern in my firmware and embedded software projects. Through the years I have taken note of a handful of common challenges when...
Tenderfoot: Recommended Reading
Twenty years ago I read Code Complete by Steve McConnell. And then read it again. And again. And again. Of all the books I have read during my career, I believe this was the book that catapulted me from a young electrical engineer to a young and aspiring embedded software engineer. So to all the ‘tenderfoots’ embarking upon an embedded systems and especially embedded software and firmware career, this entry is for you.
First, I would certainly recommend that all engineers read and read...
Favorite Tools - Look Up Tables
As we grow in our engineering careers, we must continually add new tools to our collective tool kits. One favorite tool in my toolkit will be obvious to many experienced embedded software engineers. I still remember learning this approach early in my career via code written by colleague David Starling. The tool in question:
Look up tablesLook up tables simplify code and improve firmware maintenance. What is a look up table? A look up table is often nothing more complex than a...
Favorite Tools: C++11 User-defined literals
In many software domains units of measurement are frequently critical to the software's data processing requirements. Those same units, or rather the use of the wrong units, are often the source of bugs and disastrous mistakes. Although useful for other purposes, user-defined literals are an excellent addition to the C++11 standard and handy when working with units of measurement.
Suppose a device measures velocity. To help prevent errors, the software specification requires...
Tenderfoot: Introduction to Magic (Numbers that is...)
Once upon a time, while participating in a source code review, I stumbled across the following C code in a header file:
struct Foo { //various structure fields char string_buffer[45+3]; //buffer requires about 45 bytes };My right eyebrow raised, I took a note, and continued with the code review, only to later stumble into this line of code in the body of a C function:
char * temp_string_buffer = (char*) malloc(45+3);Again, I took a note on this function, and continued...
Tenderfoot: How to Write a Great Bug Report
I am an odd sort of person. Why? Because I love a well written and descriptive bug report. I love a case that includes clear and easy to follow reproduction steps. I love a written bug report that includes all the necessary information on versions, configurations, connections and other system details. Why? Because I believe in efficiency. I believe that as an engineer I have a duty to generate value to my employer or customer. Great bug reports are one part of our collective never-ending...
Favorite Tools: C++11 std::array
Many embedded software and firmware projects must be developed to high standards of reliability. To meet these reliability requirements, firmware project teams will consider many design tradeoffs. For example, an engineering team may avoid or outright ban the use of dynamic memory allocation, a feature typically accessed via the C library call "malloc" or the C++ allocator "new". When authoring software under such...
The Hardest Bug I Never Solved
I agreed to four hours.
Four hours to help hunt down and kill a bug. A terrible malicious bug that was eating away at this project, wreaking havoc upon the foundations of a critical feature, and draining time randomly from every one of eight firmware engineers on this project. Quite honestly, I can’t remember the last time it took more than an hour or two for me to locate, isolate, and fix a firmware bug. Surely I could help find and solve this issue within four...
Tenderfoot: Embedded Software and Firmware Specialties
Once upon a time (seven years ago) I answered a question on Stack Overflow. Then Stephane suggested I turn that answer into a blog post. Great idea! This post dives deeper into the original question: “Is it possible to fragment this field (embedded software and firmware) into sub-fields?”
This post represents a detailed and updated response to my original Stack Overflow answer. I hope this post provides guidance and useful information to the “tenderfoots” in the...
Surprising Linux Real Time Scheduler Behavior
I have recently been helping with embedded software design and development for a data acquisition and visualization device. The software executes within an embedded Linux context and consists of various animated user interfaces rendering the acquired data.
The data is received via a UART and a SPI connection. During project development we noticed poor UART data latency issues during heavy user interface animations. For this product to properly meet its acquisition requirements, the UART...
Favorite Tools: C++11 std::array
Many embedded software and firmware projects must be developed to high standards of reliability. To meet these reliability requirements, firmware project teams will consider many design tradeoffs. For example, an engineering team may avoid or outright ban the use of dynamic memory allocation, a feature typically accessed via the C library call "malloc" or the C++ allocator "new". When authoring software under such...
Favorite Tools - Look Up Tables
As we grow in our engineering careers, we must continually add new tools to our collective tool kits. One favorite tool in my toolkit will be obvious to many experienced embedded software engineers. I still remember learning this approach early in my career via code written by colleague David Starling. The tool in question:
Look up tablesLook up tables simplify code and improve firmware maintenance. What is a look up table? A look up table is often nothing more complex than a...
Tenderfoot: Embedded Software and Firmware Specialties
Once upon a time (seven years ago) I answered a question on Stack Overflow. Then Stephane suggested I turn that answer into a blog post. Great idea! This post dives deeper into the original question: “Is it possible to fragment this field (embedded software and firmware) into sub-fields?”
This post represents a detailed and updated response to my original Stack Overflow answer. I hope this post provides guidance and useful information to the “tenderfoots” in the...
UML Statechart tip: Handling errors when entering a state
This is my second post with advice and tips on designing software with UML statecharts. My first entry is here.
It has been nearly 20 years since I first studied UML statecharts. Since that initial exposure (thank you Samek!), I have applied event driven active object statechart designs to numerous projects [3]. Nothing has abated my preference for this pattern in my firmware and embedded software projects. Through the years I have taken note of a handful of common challenges when...
Tenderfoot: Recommended Reading
Twenty years ago I read Code Complete by Steve McConnell. And then read it again. And again. And again. Of all the books I have read during my career, I believe this was the book that catapulted me from a young electrical engineer to a young and aspiring embedded software engineer. So to all the ‘tenderfoots’ embarking upon an embedded systems and especially embedded software and firmware career, this entry is for you.
First, I would certainly recommend that all engineers read and read...
Surprising Linux Real Time Scheduler Behavior
I have recently been helping with embedded software design and development for a data acquisition and visualization device. The software executes within an embedded Linux context and consists of various animated user interfaces rendering the acquired data.
The data is received via a UART and a SPI connection. During project development we noticed poor UART data latency issues during heavy user interface animations. For this product to properly meet its acquisition requirements, the UART...
The Hardest Bug I Never Solved
I agreed to four hours.
Four hours to help hunt down and kill a bug. A terrible malicious bug that was eating away at this project, wreaking havoc upon the foundations of a critical feature, and draining time randomly from every one of eight firmware engineers on this project. Quite honestly, I can’t remember the last time it took more than an hour or two for me to locate, isolate, and fix a firmware bug. Surely I could help find and solve this issue within four...
Tenderfoot: How to Write a Great Bug Report
I am an odd sort of person. Why? Because I love a well written and descriptive bug report. I love a case that includes clear and easy to follow reproduction steps. I love a written bug report that includes all the necessary information on versions, configurations, connections and other system details. Why? Because I believe in efficiency. I believe that as an engineer I have a duty to generate value to my employer or customer. Great bug reports are one part of our collective never-ending...
Tenderfoot: Introduction to Magic (Numbers that is...)
Once upon a time, while participating in a source code review, I stumbled across the following C code in a header file:
struct Foo { //various structure fields char string_buffer[45+3]; //buffer requires about 45 bytes };My right eyebrow raised, I took a note, and continued with the code review, only to later stumble into this line of code in the body of a C function:
char * temp_string_buffer = (char*) malloc(45+3);Again, I took a note on this function, and continued...
Favorite Tools: C++11 User-defined literals
In many software domains units of measurement are frequently critical to the software's data processing requirements. Those same units, or rather the use of the wrong units, are often the source of bugs and disastrous mistakes. Although useful for other purposes, user-defined literals are an excellent addition to the C++11 standard and handy when working with units of measurement.
Suppose a device measures velocity. To help prevent errors, the software specification requires...