UML Statechart tip: Handling errors when entering a state
Handling synchronous failures during state entry is trickier than the UML spec implies, because UML forbids transitions inside entry actions. This post compares three practical firmware patterns: explicit guarded transitions, self-posting a failure event to a LIFO queue, and converting the operation into an asynchronous service. It lays out benefits, downsides, and when each approach is appropriate for small teams, mid-sized projects, or larger firmware efforts.
The Hardest Bug I Never Solved
A single overlooked sentence in the STM32 datasheet turned intermittent startup resets into a major time-leach. Senior engineers chased DMA buffers and overflows for hours until Unni discovered the ISR vector table had been relocated to RAM with only 256 byte alignment while the MCU required 512 bytes. The misalignment caused interrupts to jump to the reset handler, and fixing the alignment stopped the reboot loop for good.
Tenderfoot: How to Write a Great Bug Report
A well-written bug report can save hours of debugging and prevent last-minute scrambles before demos. This post uses a contrived embedded RF product example to show what good and bad reports look like, the essential fields to include, and how clear reproduction steps helped find a simple bitmask bug before a trade show. Finish with a short template you can adapt to your team.
Tenderfoot: Embedded Software and Firmware Specialties
This post revisits an earlier Stack Overflow answer and breaks embedded firmware into practical specialties, from assembly optimization and device drivers to DSP, IoT networking, security, UI, and systems architecture. It outlines the core skills, tools, and math each specialty demands, and explains how product constraints and industries shape those roles. Newcomers get clear guidance on where to focus their learning and career development.
Tenderfoot: Recommended Reading
Twenty years on, these are the books that turned an electrical engineer into an embedded software pro. Matthew Eshleman walks through influential reads from Code Complete to Practical Statecharts and Test Driven Development, explaining how each shaped his design, estimation, and testing practices. This short list is a practical starting point for 'tenderfoots' launching an embedded firmware career.
Tenderfoot: Introduction to Magic (Numbers that is...)
A source-code review revealed repeated numeric literals in C, exposing the classic problem of magic numbers in embedded software. This post explains what magic numbers are, why they are especially painful in firmware, and simple fixes using named constants and comments tied to specs. Read this if you want clearer, safer embedded C code and fewer surprises during maintenance.
Favorite Tools: C++11 std::array
Firmware teams that avoid malloc or new need safer alternatives, and this post makes a strong case for C++11 std::array as that alternative. It highlights zero-overhead, type-safe, compile-time buffers and points to an ESP32 LED-strip demo where NUM_PIXELS_ fixes RAM usage at build time. Read it to see std::array used with std::rotate, passed to C libraries via data(), and as a low-risk path to std::vector later.
Favorite Tools: C++11 User-defined literals
Units are a frequent source of bugs in embedded software, and keeping code aligned with product specs helps prevent mistakes. This post shows how C++11 user-defined literals let you write expressive, type-safe unit values like 80_MPH and convert them to meters per second using constexpr operator"" overloads. The conversion happens at compile time, improving readability and reducing reliance on macros or magic numbers.
Surprising Linux Real Time Scheduler Behavior
An embedded Linux data acquisition project ran into puzzling UART latency whenever heavy UI animations ran. Moving all app threads to SCHED_FIFO helped but did not eliminate delays. After reading about kernel worker thread interactions, Matthew moved the UI back to the normal scheduler and the jitter vanished. The post highlights an unexpected kernel level priority inversion risk and a pragmatic workaround.
Favorite Tools - Look Up Tables
Look up tables are one of the simplest but most effective tools in an embedded engineer's toolbox, and this post shows why. Using a keypad example the author demonstrates a static table of key behaviors that packs repeat rates, enum mappings, and debug names into one place so changing behavior or adding keys is trivial. The article also outlines other uses like state machines and UI internationalization.
UML Statechart tip: Handling errors when entering a state
Handling synchronous failures during state entry is trickier than the UML spec implies, because UML forbids transitions inside entry actions. This post compares three practical firmware patterns: explicit guarded transitions, self-posting a failure event to a LIFO queue, and converting the operation into an asynchronous service. It lays out benefits, downsides, and when each approach is appropriate for small teams, mid-sized projects, or larger firmware efforts.
Tenderfoot: Recommended Reading
Twenty years on, these are the books that turned an electrical engineer into an embedded software pro. Matthew Eshleman walks through influential reads from Code Complete to Practical Statecharts and Test Driven Development, explaining how each shaped his design, estimation, and testing practices. This short list is a practical starting point for 'tenderfoots' launching an embedded firmware career.
Favorite Tools - Look Up Tables
Look up tables are one of the simplest but most effective tools in an embedded engineer's toolbox, and this post shows why. Using a keypad example the author demonstrates a static table of key behaviors that packs repeat rates, enum mappings, and debug names into one place so changing behavior or adding keys is trivial. The article also outlines other uses like state machines and UI internationalization.
Surprising Linux Real Time Scheduler Behavior
An embedded Linux data acquisition project ran into puzzling UART latency whenever heavy UI animations ran. Moving all app threads to SCHED_FIFO helped but did not eliminate delays. After reading about kernel worker thread interactions, Matthew moved the UI back to the normal scheduler and the jitter vanished. The post highlights an unexpected kernel level priority inversion risk and a pragmatic workaround.
The Hardest Bug I Never Solved
A single overlooked sentence in the STM32 datasheet turned intermittent startup resets into a major time-leach. Senior engineers chased DMA buffers and overflows for hours until Unni discovered the ISR vector table had been relocated to RAM with only 256 byte alignment while the MCU required 512 bytes. The misalignment caused interrupts to jump to the reset handler, and fixing the alignment stopped the reboot loop for good.
Tenderfoot: Embedded Software and Firmware Specialties
This post revisits an earlier Stack Overflow answer and breaks embedded firmware into practical specialties, from assembly optimization and device drivers to DSP, IoT networking, security, UI, and systems architecture. It outlines the core skills, tools, and math each specialty demands, and explains how product constraints and industries shape those roles. Newcomers get clear guidance on where to focus their learning and career development.
Favorite Tools: C++11 std::array
Firmware teams that avoid malloc or new need safer alternatives, and this post makes a strong case for C++11 std::array as that alternative. It highlights zero-overhead, type-safe, compile-time buffers and points to an ESP32 LED-strip demo where NUM_PIXELS_ fixes RAM usage at build time. Read it to see std::array used with std::rotate, passed to C libraries via data(), and as a low-risk path to std::vector later.
Tenderfoot: How to Write a Great Bug Report
A well-written bug report can save hours of debugging and prevent last-minute scrambles before demos. This post uses a contrived embedded RF product example to show what good and bad reports look like, the essential fields to include, and how clear reproduction steps helped find a simple bitmask bug before a trade show. Finish with a short template you can adapt to your team.
Tenderfoot: Introduction to Magic (Numbers that is...)
A source-code review revealed repeated numeric literals in C, exposing the classic problem of magic numbers in embedded software. This post explains what magic numbers are, why they are especially painful in firmware, and simple fixes using named constants and comments tied to specs. Read this if you want clearer, safer embedded C code and fewer surprises during maintenance.
Favorite Tools: C++11 User-defined literals
Units are a frequent source of bugs in embedded software, and keeping code aligned with product specs helps prevent mistakes. This post shows how C++11 user-defined literals let you write expressive, type-safe unit values like 80_MPH and convert them to meters per second using constexpr operator"" overloads. The conversion happens at compile time, improving readability and reducing reliance on macros or magic numbers.
Favorite Tools: C++11 std::array
Firmware teams that avoid malloc or new need safer alternatives, and this post makes a strong case for C++11 std::array as that alternative. It highlights zero-overhead, type-safe, compile-time buffers and points to an ESP32 LED-strip demo where NUM_PIXELS_ fixes RAM usage at build time. Read it to see std::array used with std::rotate, passed to C libraries via data(), and as a low-risk path to std::vector later.
UML Statechart tip: Handling errors when entering a state
Handling synchronous failures during state entry is trickier than the UML spec implies, because UML forbids transitions inside entry actions. This post compares three practical firmware patterns: explicit guarded transitions, self-posting a failure event to a LIFO queue, and converting the operation into an asynchronous service. It lays out benefits, downsides, and when each approach is appropriate for small teams, mid-sized projects, or larger firmware efforts.
Favorite Tools - Look Up Tables
Look up tables are one of the simplest but most effective tools in an embedded engineer's toolbox, and this post shows why. Using a keypad example the author demonstrates a static table of key behaviors that packs repeat rates, enum mappings, and debug names into one place so changing behavior or adding keys is trivial. The article also outlines other uses like state machines and UI internationalization.
Tenderfoot: Embedded Software and Firmware Specialties
This post revisits an earlier Stack Overflow answer and breaks embedded firmware into practical specialties, from assembly optimization and device drivers to DSP, IoT networking, security, UI, and systems architecture. It outlines the core skills, tools, and math each specialty demands, and explains how product constraints and industries shape those roles. Newcomers get clear guidance on where to focus their learning and career development.
Surprising Linux Real Time Scheduler Behavior
An embedded Linux data acquisition project ran into puzzling UART latency whenever heavy UI animations ran. Moving all app threads to SCHED_FIFO helped but did not eliminate delays. After reading about kernel worker thread interactions, Matthew moved the UI back to the normal scheduler and the jitter vanished. The post highlights an unexpected kernel level priority inversion risk and a pragmatic workaround.
Tenderfoot: Recommended Reading
Twenty years on, these are the books that turned an electrical engineer into an embedded software pro. Matthew Eshleman walks through influential reads from Code Complete to Practical Statecharts and Test Driven Development, explaining how each shaped his design, estimation, and testing practices. This short list is a practical starting point for 'tenderfoots' launching an embedded firmware career.
The Hardest Bug I Never Solved
A single overlooked sentence in the STM32 datasheet turned intermittent startup resets into a major time-leach. Senior engineers chased DMA buffers and overflows for hours until Unni discovered the ISR vector table had been relocated to RAM with only 256 byte alignment while the MCU required 512 bytes. The misalignment caused interrupts to jump to the reset handler, and fixing the alignment stopped the reboot loop for good.
Tenderfoot: How to Write a Great Bug Report
A well-written bug report can save hours of debugging and prevent last-minute scrambles before demos. This post uses a contrived embedded RF product example to show what good and bad reports look like, the essential fields to include, and how clear reproduction steps helped find a simple bitmask bug before a trade show. Finish with a short template you can adapt to your team.
Tenderfoot: Introduction to Magic (Numbers that is...)
A source-code review revealed repeated numeric literals in C, exposing the classic problem of magic numbers in embedded software. This post explains what magic numbers are, why they are especially painful in firmware, and simple fixes using named constants and comments tied to specs. Read this if you want clearer, safer embedded C code and fewer surprises during maintenance.
Favorite Tools: C++11 User-defined literals
Units are a frequent source of bugs in embedded software, and keeping code aligned with product specs helps prevent mistakes. This post shows how C++11 user-defined literals let you write expressive, type-safe unit values like 80_MPH and convert them to meters per second using constexpr operator"" overloads. The conversion happens at compile time, improving readability and reducing reliance on macros or magic numbers.







