Let’s look at this C++ program: When you build it in Debug and in Release mode, then: Same code. Same compiler. Different result. What does it mean? The bug comes from the undefined behavior of the uninitialized variable x: x is declared, but never initialized and immediately used: At this…
cmake
Storing your ATTiny program in…EEPROM?
In this proof of concept, we will build a tiny interpreter for the ATtiny85 which executes instructions directly from EEPROM memory instead of FLASH. The goal is not to replace native firmware execution, but to experiment with compact instruction encoding and runtime programmability. Each instruction in this interpreter consists of…
Combining CMake with Docker
Welcome to the next pikoTutorial ! In one of the recent articles, I showed how to use CMake for setting up a Python project. Today, we will see how to further extend it by adding building of Docker images to the CMakeLists.txt files. Today’s project structure: Top CMakeLists.txt file Nothing…
Setting up a Python project with CMake
Welcome to the next pikoTutorial ! CMake is often associated only with C/C++ and occupies a high place in the ranking of the most hated tools. Today, I want to show an unusual, but interesting use case – setting up and running Python applications with CMake and its underlying generators.…
Make C++ a better place #0: Introduction
The world of software development is built on dreams of engineers who aspired to create their own programming languages.
Build & run C++ unit tests with CMake
Welcome to the next pikoTutorial! Building and running a single test file To present the easiest case, we need to assume some folder structure of our project: Here the easiest case means that we have only on library and only one test file for it. Firstly of all, we need…
How to dockerize a C++ application?
If you ever wanted to ensure a consistent environment for your application, you most probably know that containerization is the way to go.
Welcome to piko::tutorial!
Your best source of byte-sized programming knowledge! Inspired by the SI unit prefix “piko” (10^-12), our portal aims to deliver short software tutorials.