I am currently doing development on a Windows 10 machine for a client, and I found myself repeating a bunch of tasks related to the build and deployment process quite frequently. I had already written a few PowerShell scripts to automate much of the boring stuff, but I thought it would be neat to be…
CI/CD with Jenkins and Docker
Continuous integration (CI) and continuous deployment (CD) has been a staple in “regular” software engineering for quite some time now. As per usual, the embedded world is lagging behind by a few years, but CI/CD is becoming increasingly popular for embedded software as well. I have personally set up a few Jenkins instances to build…
STM32 without CubeIDE (Part 3): The C Standard Library and printf()
In part 2 we wrote a Makefile to build the project, configured the system clock and created a basic blink application. So far, we have built the project without the C standard library by invoking gcc with the -nostdlib flag. In this article we are going to take a look at how to integrate the C standard library into our project and set up printf() to send messages to our host machine via UART for some primitive debugging capabilities.
Understanding the (Embedded) Linux boot process
It has been quite a few years since I first got acquainted with Linux. When I was still in primary school I remember getting an old desktop PC which definitely would not run Windows XP, so I got my hands on a Slackware Linux ISO and managed to get it up and running. I didn’t…
Calling C code from Python
The majority of all firmware is written in C (or C++), but for writing small utility and automation scripts on the host machine, Python is usually the go-to language. I was recently presented with the problem of running some of our firmware algorithms on a set of pre-recorded data, as part of our suite of automation scripts written in Python. Instead of translating the C code to Python – which could quickly become a maintenance nightmare – I opted for creating an interface so the C code could be called directly from a Python script. Luckily, Python has plenty of support for this.
Quick and simple digital filters for smoothing and DC removal
When you are working on an embedded system and sampling data from a sensor, sometimes you just need a quick and simple low-pass filter to smooth out a noisy signal or a high-pass filter to remove a (perhaps slightly varying) DC offset. If you are not particularly concerned about the exact characteristics of the filter response (such as cutoff frequency, stop-band attenuation, pass-band ripple, etc.) but just need something that is halfway decent and can be implemented quickly, then you might find the following two filters interesting.
Creating a Python command line tool
In my daily work I occasionally find myself doing a manual task that could be easily handled with a simple script. This could be things like logging data from a device (e.g. over UART) and saving it to a file, setting or getting configuration values from a device and plotting data from a file are…
STM32 without CubeIDE (Part 2): CMSIS, make and clock configuration
In part 1 we did the absolute minimal setup necessary to program our MCU. We manually defined the addresses of peripheral registers and invoked the compiler and debugger directly from the command line with a rather long list of arguments. In this post we are going to make things a bit easier for ourselves. In…
STM32 without CubeIDE (Part 1): The bare necessities
Ever since I started programming microcontrollers, I have almost exclusively done so using a vendor-provided (usually Eclipse-based) IDE, which does a lot of stuff automagically behind the scenes. But since I like to know how stuff works I figured I would ditch the IDE and try starting from scratch. In this blog post series I am going to go back to basics and explore how to program an STM32 microcontroller, starting as simple as possible and then gradually adding more and more stuff along the way. In this first post I am going to start off with nothing more than an editor and the command-line.
Project Smart Greenhouse (Part 2): Data collection with ESP32
In part 1 I presented the general idea for the Smart Greenhouse. In this part I am going to get my ESP32 development board up and running and start logging some data to an online database.