wolfIP: A TCP/IP Stack Designed for Resource-Constrained Embedded Systems

wolfIP: A TCP/IP Stack Designed for Resource-Constrained Embedded Systems

What is wolfIP? Despite its somewhat awkward name, it is a TCP/IP stack specifically designed for resource-constrained embedded systems. The core selling point is no dynamic memory allocation—the entire heap does not use malloc, and all buffers are fixed at compile time. Imagine your MCU has only a few hundred KB of RAM; a typical … Read more

Comprehensive Analysis of C++ Smart Pointer shared_ptr: From Principles to Practical Guide

Comprehensive Analysis of C++ Smart Pointer shared_ptr: From Principles to Practical Guide

1. Overview and Core Features <span>std::shared_ptr</span> is a smart pointer introduced in the C++11 standard library that implements the concept of shared ownership and automatically manages dynamically allocated memory resources through a reference counting mechanism. Compared to traditional raw pointers, <span>shared_ptr</span> significantly reduces the risks of memory leaks and dangling pointers, making it an indispensable … Read more

Exploring C Language Pointers (Part 6)

Exploring C Language Pointers (Part 6)

In the previous articles, we mainly covered pointer algorithms, pointer arrays and array pointers, function pointers, void generic pointers, and linked lists. This article serves as a supplement, adding some common usage patterns and precautions for C pointers. 1. Pointer Swapping: An Efficient Way to Exchange Values By directly manipulating memory addresses through pointers, we … Read more

Essential Knowledge Points for C Language Beginners: A Comprehensive Summary of Pointers

Essential Knowledge Points for C Language Beginners: A Comprehensive Summary of Pointers

“From today onwards, study hard and make progress every day” Repetition is the best method for memory; spend one minute each day to remember the basics of C language. “C Language Beginner’s Essential Knowledge Points Note Series 100”“ The following notes finally enter the practical series, which is also the most important and difficult part … Read more

Practical Optimization Techniques in Embedded Development

Practical Optimization Techniques in Embedded Development

Source | Embedded Miscellaneous In embedded development, resources are always scarce. Insufficient memory, slow execution speed, high power consumption… do these issues often trouble you? Today, I will share several code optimization techniques that have been validated in practice! 1. Time Efficiency Optimization Avoid Floating Point Operations // Slow version: floating point operation float calculate_voltage(int … Read more

C++ Smart Pointer unique_ptr: A Powerful Tool for Modern Memory Management

C++ Smart Pointer unique_ptr: A Powerful Tool for Modern Memory Management

What is unique_ptr? <span>std::unique_ptr</span> is one of the smart pointers introduced in the C++11 standard, used for managing dynamically allocated memory resources, implementing the concept of exclusive ownership. This means that at any given time, there can only be one <span>unique_ptr</span> pointing to a specific object, and when that <span>unique_ptr</span> goes out of scope or … Read more

C++ Strings: Transitioning from C-Style to String Class

C++ Strings: Transitioning from C-Style to String Class

Strings are ubiquitous elements in C++ development, essential for everything from user input to network transmission. While strings may seem simple, they are fraught with numerous details and pitfalls that can easily catch developers off guard.Issues like buffer overflows and memory leaks can be extremely difficult to diagnose once they occur, often arising from inadvertent … Read more

Comparative Analysis of C++ and C# in Embedded Development

Comparative Analysis of C++ and C# in Embedded Development

C++ and C#C++ and C# are widely used programming languages, but they have different design goals and application scenarios. C++ is a low-level, high-performance system programming language that emphasizes manual memory management and multi-paradigm support; C#, on the other hand, is a high-level, object-oriented language developed by Microsoft, primarily used for application development within the … Read more

Flexible Arrays vs Pointers in C Language

Flexible Arrays vs Pointers in C Language

Click the blue “One Bite Linux” in the upper left corner, and select “Set as Favorite“ Get the latest technical articles first ☞【Technical Content】Learning Path for Embedded Driver Engineers ☞【Technical Content】Linux Embedded Knowledge Points – Mind Map – Free Access ☞【Employment】A Comprehensive Project Based on Linux IoT for Your Resume ☞【Employment】Resume Template Introducing a knowledge … Read more

Building an Embedded Modbus Protocol Stack with 2000 Lines of Code!

Building an Embedded Modbus Protocol Stack with 2000 Lines of Code!

Follow our official account to keep receiving embedded knowledge! Introduction In the development of industrial automation and IoT devices, the Modbus protocol has become the preferred choice for embedded system communication due to its simplicity and reliability. However, traditional Modbus protocol stacks are often large, with tens of thousands of lines of code, making them … Read more