What we've been reading in October
Here are the articles, videos, and tools that we’ve been excited about this October.
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
#390 - Irresponsible at the Time with Tyler Hoffman (Podcast) - Embedded.fm
Elecia White, Chris White, and I talk about the issues of building and shipping embedded devices at scale. We talk about how the hardest part is not building the product, but supporting and monitoring the product.
Best practices for debugging Zephyr-based IoT applications - Embedded.com by Luka Mustafa and Chris Coleman
How to debug Zephyr applications using standard methods and Memfault, written by Luka from IRNAS.
When Updating an Untested Module, Take the Opportunity to Add Tests by Phillip Johnston
No one likes to try and update a brittle and untested module in a code base. But when it needs to be updated, this is usually the best time to add unit tests! As a developer who has had to do this plenty of times, if you don’t add tests, it will become your module if you update it without adding tests. So do it. Listen to Phillip.
The Problem with malloc() - Stratify Labs
A nice post describing how a basic heap is implemented and general advice on whether or not using a heap and
malloc()is a good idea for embedded firmware. At the end of the day, it depends.
So you want to live-reload Rust - Faster Than Lime by Amos
If you have 48 hours or more of free time, Amos can teach you how to reload a dylib live in a Rust program.
Announcing ESP32-H2, an IEEE 802.15.4 + Bluetooth 5 (LE) RISC-V SoC - Espressif Systems
RISC-V, Bluetooth 5, and IEEE 802.15.4. This is exciting!
Rust on Espressif chips (continued) by Scott Mabin
Scott works at Espressif, and in this post, he announces that they’ll keep a book updated on how to get started with Espressif chips and Rust. It includes a roadmap! I love it.
Bluetooth Development Like a Pro - Adding a Portable CLI to Your Firmware - by Ovyl by Nick Sinas
Nick talks about building a CLI for their nRF52-based product.
Building an IoT Product — The Product(ion) Feedback Loop - tado° by Matthias Bösl
Matthias talks about collecting data during the manufacturing process of a consumer hardware product and using it to make decisions. I’ve been enjoying the articles coming out of this blog!
c - Bubble sort slower with -O3 than -O2 with GCC - Stack Overflow
One of those gems you find on Stack Overflow.
Implementing Hash Tables in C by Andrei Ciobanu
A nice and clean post on building a hash table in C. I enjoy a good post on data structures in C.
A tale of two toolchains and glibc by Adrian Ratiu
This article talks about having a code base support two compilers, LLVM/Clang and GCC.
Tiny ELF Files: Revisited in 2021 by Nathan Otterness
Nathan wanted to learn what it took to make a tiny ELF program that ran on Linux, so he gave it a whirl. At one point, he used a spreadsheet to map out all the instructions used 😛.
“Static Linking Considered Harmful” Considered Harmful - Gavin D. Howard by Gavin Howard
Gavin covers in detail why he believes static linking is far superior to dynamic linking. Less related to embedded, but a fun read nonetheless.
The Fascinating Reason Why The Garmin FR945 & Fenix 6 No Longer Shows Pool Temperature - DC Rainmaker
Garmin recently published an update to one of their watches which disables the water temperature sensor during indoor swims only. Why? we have discovered that having the barometer-thermometer (a combined electronic part) powered on during exposure to chlorine dramatically accelerates the failure of the part. I love when a software update fixes hardware issues.
The LLVM Project Blog by Pavel Loktev
This post covers the problem where you load similarly compiled firmware into different regions of ROM but want to be able to execute from either of them (such as in A/B partitioning schemes for firmware updates). Pavel talks about how to solve this problem using LLVM.
Unexpectedly low floating-point performance in C - ESP32 Forum
A fun 5-year-long forum thread on floating-point performance in C on an ESP32, complete with measurements, sample code, and more.
Tools & Projects
madler/crcany: Compute any CRC, a bit at a time, a byte at a time, and a word at a time.
A generic CRC library in C by the infamous Mark Adler, creator of zlib and gzip.
atomicobject/heatshrink: data compression library for embedded/real-time systems
A small compression library based on LZSS and claims to function well using 100-500 bytes of memory. Slick!
The best way to test your embedded code is probably to not test it on your embedded system, but rather on a host machine or in a simulator/emulator. I learned this week that LVGL has this simulator, and it’s super easy to work with!
rokath/trice: fast and tiny embedded device C printf-like trace code and real-time PC logging (trace ID visualization)
A clever tracing library implemented in Go. It mentions the ARM Cortex-M0+ in the docs, so it should be able to be compiled against Cortex-M chips and used.
ssciwr/clang-format-wheel: clang-format python wheels
Want to install clang-format on your teammates’ machines but don’t use Conda or Docker? Include this PyPi package in your Python virtual environment and you’re off and running.
V-USB - A Firmware-Only USB Driver for Atmel AVR Microcontrollers
Title says it all.
Arm announces Centauri
Arm has announced Centauri, a project(?) that will encompass how to abstract away hardware and some software differences and provide a blueprint for security and software libraries. At least I think. I’m patiently waiting to look into this more.
GNU Arm Embedded Toolchain Downloads – Arm Developer
It’s always a good day when Arm releases an updated version of the GNU Arm Embedded Toolchain. This time, it’s still 10.3 but it patches a recent security vulnerability.
Sensor Watch - Crowd Supply
A fun Arm Cortex-M0+ upgrade for a Casio watch.