What we've been reading in February (2022)
Here are the articles, videos, and tools that we’ve been excited about this February.
We hope you enjoy these links, and we look forward to hearing what you’ve been reading in the comments or on the Interrupt Slack.
Articles & Learning
Proactive Debugging with Offensive Programming Webinar - Memfault by Tyler Hoffman
I gave a webinar on what is probably my favorite topic nowadays - using the ideas of Offensive Programming and a robust remote debugging solution (this time Memfault) to rapidly speed up development, testing, and the too-often “Something is broken in production. We need to fix it now!” cycles.
Running C unit tests with pytest - The Hub of Heliopolis by Gabriele Tornetta
Unit testing in C/C++ is annoying. Even the simplest things like using lists or hash maps for fixtures and fakes aren’t trivial. The people I’ve talked to in the past who have used Python to test C sing praises of the technique. Here’s a blog post explaining how you could go about doing this!
How is git commit sha1 formed - GitHub Gist by Carl Mäsak
Nice breakdown of what components are included when
gitcomputes a commit hash - Noah
moreutils: the utilities package every UNIX/Linux/Mac OS developer should know - Clean Coding
A nice description of some more exotic but compelling UNIX utilities - Noah
Precursor: From Boot to Root - bunnie studios
A one-hour presentation on how the Precursor hardware and software stacks look from the lowest levels.
Matter security model. Espressif Matter Series #7 - The ESP Journal by Guo Jiacheng
The seventh installment in a series about the Matter protocol, this time about the security model.
Working with Strings in Embedded C++ - Sticky Bits by Niall Cooling
Everything you could possibly want to know about working with strings in C and C++ on embedded devices. Some implementations allocate space on the heap, the stack, or in read-only memory, and it’s important to know what happens under the hood.
Listening to devices with libudev - usairb devlog #1 by Fausto Núñez Alberro
Development log of usairb, a new project Fausto, a Memfault employee, is building to learn embedded Linux. The goal is to transform any embedded Linux device with access to the Internet into a multiplexing transmitter for USB hubs.
Simple and Exponential Moving Averages in embedded C++ - Stratify Labs
An article about how to implement moving averages in C++ complete with the mathematical formulas and code.
One Simple Trick to Improve Your Firmware Module Logging - Ovyl by Nick Sinas
A simple article talking about using macros to prefix or set logging levels. If you don’t have similar knobs in your firmware today, definitely add some!
The Myth of Three Capacitor Values - Signal Integrity Journal by Eric Bogatin, Larry Smith, and Steve Sandler
A nice rundown about using MLCC capacitors for decoupling- turns out, using three different values can provide worse performance than a single one. - Noah
On finding the average of two unsigned integers without overflow - The Old New Thing by Raymond
Always interesting to re-think seemingly trivial problems (here: avg of two unsigned ints) – especially in the context of overflows which are a common source of errors in C. Also some nice discussion of compiler output - Heiko
Remote Device Debugging and Monitoring using Memfault - Conexio Stratus by Rajeev Piyare
A (seriously) non-sponsored post about using Memfault with Conexio Stratus devices to help remotely monitor and debug Status devices.
Tools & Projects
Remote Zephyr development using Segger tunnel and a Raspberry Pi - Golioth by Vojislav Milivojević
It’s always been a little-known secret that the Segger J-Link has the ability to open a port and publicly expose the JTAG port. This article talks about this feature and goes a step further to connect a Raspberry Pi to the J-Link so that you can debug hardware from anywhere!
armink/FlashDB: An ultra-lightweight database that supports key-value and time-series data
A Key-Value database, a Timeseries database, and a Log-series database all rolled into one library and optimized for flash storage on MCU’s. Honestly, I like their API. It feels like a modern library, which I don’t say often.
seemoo-lab/openhaystack: Build your own ‘AirTags’ 🏷 today! Framework for tracking personal Bluetooth devices via Apple’s massive Find My network.
Reverse engineering of the Apple Find My system.
hanickadot/compile-time-regular-expressions: A Compile time PCRE (almost) compatible regular expression matcher. by Hana Dusíková
Interesting repository that implements compile-type regular expressions in C++ - Noah
nasa-jpl/embedded-gcov: GCC/gcov code coverage data extraction from the actual embedded system, without requiring a file system, an operating system, or standard C libraries
A Github repo seemingly out of NASA that details how you can use gcov on your embedded systems.
Embedded Systems Weekly is back!
It’s back from the dead after seeing no updates since August 2018. Subscribe now!
C-ing the Improvement: Progress on C23 - The Pasture
Rundown of some of the up-and-coming C23 features. I’m a big fan of the digit separators for literals in Rust, nice to see them coming to C!
Some mistakes Rust doesn’t catch by Amos
Rust is known as a performant language similar to C and C++ that prevents a lot of the common mistakes in these two languages. This is an expansive article on some of the common developer errors that Rust does not prevent you from making.
Inline assembly - The Rust Reference
Inline assembly is stable in rust! You only need to nest three
AdaCore and Ferrous Systems Joining Forces for Safety Critical Rust Variant - The AdaCore Blog
AdaCore has been writing some cool articles about Ada on embedded devices. We’ve also been very impressed by the work out of Ferrous Systems and their developments on embedded rust. I’m excited to see where this partnership goes in the future!
Debugging WebAssembly with modern tools - Chrome Developers by Ingvar Stepanyan
It’s a bit random for Interrupt, but we continue to love the developments on WebAssembly and truly believe that we’ll live in a world where we run high-level language software compiled down to WebAssembly on our embedded devices. This would allow us to do most of our testing on host machines for quicker iteration cycles.