Auto-Rewind for Daily NuttX Tests

2025-02-08
Auto-Rewind for Daily NuttX Tests

To catch and fix bugs in Apache NuttX RTOS early, an automated rewind testing system was created. This system daily builds and tests NuttX; if a test fails, it backtracks through commits, rebuilding and retesting until the culprit is found. A Mastodon alert and a polite notification are then sent to the relevant NuttX developer. GitLab snippets and a Prometheus database track and analyze results, visualized in a NuttX dashboard showing build history.

Read more
Development

Rust Standard Library on Apache NuttX RTOS: LED Blinky and Beyond

2025-01-27
Rust Standard Library on Apache NuttX RTOS: LED Blinky and Beyond

This article details building applications using the Rust standard library on the Apache NuttX real-time operating system. It covers JSON handling with Serde, asynchronous functions with Tokio, and LED control with the Nix crate. The author explains the difference between owned and raw file descriptors in Rust and compares the Nix and Rustix POSIX binding crates. Detailed steps for building and running Rust applications on NuttX, along with troubleshooting tips, are provided.

Read more
Development

Fixing a Sneaky uname Bug in Apache NuttX RTOS: Static Variables Strike Back

2025-01-21
Fixing a Sneaky uname Bug in Apache NuttX RTOS: Static Variables Strike Back

This post details the debugging journey of a seemingly minor bug in the Apache NuttX RTOS's `uname` command. The initial problem: the commit hash was missing from the output. The investigation led down a rabbit hole, involving inspecting the kernel image, calling `uname` at kernel startup, and disassembling the application. The culprit? A broken static variable (`g_version`) responsible for storing the commit hash within NuttX applications. This unexpected behavior highlighted the importance of thorough debugging in embedded systems, emphasizing that even minor anomalies can signal deeper, more serious issues.

Read more
Development bug fix