Basics of Makefile

Basics of Makefile

Lost Little Scholar Reading takes 4 minutes Speed reading only takes 2 minutes 1 Introduction The following C language code is very simple #include <stdio.h> int main(){ printf("Hello World!. "); return 0;} In Linux, we can compile it using the following command gcc hello.c -o hello However, as the project grows, there will inevitably be … Read more

Introduction and Rules of Makefile

Introduction and Rules of Makefile

Click the above “Baijun Technology“, select “Top Public Account” Embedded essentials, delivered promptly ARM bare-metal phase 1 enhanced video course accompanying WiKi lesson 9, section 5: Introduction and Rules of Makefile. Text cannot completely replace video, so if you find these articles hard to understand, it is recommended to purchase the video for further learning. … Read more

A Simple Introduction to Makefile

A Simple Introduction to Makefile

Click the above “Linux Community” to subscribe! 1. Introduction The make command requires a Makefile to tell it how to compile and link the program (simply put: it manages the project files and determines which files to compile first and in what order). 2. Writing Rules: Target1: Dependencies Then press Enter + Tab key Command; … Read more

Simple Usage of Makefile and GDB

Simple Usage of Makefile and GDB

1. Why Use Makefile for Compiling Multiple .C Files: (1). Generally, when we are developing a project, we will create a project with many directories, and each directory contains many .C files, which requires joint compilation. (2). If we compile manually, the multiple program files are intertwined, leading to dependencies and dependent relationships between different … Read more

Introduction to Writing Makefiles

Introduction to Writing Makefiles

Writing Makefiles 1. Introduction to make and Makefile 1.1 The make Tool The <span>make</span> tool can automatically complete compilation tasks. These tasks include: If only a few source files have been modified, only recompile those specific source files; If a header file is modified, recompile all source files that include that header file. This automatic … Read more

Adding Linux Applications in Yocto for Xinxing X9HP PTG4.1

Adding Linux Applications in Yocto for Xinxing X9HP PTG4.1

Click the blue text to follow us 1. Reference Example and Add Application 1.1 Reference Example (1) Check the built-in serial port test example uart_test and see how the bb file is written. 1.2 Add printf-test Application (1) In the yocto/meta-semidrive/recipes-bsp/ directory, copy the built-in example uart-test and rename it to printf-test. (2) The printf-test/ … Read more

Getting Started with CMake for Large Projects

Getting Started with CMake for Large Projects

Most open-source storage systems are built on the Linux operating system. This article introduces storage technology while also covering some Linux content, focusing on practicality. It will be helpful for both application development and kernel understanding. When our project consists of thousands of files, manually writing a Makefile will be a nightmare. Fortunately, CMake helps … Read more

CMake Tutorial: Supporting GDB Debugging

CMake Tutorial: Supporting GDB Debugging

Table of Contents 1. Introduction 2. How to Support GDB Debugging 3. Code Examples [1] Write demo.c [2] Write CMakeLists.txt [3] Compile [4] GDB Debugging 1. Introduction The combination of CMake and GDB indeed makes the development work of C or C++ easier, enabling cross-platform project builds and source-level debugging. This article details how to … Read more