Skip to content
Menu
Klein Embedded
  • About
Klein Embedded

Month: January 2023

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

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. john on STM32 without CubeIDE (Part 4): CMake, FPU and STM32 libraries
  2. Kristian Klein-Wengel on STM32 without CubeIDE (Part 2): CMSIS, make and clock configuration
  3. Nora on STM32 without CubeIDE (Part 2): CMSIS, make and clock configuration
  4. Kristian Klein-Wengel on STM32 without CubeIDE (Part 3): The C Standard Library and printf()
  5. Milos on STM32 without CubeIDE (Part 3): The C Standard Library and printf()

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
©2025 Klein Embedded