Dynamic Debugging in the Linux Kernel: A Powerful Tool for Runtime Debugging

Dynamic Debugging in the Linux Kernel: A Powerful Tool for Runtime Debugging

Introduction Previously, we discussed Linux Kernel Debugging: The Powerful printk (Part 2) Linux Kernel Debugging: The Powerful printk (Part 3) In those articles, we introduced pr_debug and dev_dbg. Below is the definition of dev_dbg: #if defined(CONFIG_DYNAMIC_DEBUG) || \ (defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE)) #define dev_dbg(dev, fmt, …) \ dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) #elif defined(DEBUG) #define dev_dbg(dev, fmt, …) … Read more

Detailed Explanation of LCD Driver in Embedded Linux Kernel

Detailed Explanation of LCD Driver in Embedded Linux Kernel

1 Application Layer Calls to LCD Driver Methods Open the corresponding device node app: open(“/dev/fb0”, …) Major device number: 29, Minor device number: 0 ————————————————————– kernel: fb_open // fbmem.c struct fb_info *info; info = get_fb_info(fbidx); if (info->fbops->fb_open) { res = info->fbops->fb_open(info,1); // Hardware-related driver if (res) module_put(info->fbops->owner); } Obtain variable information (including resolution, etc.) app: … Read more

Porting Real-Time Device Drivers to Linux Embedded Systems (Part 1)

Porting Real-Time Device Drivers to Linux Embedded Systems (Part 1)

Linux has stormed the embedded systems market. According to industrial analysts, approximately one-third to one-half of new 32-bit and 64-bit embedded system designs utilize Linux. Embedded Linux has demonstrated advantages in many application areas, such as SOHO home networks and imaging/multifunction peripherals, and has significant potential for leapfrog development in areas like (NAS/SAN) storage, home … Read more

Introduction to Linux

Introduction to Linux

The GNU Manifesto https://dpya.org/en/images/8/81/The_GNU_Manifesto_-_GNU_Project_-_Free_Software_Foundation.pdf https://www.gnu.org/gnu/manifesto.en.html Linux VS Windows Comparison Windows Linux Interface The interface is unified, and the shell program fixes all Windows program menus to be almost identical, with similar shortcut keys. The graphical interface style varies by distribution and may be incompatible. The terminal of GNU/Linux is inherited from UNIX, and the basic … Read more

Designing I2C Device Drivers for VxWorks 7

Designing I2C Device Drivers for VxWorks 7

1. Introduction The Inter-Integrated Circuit (I²C) is a widely used low-speed, two-wire communication protocol designed for communication between integrated circuits. In embedded systems, I²C is commonly used to connect sensors, EEPROMs, ADCs, and other peripherals. [VxWorks 7] introduces a modern, scalable, and modular driver framework built on VxBus, supporting dynamic driver registration, device tree integration, … Read more

Monitoring and Tuning the Linux Networking Stack: Receiving Data (1) – Network Device Initialization

Monitoring and Tuning the Linux Networking Stack: Receiving Data (1) - Network Device Initialization

Monitoring and Tuning the Linux Networking Stack: Receiving Data In Brief This blog post explains how computers running the Linux kernel receive packets and how to monitor and tune various components of the networking stack as packets flow from the network to user-space programs. Update: We have published a corresponding article: “Monitoring and Tuning the … Read more

Applications of C Language in Operating Systems

Applications of C Language in Operating Systems

Applications of C Language in Operating Systems The C language is a widely used computer programming language that has become an important tool for operating system development due to its ability to efficiently interface with hardware operations. This article will introduce several applications of C language in operating systems, including process management, memory management, and … Read more

Practical Development of Device Drivers Based on PLX PCIe Controllers in VxWorks 7

Practical Development of Device Drivers Based on PLX PCIe Controllers in VxWorks 7

Introduction In industrial control, data acquisition, and communication scenarios, PLX (acquired by Broadcom) PCIe controller chips are widely used. VxWorks 7, as the latest generation of real-time operating systems from Wind River, offers a more modern driver framework – VxBus 2.0. This article will share the complete process of developing PCIe device drivers in the … Read more

Insights into Linux Character Device Drivers

Insights into Linux Character Device Drivers

Hello, I am Lao Wu, continuing to document my learning insights. 1. Tips for Staying Focused Do the most important tasks in the morning. Stay in a distraction-free environment, such as a library. It’s completely normal to feel a bit of negativity before you start working. Make “happy moments” a part of your plan. Have … Read more

Applications of C Language in IoT: Device Drivers and Communication Protocols

Applications of C Language in IoT: Device Drivers and Communication Protocols

Applications of C Language in IoT: Device Drivers and Communication Protocols Introduction With the rapid development of the Internet of Things (IoT), the C language is widely used in the development of embedded systems and device drivers due to its efficiency and low resource consumption. This article aims to introduce basic users to how C … Read more