Skip to content
Menu
Klein Embedded
  • About
Klein Embedded

Category: Embedded C

October 24, 2025October 24, 2025

STM32 without CubeIDE (Part 4): CMake, FPU and STM32 libraries

In part 3 we integrated the reduced standard C library (newlib-nano) and set up printf()to output characters over UART. Up until now, we have built the project using make and we have configured the peripherals with direct register access. This works perfectly fine, but as our project grows, we may benefit from using a more…

Read More
April 30, 2023October 24, 2025

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.

Read More
January 31, 2023

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.

Read More
August 31, 2022

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.

Read More
March 29, 2022September 1, 2022

Unit testing in STM32CubeIDE with GoogleTest

Unit testing has become an essential part of developing high-quality, reliable and maintainable software, but is not as commonplace in the firmware industry as it ought to be. If you are tired of being slowed down by the “build-flash-debug” style of development, waiting for hardware or having to share hardware with several other coworkers, then off-target unit testing and test-driven development is for you!

Read More
February 26, 2022August 28, 2022

Interfaces in C

Interfaces are an extremely useful tool to develop loosely-coupled, testable software. In the embedded world it will even allow us to write firmware and run it on our development PC instead of the actual hardware, which may be scarce or not even produced yet.

Read More
January 8, 2022February 26, 2022

Multiple instances of a module in C

When writing modules for your application, sometimes it might be enough to have just a single instance of the module (e.g. a global “logging” module), but oftentimes you will need to create multiple instances of a module (e.g. a “queue” module). In this article I will take a look at various ways to implement this in C.

Read More
December 29, 2021August 28, 2022

The ‘volatile’ qualifier

When programming embedded systems in C, you will most likely have stumbled upon the volatile keyword in a variable declaration. But what does this actually mean – and when should you use it?

Read More

Subscribe to the newsletter

Get notified by email when a new blog post is published.

Check your inbox or spam folder to confirm your subscription.

Recent Posts

  • STM32 without CubeIDE (Part 4): CMake, FPU and STM32 libraries
  • Adding right-click context menu items in Windows 10
  • CI/CD with Jenkins and Docker
  • STM32 without CubeIDE (Part 3): The C Standard Library and printf()
  • Understanding the (Embedded) Linux boot process

Recent Comments

  1. Kristian Klein-Wengel on Developing and publishing a full-fledged Python package
  2. url on Developing and publishing a full-fledged Python package
  3. url on Developing and publishing a full-fledged Python package
  4. Fernando on STM32 without CubeIDE (Part 4): CMake, FPU and STM32 libraries
  5. john on STM32 without CubeIDE (Part 4): CMake, FPU and STM32 libraries

Archives

  • October 2025
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021

Categories

  • C++
  • DevOps
  • DSP
  • Electronics
  • Embedded C
  • Embedded Linux
  • Firmware
  • Project
  • Python
  • Software Design
  • Testing
  • Tutorial
  • Uncategorized
©2026 Klein Embedded