EmbeddedRelated.com

Surprising Linux Real Time Scheduler Behavior

Matthew EshlemanMatthew Eshleman November 5, 2016

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.


From bare-metal to RTOS: 5 Reasons to use an RTOS

Jacob BeningoJacob Beningo October 18, 20167 comments

Most developers default to bare-metal, but Jacob Beningo argues an RTOS often simplifies modern embedded design. He outlines five practical reasons to move to an RTOS: easier integration of connectivity stacks and GUIs, true preemptive scheduling with priorities, tunable footprints, API-driven portability, and a common toolset for tasks and synchronization. The piece helps decide when RTOS adoption speeds development.


From Baremetal to RTOS: A review of scheduling techniques

Jacob BeningoJacob Beningo June 8, 201617 comments

Jacob Beningo walks through five common embedded scheduling techniques, showing how each scales from a single super loop to a full RTOS. He highlights practical trade-offs for round-robin, interrupt-driven, queued, cooperative, and RTOS approaches so you can spot when timing becomes fragile and when added complexity is justified. This primer sets up the next post on when to adopt an RTOS.


Choosing a Microcontroller for Your Vehicle

Ed NutterEd Nutter June 7, 20161 comment

Picking the right microcontroller can make or break an autonomous vehicle project, and this post gives a practical checklist to help. It walks through voltage and power needs, memory and IO planning, cost and availability tradeoffs, and when to step up from an 8-bit MCU to a 32-bit controller or single-board computer. Real-world board examples illustrate the choices.


Modern Embedded Systems Programming: Beyond the RTOS

Miro SamekMiro Samek April 27, 20167 comments

Blocking-based RTOS tasks make embedded systems brittle and hard to extend, this post argues, and presents a practical alternative: active objects organized as message pumps. It explains why one-blocking-call tasks and nonblocking event handlers improve responsiveness and reduce task proliferation, and recommends using frameworks plus hierarchical state machines and UML to enforce good architecture and make designs scalable.


Motion Sensor with Raspberry Pi and MPU6050 - Part 1

Shres LShres L November 21, 2015

This blog will help you build your own, low cost 3-axis motion sensor using Raspberry Pi and Invensense MPU6050.


How to make a heap profiler

Yossi KreininYossi Kreinin May 23, 20141 comment

A heap profiler is surprisingly simple to build, and Yossi Kreinin walks through a compact working example called heapprof. The post shows how to intercept malloc/free, stash per-allocation metadata and call stacks into heap chunks, dump memory on crash or via JTAG, and map return addresses to source lines with addr2line or gdb. It also covers practical bootstrapping tricks for platforms without standard libc support.


Using the Beaglebone PRU to achieve realtime at low cost

Fabien Le MentecFabien Le Mentec April 25, 20148 comments

Fabien Le Mentec shows how the BeagleBone Black's PRU coprocessors can run hard realtime control loops, removing the need for an FPGA or dedicated microcontroller. He walks through Linux setup, device tree enabling, assembler and loader tools, and a timer example that reads ADCs and drives PWM from PRU code. The post highlights community SDKs and a recent TI Code Composer Studio option for C-based PRU development.


Delayed printf for real-time logging

Yossi KreininYossi Kreinin October 25, 20133 comments

Yossi Kreinin demonstrates delayed printf, a technique that records printf format pointers and raw argument words into a compact buffer so logging does not disturb real-time timing. He walks through a small C++11 writer using variadic templates and an atomic buffer plus a gdb Python reader that reconstructs formatted messages from executables or core dumps. The result is readable post-processed logs with minimal runtime overhead.


Android Vs Embedded system

 June 22, 2013

Android@Home and the ADK open a fast path to add rich UIs, multimedia, networking, and databases to embedded projects by leveraging phones, tablets, or dedicated Android boards. This post outlines the main benefits of using Android as a front end or as a full embedded OS, explains two integration approaches, and points to BeagleBoard as an affordable single-board option for one-platform designs.


