Understanding Yocto Project Layers: A Modular Approach to Embedded Systems Development
Managing metadata across embedded Linux builds gets messy fast, so the Yocto Project uses layers to keep things modular and reusable. This post walks through inspecting active layers with bitbake-layers, controlling overrides with BBFILE_PRIORITY, and creating a meta-yocto-splash-img layer that uses a .bbappend to replace psplash. It finishes by showing how to verify the custom splash screen in QEMU so you can test safely before deploying to hardware.
My friend, the compiler
Modern compilers were given great powers, but we don't always know where and when they'll use them. This may cause us to either worry needlessly or trust unjustifiably, as demonstrated by a little example in this post.
What I Learned From Crashing and Burning in Grad School
Have you ever felt so consumed by something that it started to crowd other parts of your life? So obsessed with success in a particular area that you could hardly think about anything else? I found myself in exactly that spot in 2018 when I first started graduate school; I wanted to succeed so badly that I worked myself to the bone and I let even my marriage and my health suffer in service to it. This state of being is, believe it or not, NOT conducive to success, in neither the long-term nor the short-term. But it took two authors and one pivotal book for me to understand that, to see the pit I had dug for myself, and to begin the path back out. In this blog, I want to share with you my journey in the hopes that you can avoid the mistakes I made.
Small or fast?
Developers of software for desktop computers take code optimization for granted. Embedded developers typically need to pay much more attention to the details
Stand-by or boot-up
Many factors affect the usability of devices - a key one is how long it takes to start up.
Write Better Code with Block Diagrams and Flowcharts
Reading and writing code without architectural diagrams is like trying to follow complex instructions without any explanatory pictures: nigh impossible! By taking the time to draw out the block diagrams and flowcharts for your code, you can help identify problems before they arise and make your code easier to design, write, test, and debug. In this article, I'll briefly justify the importance of architectural drawings such as block diagrams and flowcharts and then teach you what they are and how to draw them. Using two simple examples, you'll see first-hand how these drawings can significantly amplify your understanding of a piece of code. Additionally, I'll give you a few tips for how to implement each drawing once you've completed it and I'll share with you a few neat tools to help you complete your next set of drawings.
Memory Mapped I/O in C
Interacting with memory mapped device registers is at the base of all embedded development. Let's explore what tools the C language - standard of the industry - provide the developer with to face this task.
Some Embedded System Software Design Resources
Embedded systems span many architectures and run-times, so there is no single definitive resource. This curated list brings together practical embedded-focused books by Elecia White and Jacob Beningo, general design guidance from Robert Martin, and a TDD primer by James W. Grenning, plus concrete advice on BDD-style TDD and off-target testing. Skim the list in a day, then try the techniques hands-on.
Here Comes The Noise!
Noise. That awful thing which nobody wants that most sadly never learn about. It's time to change that with this blog post.
You Don't Need an RTOS (Part 4)
In this fourth (and final!) article I'll share with you the last of the inter-process communication (IPC) methods I mentioned in Part 3: mailboxes/queues, counting semaphores, the Observer pattern, and something I'm calling a "marquee". When we're done, we'll have created the scaffolding for tasks to interact in all sorts of different the ways. Additionally, I'll share with you another alternative design for a non-preemptive scheduler called a dispatch queue that is simple to conceptualize and, like the time-triggered scheduler, can help you schedule some of your most difficult task sets.
Energia - program a TI MSP430 using Arduino sketches
Energia brings Arduino simplicity to TI's MSP430, turning a fiddly toolchain into a sketch-based workflow you already know. Lonnie Honeycutt walks through why the Launchpad is a great low-cost dev option, outlines supported MSP430 families and caveats like 3.3 volt I/O, and shows a Halloween LED jack-o-lantern sketch to prove how quickly you can get blinking LEDs.
VHDL tutorial - A practical example - part 2 - VHDL coding
Gene Breniman walks through the VHDL coding for a CPLD-based data acquisition engine, turning the hardware spec into a working state machine and signal generators. The article explains SPI and I2S timing choices, an internal SPI peripheral latch, and counter-based timing (seqCount and CycleCnt) used to create LRCK, BCK, SPI SCK and nvSRAM write control. It’s a practical, implementation-focused guide for embedded designers.
Lost Secrets of the H-Bridge, Part II: Ripple Current in the DC Link Capacitor
DC link capacitor ripple often determines capacitor life, yet the H-bridge waveform has a lot more structure than you might expect. Jason Sachs separates capacitor current into ramp and pulse components, derives closed-form peak and RMS expressions for edge and center PWM, and shows harmonic amplitudes. The post includes Python simulation so you can visualize the waveforms and apply the formulas to capacitor selection and EMI analysis.
How to Achieve Deterministic Behavior in Real-Time Embedded Systems
Ensuring deterministic behavior in real-time embedded systems is paramount for their reliability and performance. The ability to predict precisely how a system will respond to various inputs at any given time is crucial in critical applications such as medical devices, aerospace systems, and automotive safety mechanisms. Achieving deterministic behavior involves meticulous design, stringent testing, and adherence to strict timing constraints.
Finite State Machines (FSM) in Embedded Systems (Part 2) - Simple C++ State Machine Engine
When implementing state machines in your project it is an advantage to rely on a tried and tested state machine engine. This component is reused for every kind of application and helps the developer focus on the domain part of the software. In this article, the design process that turns a custom C++ code into a finite-state machine engine is fully described with motivations and tradeoffs for each iteration.
Designing for Humans: Viewing DFM and Industrialization Through the Lens of the Fitts MABA–MABA List
"Operator’s fault" and "Inadequate Training" are the phrases you typically hear when yield loss and stubborn manufacturing issues are discussed. While these factors may play a role, they rarely tell the whole story. This article views DFM and industrialization through the lens of a classic human factors principle; the Fitts MABA-MABA list, and highlights a critical, yet less-discussed factor: the lack of manufacturing-focused human factors considerations in product design. It explores practical examples like Proprioceptive Fatigue and Visual SNR, and shows how lots of chronic manufacturing issues are results of bad upstream design decisions, echoing the fact that in many cases, inspection exists not because it is inherently valuable, but because the design failed to encode correctness directly into the product or process. If you’ve ever wondered why "retraining" never seems to fix a recurring defect, this take on industrialization and manufacturing might explain why.
How FPGAs work, and why you'll buy one
Yossi Kreinin argues that FPGAs are no longer just programmable gate arrays, they are becoming a mainstream programmable acceleration and I/O platform. The article explains how modern FPGAs pair a sea of LUTs and switch boxes with DSP slices, RAMs, and hard CPUs to deliver massive parallelism, deterministic timing, and surprising energy efficiency, and it includes a readable Verilog convolution example to show how this works in practice.
PID Without a PhD
You do not need control theory to implement useful PID loops in embedded projects. Tim Wescott walks through simple, ready-to-use C code, clear explanations of P, I and D terms, and a practical tuning recipe you can apply to motors, precision actuators, and heaters. The article highlights anti-windup, sampling-rate guidance, and when to call in a control expert.
Introduction to Microcontrollers - Driving WS2812 RGB LEDs
Mike Silva walks through a practical, cycle-counted AVR assembly implementation to bit-bang WS2812B RGB LEDs from an 8MHz AVR, hitting the chip's tight 1.25µs-per-bit timing. The post breaks down the WS2812B self-clocked protocol and GRB byte order, explains register and calling-convention choices, and includes a complete C example plus power-consumption warnings for driving LED strips.
Stuck with Jira — and Stuckons
Jason Sachs vents about Jira’s quirks and why it still feels stuck despite years of fixes. He walks through concrete pain points: nonstandard markup, relentless notification noise, poor meta-task support, and limited analytics that make day-to-day engineering work harder. To explain why schedules blow up, he introduces a simple kepton model of planons, workons, and stuckons that highlights unexpected work.
Introduction to Microcontrollers - Further Beginnings
Mike Silva walks through the CPU plumbing every embedded engineer needs to know before writing their first LED blinky. The post explains registers (data, address, stack pointer, link), the fetch-execute cycle, and the main instruction classes such as arithmetic, logic, shifts, branches, and call/return mechanics. Read this to see how C maps to CPU operations and why stack versus link register choices matter.
Absolute Beginner's Guide To Getting Started With Raspberry Pi
Getting started with Raspberry Pi can feel overwhelming. This guide strips the noise and shows the simplest path from unboxing to a working desktop. It recommends buying a preloaded NOOBS microSD to avoid imaging hassles, lists exact parts and suppliers, and walks through booting, recovery, and making a backup. If you want embedded electronics it also lists starter parts and ESD safety tips.
Arduino robotics #1 - motor control
Clusterbot is Lonnie Honeycutt's first autonomous robot, built on a tight budget to teach practical motor control. This post explains why you cannot drive motors directly from an Arduino, how to wire and enable the Toshiba TB6612FNG motor driver, and offers hands-on PWM and calibration tips for getting smooth motion from cheap Mabuchi FA-130 toy motors.
Data Hiding in C
You can get C++-style data hiding in plain ANSI C, Stephen Friederichs demonstrates how with a FIFO stack example. He shows opaque pointer typedefs to hide struct layouts, const-qualified handles to catch accidental writes, static file-local functions for private helpers, and a canary field to detect tampering. The pattern keeps the public header stable while letting you change implementations behind the scenes.
How to Estimate Encoder Velocity Without Making Stupid Mistakes: Part II (Tracking Loops and PLLs)
Jason Sachs explains why simple differentiation of encoder counts often fails and how tracking loops and PLLs give more robust velocity estimates. Using a pendulum thought experiment and Python examples, he shows how a PI-based tracking loop reduces noise and eliminates steady-state ramp error, and why vector PLLs with quadrature mixing avoid cycle slips and atan2 unwrap pitfalls in noisy or analog sensing.
Lost Secrets of the H-Bridge, Part IV: DC Link Decoupling and Why Electrolytic Capacitors Are Not Enough
Switching H-bridges can kick nasty voltage spikes onto the DC link, and a single electrolytic capacitor rarely fixes the problem. Jason Sachs uses simulations and practical PCB layout advice to show how a three-tier decoupling strategy — bulk electrolytic, mid-value ceramics or film, and many small HF bypass capacitors plus PCB plane capacitance — tames spikes, reduces EMI, and avoids harmful resonances when parts and vias are placed correctly.
Supply Chain Games: What Have We Learned From the Great Semiconductor Shortage of 2021? (Part 3)
Jason Sachs pulls back the curtain on Moore's Law and the foundry business to explain why the semiconductor shortage exposed brittle economics. He traces how roadmaps, depreciation schedules, and node mix force foundries to juggle expensive new fabs and mature capacity, and shows why leading-edge nodes punch above their volume share in revenue. Engineers get practical insight into how capacity and timing decisions ripple through the supply chain.
Ten Little Algorithms, Part 1: Russian Peasant Multiplication
Jason Sachs revisits a centuries-old multiplication trick and shows why it still matters. He lays out Russian Peasant Multiplication with simple Python code, then reveals how the same shift-and-add pattern maps to GF(2) polynomial arithmetic and to exponentiation by squaring. The post mixes historical context with practical bitwise techniques that are useful for embedded and low-level math work.
PID Without a PhD
You do not need control theory to implement useful PID loops in embedded projects. Tim Wescott walks through simple, ready-to-use C code, clear explanations of P, I and D terms, and a practical tuning recipe you can apply to motors, precision actuators, and heaters. The article highlights anti-windup, sampling-rate guidance, and when to call in a control expert.
Introduction to Microcontrollers - Buttons and Bouncing
Mechanical buttons lie to your microcontroller, producing bounces and occasional noise that look like multiple presses. Mike Silva walks through practical ways to represent buttons, simple and robust software debounce strategies, and how to convert states into single-use events. The post includes ready-to-use C patterns: N-sample filters, shift-accumulator filtering, per-button data structures, and keypad debouncing examples.
Free Embedded Systems Books
Want a one-stop list of legally free embedded systems books online? Stephane Boucher launched a collaborative Google Docs experiment to crowdsource the best titles made available by authors and publishers, not pirates. Add missing entries, prune unsuitable links, and help build a curated, shareable collection of trusted embedded-reading material for firmware engineers and embedded Linux developers.
Collaborative Writing Experiment: What are your favorite Embedded Systems Online Resources?
Stephane Boucher invited the EmbeddedRelated community to co-create a live, crowd-sourced list of favorite embedded systems online resources using a Google Docs document. Readers could add links, vote by adding pluses, and watch edits appear in real time, while the author monitored for spam, planned moderation, and later closed the document after collecting contributions and trying to boost participation via Reddit/ece. It is a hands-on experiment in community curation.
Success Story
A blog post has just broken the all-time record for the number of pageviews in 24 hours on the related sites. The blog post in question is titled Data Hiding in C and was written by Stephen Friederichs. It has been viewed by more than 7000 individuals since its publication a few days ago.
One reason that explains the success of this blog post is the wide appeal of the subject of the article (c programming) which allowed me to
Code Snippets Winners Announced
Wow, thanks a lot for all the code snippets - I am pleasantly surprised by the quality of the code that has been shared and I am very grateful.
Now, as you know, to give momentum to the section I had announced a special reward program for code snippets submitted by the end of March.
The partner members and I had a very hard time selecting the 5 "most useful" snippets out of the more than 50 who have been submitted.
Here's our selection:
Now on Twitter + More Code Snippets Incentives
Stephane Boucher announces that EmbeddedRelated, DSPRelated, and FPGARelated are now on Twitter, with occasional timed giveaways for early visitors. He also highlights the new code snippets section, which has ten submissions and a rewards program: approved snippets can earn up to $50, and five standout March submissions will receive an extra $100 each. The post invites engineers to share useful embedded code.
New Code Snippet Section
Stephane Boucher launches a code snippet section on EmbeddedRelated, inviting embedded engineers to share short, useful code. Contributors get $10 for each approved submission via PayPal, plus performance bonuses: $10 when a snippet reaches 100 pageviews and $30 at 500 pageviews through 2013. It's an easy way to get credit and a small reward for reusable firmware and microcontroller code.
Two jobs
Stephane Boucher explains why EmbeddedRelated went quiet for a few months after a volunteer project demanded more of his time. He and his wife organized a clown-gymnastics show with 15 kids, sold more than 700 of 800 tickets, and raised $2,700 for the Tree of Hope. Now the shows are done and he plans to resume regular posting with new site features.
October winner announced
If you are a regular visitor of EmbeddedRelated, you are most likely aware that I have been running monthly draws lately for users of the site who are helping me to clean up the archives by rating threads in the forums section.
For the month of August, the member "Cryptoman" won a iPad, and for the month of September, 10 members won $50 each.
For October, the winner of the new iPod Touch is the member with the username "hssathya".
The winner of the next draw will win...
Behold, the New Comments System!
I have just finished implementing a new system for commenting the blogs. It uses Ajax extensively, so the page won't reload if you post a comment. And it is a 'threaded' system, which means that if you post a reply to a comment, it will be attached to it.
What do you think? I personally love it. Please go ahead and test it with a quick comment.
Although it is better to be logged in to post a comment, non-registered users can also comment, but they will have...
Best Embedded Systems pdf Documents Out There
Sifting through millions of embedded systems PDFs online is tedious and most documents are low-value. Stephane Boucher asks the community to crowdsource a curated directory of the best PDFs, explains submission and approval rules, and offers cash incentives to motivate contributions. Submissions must reach a +5 rating by partner members to be approved, and initial pending submissions are limited to five to prevent abuse.























