EmbeddedRelated.com
Jacob Beningo
Live online course · Jacob Beningo
AI for Embedded Developers
$100 off for EmbeddedRelated readers until Dec 6 · 5 live sessions, Dec 7-11
Discount ends in
26days 00hrs 25min 37sec
Learn More →

Coding Step 1 - Hello World and Makefiles

Stephen FriederichsStephen Friederichs ● February 10, 2015●6 comments

Stephen Friederichs walks through compiling a C Hello World using GCC on Windows, then shows how a simple makefile can automate the process. You will see how output naming, project layout, and makefile targets work, and learn dependency rules based on timestamps plus how to force rebuilds with clean and FORCE targets. This is a practical first step to escape the IDE and use Unix-style build tools.


Important Programming Concepts (Even on Embedded Systems) Part V: State Machines

Jason SachsJason Sachs ● January 5, 2015●8 comments

State machines are not glamorous, but they solve a lot of real embedded problems. Jason Sachs uses a motorized couch example to show how FSMs and Harel statecharts expose corner cases, simplify timing constraints, and make behavior easier to specify and review. The article walks through hand-rolled switches, tabular implementations, the state pattern, libraries like QP and Boost, and tool tradeoffs.


Coding - Step 0: Setting Up a Development Environment

Stephen FriederichsStephen Friederichs ● November 25, 2014●5 comments

Stephen Friederichs walks through setting up a minimal C development environment without an IDE, focusing on Windows. He explains why learning command-line toolchains matters, recommends GCC and Make as a durable base, and gives step-by-step MinGW installation and PATH configuration plus editor suggestions. The guide gets you compiling with mingw32-make and gcc so you can move on to makefiles and project structure.


Important Programming Concepts (Even on Embedded Systems) Part IV: Singletons

Jason SachsJason Sachs ● November 11, 2014●2 comments

Singletons are convenient but often a modularity killer, especially in embedded firmware. Jason Sachs walks through the many faces of singletons, from static members and globals to hardware registers and user-visible application singletons, and shows practical ways to avoid tight coupling. Read this for concrete embedded examples and pragmatic fixes like passing state explicitly, using interfaces or factories, and isolating unavoidable globals in a HAL.


The CRC Wild Goose Chase: PPP Does What?!?!?!

Jason SachsJason Sachs ● October 23, 2014●2 comments

Jason Sachs walks through a CRC rabbit hole and explains why ambiguous CRC names and incomplete specs lead to subtle protocol bugs. He demonstrates how XMODEM and KERMIT variants with a zero initial value can miss dropped leading-zero bytes, praises the X.25 standard for providing test vectors and a clear CRC16 definition, and warns that RFCs that ship only sample code are a poor substitute for a proper specification.


Important Programming Concepts (Even on Embedded Systems) Part III: Volatility

Jason SachsJason Sachs ● October 10, 2014

Jason Sachs takes volatility out of the basement and into practical embedded programming. He shows why data that can change outside your thread of control breaks assumptions, how the volatile qualifier in C/C++ and Java affects compiler and CPU behavior, and when to prefer shadow registers, locks, or proper concurrency libraries instead of ad hoc volatile usage.


Introduction to Microcontrollers - Ada - 7 Segments and Catching Errors

Mike SilvaMike Silva ● September 22, 2014●5 comments

Mike demos an Ada implementation of a multiplexed 7-segment driver on the STM32F407 Discovery board, highlighting Ada idioms like protected objects for ISRs and packed-boolean GPIO mapping. The post shows practical timer setup for Timer 6, how to avoid ARR/CNT races, and how Ada's runtime range checks plus a last-chance handler surface out-of-range errors with file and line diagnostics.


Important Programming Concepts (Even on Embedded Systems) Part II: Immutability

Jason SachsJason Sachs ● September 14, 2014

