CMake: Installing a Project

CMake: Installing a Project

Introduction: This note will introduce some basic concepts through a small project, which will also be used in later notes. Installing files, libraries, and executables is a very basic task, but it can also bring some issues. This note demonstrates how to effectively avoid these problems using CMake. ✦ Project Structure ✦ ├── CMakeLists.txt ├── … Read more

CMake: Using Control Flow

CMake: Using Control Flow

Introduction: In previous examples, we have used if-else-endif. CMake also provides language tools for creating loops: foreach-endforeach and while-endwhile. Both can be combined with break to exit the loop early. This article also serves as the conclusion of the first chapter, marking our official entry into learning CMake. ✦ Project Structure ✦ . ├── cal_add.h … Read more

Introduction to CMake Basics and Usage

Introduction to CMake Basics and Usage

1. What is CMake? According to Baidu, CMake is a cross-platform installation (compilation) tool that can describe the installation (compilation process) of all platforms with simple statements. It can output various makefiles or project files. In simple terms, it is a tool that generates corresponding compilation scripts based on different platforms. 2. How to use … Read more

GCC Programming: An Overview of Languages and Libraries

GCC Programming: An Overview of Languages and Libraries

GCC programming refers to programming languages based on the GCC compiler. You can design programs in any language that GCC supports. As can be seen from the image above, GCC programming involves the integration of three major languages under the LINUX system: C, C++, and assembly (ASM). The C language involves differences between the standard … Read more

The Dance of Compilation: C/C++ and GCC Collaboration

The Dance of Compilation: C/C++ and GCC Collaboration

On the modern stage of computing, programming languages are like dancers, while compilers are the choreographers guiding them from behind the scenes. Every piece of code written is like a carefully designed dance. On this stage, C language and GCC (GNU Compiler Collection) are a classic duo. Together, they perform a magnificent dance of compilation, … Read more

What Are GCC and G++? Understanding Their Differences

What Are GCC and G++? Understanding Their Differences

Source: C Language Chinese Network Editor: strongerHuang As of September 2020, the GCC compiler has been updated to version 10.2, and its functionality has expanded from initially only compiling C language to now supporting multiple programming languages, including C++. In addition, the current GCC compiler also supports compiling programs in Go, Objective-C, Objective-C++, Fortran, Ada, … Read more

How to Install IAR Embedded Workbench for ARM 8.32.1

How to Install IAR Embedded Workbench for ARM 8.32.1

IAR for ARM is a top-tier integrated development environment, fully known as “IAR Embedded Workbench for ARM”. It is developed by the world-renowned Swedish company IAR Systems, which specializes in embedded systems development tools and services. Founded in 1983 and headquartered in Uppsala, Sweden, the company went public on NASDAQ OMX Stockholm on January 4, … Read more

Developing Simple Device Drivers with C++

Developing Simple Device Drivers with C++

1. The Powerful Advantages of C++ in Driver Development In the field of device driver development, C++ is a “powerful tool.” It inherits the precise control capabilities of C language over low-level hardware, allowing it to directly “communicate” with hardware, manage memory meticulously, and precisely control processor resources. This is crucial for device drivers that … Read more

C++ Exception Handling: Tips for Optimizing RAII and Resource Management

C++ Exception Handling: Tips for Optimizing RAII and Resource Management

C++ exception handling is one of the important features for improving program robustness and maintainability. In C++, resource management is closely related to exception handling, especially in ensuring that resources are correctly released in the event of an exception. In this regard, RAII (Resource Acquisition Is Initialization) is a very important design pattern that uses … Read more