I got into a new hobby recently: Amateur (a.k.a. Ham) Radio. This article will be a collection of resources I believe are worth sharing in that context: YouTube channels, books, and links to study material. I will also present some things I’ve experimented with in the last few months.
[Read More]
Cross-compiling for Raspberry Pi: QEMU User Emulation and Dynamic Linking
This is a follow-up to an article I wrote back in 2019 that was about linking statically against libc. This time we are going to take a look at an alternative way: dynamic linking.
[Read More]
Controlling a Wallbox via Modbus-RTU
When operating a photovoltaic (PV) system at home in 2022, we usually want to make good use of the electrical energy harvested by the system – instead of feeding too much excess energy back into the grid. While this is definitely true for the setup we’re operating here (in Germany),...
[Read More]
ARM Assembly hands-on: Transmitting serial frames in software
We’re going to be taking a look at a (transmit-only) UART implementation in pure assembly language. We will use this as an example to walk through some basics of the ARM instruction set, and also to show some concepts of the architecture.
[Read More]
Prototyping with MicroPython
A recent toy project of mine involves controlling SPI devices through an STM32 MCU. Right from the beginning, I expected a lot of prototyping-style back-and-forth so I thought this would be a great opportunity to get to know MicroPython.
[Read More]
Git diff colliding with the shell: special characters
It sounds simple enough: You would like git to show local changes, but considering certain file types only. Something like git diff *.h usually does the job but in some cases yields unexpected results. We’re going to find out what this is about in this article.
[Read More]
Lingering Services -- How to prevent systemd from killing my processes after I log off?
This is about some recent experience I had with systemd on the Raspberry Pi. The idea was to set up a process to continuously run in the background as user ‘pi’, so I decided to give systemd’s user services a try (as opposed to the system ones). It turns out...
[Read More]
How to Deal with a 4-bit Wrapping Counter
Today’s article will be about integers and twos’ complement representation. It feels a bit like a follow-up on the previous one, where we did some experimenting with twos’ complements on narrow integer types. This time we are going to think more about how twos’ complement may help us handling counter...
[Read More]
Tinkering with signed integers in C
Recently I came across 4-bit signed integers. While I just wanted to make sense of them somehow in the first place, I thought that’s a nice opportunity to dig deeper.
[Read More]
SPI bus: Clock Polarity and Clock Phase by example
After some months, here’s finally an article about a truly Embedded topic! We are going to take a quick look at the two basic parameters you want to carefully adjust when setting up an SPI bus: Clock Polarity (CPOL) and Clock Phase (CPHA).
[Read More]
Git Snapshots Revisited
A great way to approach Git, I believe, is to explore its inner workings. To do that, let’s take a closer look at an analogy I made up previously, and create some useful graphs from real repositories.
[Read More]
KNX Link-Layer Ack: A brief analysis.
KNX is a two-wire bus for building automation. It operates at a pretty low bitrate, which makes it a good candidate for analyzing communications using a cheap logic analyzer. This article is about the Acknowlegement procedure at the KNX Link Layer.
[Read More]
Raspberry Pi: How to cross-compile against third-party libraries
Cross-Compiling for Raspberry Pi can become pretty challenging as soon as third-party libraries get involved. Using the sysroot concept together with rsync, it’s easy to keep those libraries synchronized between your host and target system.
[Read More]
Software Design Challenges: Embedded vs. Web
Sometimes, Embedded is considered a very special field of Software Engineering. It’s all about microcontrollers and complex devices, connected via a plethora of different bus systems – carefully orchestrated using only the C programming language. Let’s go and find out what’s so special about Embedded, and what our discipline has...
[Read More]
Git in a nutshell: Commit, Checkout, Reset
We’re going to talk about three basic git commands in this episode: commit, checkout and reset. Instead of making up any abstractions or metaphors, we will focus straight on how these commands modify your repository’s internal state.
[Read More]
3 Practical Uses of void Pointers in the C Language (part 3/3)
Part 2 was all about encapsulation, Abstract Data Types and how void pointers may help you implement these concepts. In this third and last part, we are going to see yet another use of them. After that, we will go and find out how void pointers are used in popular...
[Read More]
3 Practical Uses of void Pointers in the C Language (part 2/3)
In Part 1, we talked about how to use void pointers for implementing generic interface functions. Now we’re going to see how to take advantage of them to hide implementation details.
[Read More]
3 Practical Uses of void Pointers in the C Language (part 1/3)
Probably every beginner’s book on C programming has a section on pointers. Usually, there are also one or two paragraphs on the topic of void pointers. Have you ever asked yourself what they can actually be used for? In this article, we will explore some practical uses for pointers of...
[Read More]
How to Cross-Compile for Raspberry Pi on Ubuntu Linux in 5 Steps
This is about how to set up a cross compiler for the Raspberry Pi and use it for building target executables from C source code. Additionally, we are going to talk about how to set up userspace emulation – enabling you to execute target binaries on your host system transparently....
[Read More]
Embedded Programming: Loose Coupling Best Practices (Part 3/3)
After talking about decoupling units at the linker level in part 2, this last part of the series is going to be about achieving the same goal, but at the preprocessing stage of the build process. At the end of the article, you will find a comparison of all three...
[Read More]