Immutable data can make embedded code easier to reason about, reduce concurrency bugs, and eliminate defensive copies. Jason Sachs walks through practical techniques that work in resource-constrained systems, from using const and pseudo-immutability to separating old and new state, to the limits of fully persistent data structures when you lack dynamic memory. The article also compares register-level state flow and advocates message passing as a concurrency alternative.


Important Programming Concepts (Even on Embedded Systems) Part I: Idempotence

Jason SachsJason Sachs ● August 26, 2014●5 comments

Idempotence is a simple design principle that prevents duplicate effects when operations are retried or repeated. Jason Sachs shows why it matters in embedded systems, from HTTP submit buttons and capacitive touch inputs to garage-door remotes and SPI DAC writes. Read this post to learn three practical idempotent techniques and when redundant writes are a sensible reliability trade-off.


Project Directory Organization

Stephen FriederichsStephen Friederichs ● August 20, 2014●2 comments

A tidy project tree can make a bigger difference than you might think. Stephen Friederichs lays out a practical directory scheme for small software projects, using familiar folders like src, obj, bin, test, reports, docs, and conf to keep builds, tests, and documentation from turning into a mess. He also explains why the root directory should welcome contributors, not confuse them.


Handling Translations in an Embedded Project

Mattia MaldiniMattia Maldini ● October 13, 2023●4 comments

A brief walkthrough on how to handle human language translations in a low level C application. Some options are listed, each with advantages and disadvantages laid out.


Hidden Gems from the Embedded Online Conference Archives - Part 2

Tim GuiteTim Guite ● March 20, 2025●2 comments

A look back at a deep dive into the Mars Perseverance flight software from one of the technical leads at JPL.


Can an RTOS be really real-time?

Miro SamekMiro Samek ● February 7, 2026●2 comments

Real-Time Operating Systems are meant for real-time applications. But with conventional shared-state concurrency and blocking, can you honestly know the worst-case execution time of an RTOS thread?


More than just a pretty face - a good UI is essential

Colin WallsColin Walls ● November 30, 2023●1 comment

A user interface can make or break a device - determining its success in the marketplace. With careful design, the UI can make the product compelling and result in a high level of satisfaction from new and experienced users.


Hidden Gems from the Embedded Online Conference Archives - Part 1

Tim GuiteTim Guite ● March 5, 2025

Discussion of a "hidden gem" from the Embedded Online Conference archives!


How to Deploy Local LLMs for Embedded Software Development: Terminology and Motivation

Mohammed BillooMohammed Billoo ● May 12, 2026

In this blog post series, I walk you through creating a fully local, offline AI pipeline. In this first post, I outline the motivation and relevant terminology that are important before we dive into hardware selection and implementation of the pipeline.


Small or fast?

Colin WallsColin Walls ● August 26, 2024●4 comments

Developers of software for desktop computers take code optimization for granted. Embedded developers typically need to pay much more attention to the details


When a Mongoose met a MicroPython, part II

Sergio R CaprileSergio R Caprile ● June 22, 2024

In the first part of this blog, we introduced this little framework to integrate MicroPython and Cesanta's Mongoose; where Mongoose runs when called by MicroPython and is able to run Python functions as callbacks for the events you decide in your event handler. Now we add MQTT to the equation, so we can subscribe to topics and publish messages right from MicroPython.


Embedded Toolbox: Source Code Whitespace Cleanup

Miro SamekMiro Samek ● August 5, 2017

Trailing whitespace and mixed end-of-line conventions can silently break preprocessing or bloat diffs, yet they are invisible in editors. QClean is a tiny, blazingly fast CLI utility that removes trailing spaces, normalizes EOLs, replaces tabs with spaces, and optionally flags long lines. It runs cross-platform or as a native binary in qtools/bin and is easy to customize and rebuild for your workflow.


Bellegram, a wireless DIY doorbell that sends you a Telegram message

Sergio R CaprileSergio R Caprile ● July 9, 2023

A wireless button that uses the M5 STAMP PICO and Mongoose to send a Telegram message when pressed. The code is written in C