The Relationship Between Makefile, Kconfig, and .config in Linux Kernel

The Relationship Between Makefile, Kconfig, and .config in Linux Kernel

When compiling the Linux kernel, we often execute some commands in the top-level directory of the Linux kernel. Taking RK3288 as an example, commands such as: make firefly-rk3288-linux_defconfig, make menuconfig, make firefly-rk3288.img, make zImage, etc. are used. Without getting into the specifics of these commands, let’s raise a few questions. (1) Given the vastness of … Read more

Linux System Programming: Creating and Using Static Libraries

Click the above“Mechanical and Electronic Engineering Technology” to follow us In Linux system programming, a Static Library is a compiled code library that contains a collection of multiple compilation units (such as functions and data) that can be shared by multiple programs. Static libraries typically have the file extension .a. Creating a Static Library Compile … Read more

Debugging Information with DEBUG Print in IAR

Debugging Information with DEBUG Print in IAR

#include “stdafx.h” #include<stdio.h> #include<stdlib.h> #include<string.h> // Whether to enable DEBUG mode //#define _DEBUG_ 0 // Not enabled #define _DEBUG_ 1 // Enabled #if _DEBUG_ #define PRINTF(…) printf(__VA_ARGS__) #else #define PRINTF(…) #endif int main() { int a, b, c; b = 1; c = 2; a = b + c; PRINTF(“a = %d\n”, a); getchar(); return … Read more

Key Considerations for Mixed C and Assembly Programming in Keil

Key Considerations for Mixed C and Assembly Programming in Keil

Click the above “Chuangxue Electronics” to follow and easily learn electronic knowledge. Chuangxue Electronics Subscription Daily updates of technical articles in the electronics industry and the latest news on microcontrollers, learn easily anytime, anywhere. Here are some issues encountered in mixed programming of C language and assembly language in Keil, written down for future reference. … Read more

Simple Use of GCC to Compile C Files in Keil Projects

Simple Use of GCC to Compile C Files in Keil Projects

It must be said that Keil seems to be the most widely used IDE among domestic users. After being acquired by ARM, the introduction of the Keil MDK development environment with ARMCC and other compilers has been well received by many ARM development engineers. The large user base (many of whom have transitioned from the … Read more

Comprehensive Guide to Thread Classification

1. NPT is a general-purpose American standard tapered pipe thread with a thread angle of 60°. PT thread is a British standard tapered thread with a thread angle of 55°, commonly used for sealing. British pipe threads are fine threads; coarse threads have a larger thread depth, which severely reduces the strength of the external … Read more

Virtual Serial Port Driver in Linux (Part 1)

Virtual Serial Port Driver in Linux (Part 1)

Introduction Recently, I prepared to implement a virtual serial port driver in Linux; however, since graduation, I have been engaged in bare-metal driver development, and thus I have gradually forgotten about device drivers in Linux. To achieve this functionality, I have searched for a lot of information online, but most of it only explains the … Read more

History of C Language Development

History of C Language Development

History of C Language Development The world originally had no computers; engineers created them out of necessity for their work. To inform the normal operation of computers, engineers invented programming languages. As the C language exam approaches, are you feeling as frantic and furious as I am? Today, let’s learn about the history of C … Read more

Analysis of ARM Assembly and C/C++ Interoperability

Analysis of ARM Assembly and C/C++ Interoperability

Interoperability Between C Language and ARM Assembly Language 1. Accessing C Language Global Variables from Assembly Global variables can only be accessed indirectly through their addresses. To access global variables in C, you must first introduce the global variable using the extern directive, and then load its address into a register. For unsigned char type, … Read more