Summary of Setting Up CMake Build Environment

Summary of Setting Up CMake Build Environment

Summary of Setting Up CMake Build Environment Table of Contents Introduction Getting Started Example: Single Source File Project Compilation Multiple Source Files Other Usages Setting Local Variables Setting Custom Global Variables Getting Custom Global Variables Specifying Target (bin/library) Output Path Setting Environment Variables Getting Environment Variables Setting Compiler Setting Dependency Library Path Including Header File … Read more

Compiling Programs Using CMake

Compiling Programs Using CMake

When we usually use CMake, it is mainly on x86 or x86_64 platforms. Let’s see how to compile programs using CMake. 1. Linux-x86 Environment Build a simple project according to the structure below. The content of Gun.h is as follows: #pragmaonce #include class Gun { private: int bullet_count; std::string type; public: Gun(std::string type) { this-> … Read more

Cross Compilation Techniques for Embedded Systems Based on Buildroot

Cross Compilation Techniques for Embedded Systems Based on Buildroot

1. Introduction Nowadays, IOT device security research needs to address products with different architectures. Given that compiling for different architectures is a skill that practitioners need to master. The mainstream device architectures today mainly include x86_64, arm, and mips. The compilation for different instruction sets and how to handle errors is also the topic discussed … Read more

Cross-Compile ARM Architecture Browser on Deepin Linux

Cross-Compile ARM Architecture Browser on Deepin Linux

With the gradual development of domestic information technology systems, more and more devices are adopting non-x86 architecture CPUs, such as ARM, Loongson, Shenwei, and RISC-V. Among them, the ARM architecture has the highest market share, with major manufacturers including Phytium and Huawei Kirin. When developing software for these domestic systems, it is often necessary to … Read more

Porting U-Boot: Concepts and Practices on RK3399

Porting U-Boot: Concepts and Practices on RK3399

0. Background Introduction The RK3399 development board we have comes with U-Boot version 2017.09 from the factory. U-Boot 2017.09 (Sep 26 2021 – 08:53:15 +0000) Model: Forlinx OK3399 Evaluation Board PreSerial: 2 DRAM: 2 GiB Sysmem: init Relocation Offset is: 7dbe9000 Using default environment Based on this, we are porting a new version of U-Boot, … Read more

An Open Source Practical ‘Operating System Development Textbook’: Raspberry Pi OS

An Open Source Practical 'Operating System Development Textbook': Raspberry Pi OS

Recently, I’ve seen many friends asking, “I want to learn operating system development, but it’s so hard to get started!” Don’t worry, today I want to recommend a fantastic project—Raspberry Pi OS. It allows you to deeply understand the Linux kernel while getting hands-on experience with a “Hello, world!” on the Raspberry Pi. Let’s discuss … Read more

Linux MySQL Installation Tutorial

Linux MySQL Installation Tutorial

Ubuntu, OpenWRT, Debian,OpenKyline has a package manager that allows for direct online software installation. However, embedded operating systems, such as Buildroot, typically use cross-compilation to install software like the MySQL database.Most commonly used software actually has pre-compiled installation packages available, so customers do not need to recompile. Here, we take the MySQL database as an … Read more

Essential for Embedded Systems! Slimming Down the C Standard Library to Just a Few KB: Practical Notes on picolibc

Essential for Embedded Systems! Slimming Down the C Standard Library to Just a Few KB: Practical Notes on picolibc

In simple terms, picolibc is a C standard library (libc) tailored for small embedded devices. It combines the essence of newlib and AVR Libc, targeting systems with extremely limited memory—capable of running on a variety of architectures such as MSP430, RISC-V, ARM, ESP32, and MIPS. The focus is on being small, fast, and testable. Why … Read more

Sharing a Lightweight Command System for Embedded Systems: BusyBox

Sharing a Lightweight Command System for Embedded Systems: BusyBox

As we all know, embedded devices generally have limited storage and resources, which is why a command system for embedded devices called BusyBox has emerged. The characteristic of BusyBox is its powerful functionality while occupying a small storage capacity. Below, I will introduce how to download and compile BusyBox for your embedded device. Introduction to … Read more

CMake User Guide (Part 1): Common Techniques and Compilation Summary

CMake User Guide (Part 1): Common Techniques and Compilation Summary

In C/C++ projects, CMake has become the industry standard for build systems, and cross-compilation is a hurdle that every embedded developer will encounter. Simply put, it involves setting up a code compilation environment for Arm boards to run code on Arm devices. The commonly used compilation tools are Makefile and CMake, and this article records … Read more