Introduction and Usage of Linux LCD Framebuffer

Introduction and Usage of Linux LCD Framebuffer

Today, let’s talk about the LCD Framebuffer in Linux, which is a powerful tool in embedded systems. Despite its fancy name, it’s actually very simple to use; it’s just a large array in memory that stores the color information of each pixel on the screen. What is a Framebuffer? In simple terms, a Framebuffer is … Read more

Linux C Programming: Process Control

Linux C Programming: Process Control

(1) Process Concept A process is a program that has been executed. It does not occupy disk space but consumes system memory, CPU resources, and each running process corresponds to its own virtual address space. (2) Concepts of Parallelism and Concurrency The CPU allocates a time slice to each process, and a process can run … Read more

Zephyr Kernel Data Structures – Singly Linked List

Zephyr Kernel Data Structures - Singly Linked List

Singly Linked List The Zephyr singly linked list is implemented in the following file: zephyr/include/zephyr/sys/slist.h. Zephyr stores singly linked list data in sys_slist_t (i.e., each list element stores a pointer to the next element, rather than the data of the previous element). /** @cond INTERNAL_HIDDEN */ struct _slist { sys_snode_t *head; sys_snode_t *tail; }; /** … Read more

Zephyr Kernel Data Structure – MPSC

Zephyr Kernel Data Structure - MPSC

Overview MPSC_PBUF (Multi Producer Single Consumer Packet Buffer) is a circular buffer where data in MPSC_PBUF is managed in packets, and the size of the packets is variable. Users read or store data from MPSC_PBUF in packet units. To reduce data copying in memory, data production is divided into two steps: allocating packet space and … Read more

Zephyr Kernel Data Structures – Red-Black Tree

Zephyr Kernel Data Structures - Red-Black Tree

Overview The search time complexity of a linked list is O(N). As the number of members managed by the linked list increases, the algorithmic cost of searching increases. To address this, Zephyr provides an implementation of a red-black tree, where the time complexity for search and delete operations is O(log2(N)) for a tree of size … Read more

Zephyr Kernel Data Structures – Ring Buffer

Zephyr Kernel Data Structures - Ring Buffer

Overview The ring buffer is one of the commonly used data structures in embedded software development, storing content in a first-in-first-out manner, and is used to implement asynchronous “stream” replication of data. Zephyr provides a struct ring_buf abstraction to manage such data structures. Various drivers in Zephyr (UART, Modem, I2S, etc.), as well as shell, … Read more

Embedded Weekly Report #275: Security-Critical C Code Rules

Embedded Weekly Report #275: Security-Critical C Code Rules

Note: 1. Thank you all for your attention, continuing to summarize last week’s wonderful content. 2. Last week, a video was shared: BSP Video Tutorial Episode 21: Easily Achieve Variable Length Serial Port DMA Send/Receive with One Click, Supporting Bare Metal and RTOS, Including Two Approaches: MDK and IAR, More Convenient Than CubeMX 0 Weekly … Read more

Modbus TCP Programming and Experimentation

Modbus TCP Programming and Experimentation

11.7 Modbus TCP Programming and Experimentation This course does not support sensors that use the Modbus TCP protocol, so we will write two programs: ① modbus_server_tcp.c: Simulate a Modbus TCP sensor ② modbus_client_tcp.c: Operate the sensor The program structure is shown in the figure below: No special connections are required on the hardware. The source … Read more

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