Understanding the Debugging Tool – GDB

Understanding the Debugging Tool - GDB

Advertising Time Click the card below and give us a follow before you go! 1. Introduction to GDB GDB (GNU Debugger) is a powerful open-source debugging tool that helps developers debug programs written in languages such as C/C++. Mastering the basic usage of GDB is very beneficial for both beginners and experienced programmers. This article … Read more

How Makefile Compiles Code Files

How Makefile Compiles Code Files

This article summarizes: This article mainly introduces the process of using Makefile to compile code into executable binary files for microcontrollers and discusses commonly used Makefile syntax. It narrates the transformation from a straightforward Makefile to a more universal Makefile. Introduction to Makefile The most common function of a Makefile is to inform the make … Read more

STM32 Bare Metal Programming 04 – Makefile Automation

STM32 Bare Metal Programming 04 - Makefile Automation

Makefile: Build Automation We can use the make command line tool instead of manually typing in “compile”, “link”, and “flash” commands, automating the entire process. The make tool uses a configuration file called Makefile to read the instructions for executing actions. This automation is great because it also documents the process of building firmware and … Read more

An Overview of Makefile, Kconfig, and .config in the Kernel

An Overview of Makefile, Kconfig, and .config in the Kernel

The Linux kernel source code is extensive, and it can be confusing to understand the relationship between Makefile, Kconfig, and .config. Not knowing how the kernel compilation system works can lead to issues when trying to modify the kernel, integrate your own drivers, or configure the kernel. These problems are all related to Makefile, Kconfig, … Read more

Understanding Makefile, Kconfig, and .config Files

Understanding Makefile, Kconfig, and .config Files

1 We want to add a program (such as a driver) to the kernel and ensure that this driver can be compiled into the kernel, which is fundamentally divided into two main parts. First, we need to tell the kernel, “Please include me in the next compilation,” which requires us to configure the kernel appropriately. … Read more

A Universal Makefile Template for Various Scenarios

A Universal Makefile Template for Various Scenarios

1. Introduction For development on Windows, many IDEs come with integrated compilers, such as Visual Studio, providing a “one-click compile” feature. After coding, you only need one operation to compile, link, and generate the target file. Linux development is different from Windows; typically, the gcc/g++ compiler is used on Linux. If you are developing Linux … Read more

Linux C Basics: Have You Met the Makefile Master?

Linux C Basics: Have You Met the Makefile Master?

Introduction to Make: Project Manager, as the name suggests, refers to managing multiple files The Make project manager is essentially an “automated compilation manager“. Here, “automated” means it can automatically detect updated files based on file timestamps to reduce compilation workload. It performs a large amount of compilation work by reading the contents of the … Read more

How to Write an Impressive Makefile from Version 1 to Version 5

How to Write an Impressive Makefile from Version 1 to Version 5

1. The Three Essential Elements of Makefile 2. Working Principle 3. Start Writing First, let’s write our program, taking C language as an example. 1) func.h Define two functions: addition and subtraction: 2) Implementation of the Addition Function 3) Implementation of the Subtraction Function 4) main function 3.1 Version 1 The most basic version: just … Read more