The RTOS minefield

Colin WallsColin Walls February 26, 2024

Choosing an RTOS is challenging both technically and when assessing suppliers.


Using (Apache) NuttX Buttons Subsystem

Alan C AssisAlan C Assis March 22, 2024

You do not need to poke GPIO registers to read switches in NuttX, the OS provides a Buttons subsystem that delivers named events, multi-button support, and optional software debouncing. This post walks through wiring two breadboard buttons on a Raspberry Pi Pico, enabling the input and buttons drivers via menuconfig, building nuttx.uf2, and testing the buttons over the usbnsh serial console. It highlights why a simple hardware debounce is still a good idea.


Using a board with NuttX RTOS as an RS-485 / Modbus Slave Device

Alan C AssisAlan C Assis December 22, 2024

This practical walk-through shows how to turn a NuttX-equipped board into an RS-485 Modbus RTU slave using a cheap MAX485 transceiver and an STM32F4Discovery board. It explains why a simple UART plus a GPIO for DE/RE is enough, why the RP2040 needs special handling, and gives step-by-step configuration in NuttX, wiring for the transceiver, and a quick test using FreeModbus and mbpoll.


A brief overview of flight control software

Igor MišićIgor Mišić May 3, 20193 comments

Open source flight control software can feel like a maze of forks, retirements, and overlapping projects. In this post, the author builds a chart and comparison table to map how drone flight controller software evolved over time, using git commit history and repository data. It is a handy starting point if you want a quick overview of the current landscape before diving deeper.


Finite State Machines (FSM) in Embedded Systems (Part 5) - From One FSM to Many

Massimiliano PaganiMassimiliano Pagani April 21, 20261 comment

Traditionally, complex systems are implemented using multi-threading and mutexes. Trying to scale up this approach usually results in a nightmare of data races and hidden bugs. A single Finite State Machine may bring order to chaos in applications, but cannot be scaled beyond a limit. In this installment, we explore the Actor Model: a shift from shared state to communicating state machines. Discover how treating FSMs as independent, message-passing entities can eliminate concurrency issues, simplify testing, and improve your embedded architecture.


Who needs source code?

Colin WallsColin Walls August 31, 2023

Many developers feel that the supplying source code is essential for licensed software components. There are other perspectives, including the possibility of it being an actual disadvantage. Even the definition of source code has some vagueness.


Optimizing Real-Time Operating Systems for Efficient Edge Devices

Lance HarvieLance Harvie January 11, 2024

Edge devices need real-time responsiveness but run on tight CPU, memory, and power budgets. This post breaks down what an RTOS brings to the edge: deterministic task scheduling, lean memory management, protocol support, and modular scalability, then tackles common challenges like synchronization and security. Read it for practical best practices on scheduling and protocols plus a look at future trends such as edge AI integration and interoperable infrastructure.


Building Linux Kernel for Desktops

Kunal SinghKunal Singh August 9, 20084 comments

Kernel building for desktop Linux is less daunting than it used to be. In this short primer Kunal Singh introduces the distribution-specific tools and procedures that simplify compiling a desktop kernel, with focused pointers for Fedora, Ubuntu, and SUSE. Engineers will get a quick overview of where to start and which tools each distribution provides to streamline a custom kernel build.


A design non-methodology

Colin WallsColin Walls April 25, 2024

Although writing an RTOS or kernel may be an interesting project, it is unlikely to be a wise course of action.


Hello Android

Kunal SinghKunal Singh May 5, 20081 comment

Getting Android Early SDK running on Fedora Core 7 sounds simple, until Java gets in the way. Kunal Singh walks through the exact setup he used, from installing Eclipse and the Android SDK to switching Fedora over from GNU Java to Sun Java so the tooling would work. It is a quick, practical note for anyone trying to get an old Linux dev box talking to early Android tools.