nanoMODBUS: A Compact Modbus RTU/TCP Implementation with Only 2000 Lines of C Code

Hey, friends! Have you ever encountered the awkward situation of wanting to implement the Modbus protocol on a microcontroller, only to find that the library is too large, has too many dependencies, and fills up the Flash memory? Today, I want to recommend a “mini” level Modbus C library—nanoMODBUS, lightweight and easy to use! What … Read more

Understanding the Structure Initialization Syntax in Standard C

Understanding the Structure Initialization Syntax in Standard C

Note: Please indicate the source when reprinting, all rights reserved.This is based solely on my own understanding,and if it conflicts with your principles and ideas, please forgive me and do not criticize. Preliminary Notes   This article was published on 2015-12-29 19:22:14, and is now backed up and updated using MarkDown and image hosting. The original … Read more

Stop Using int and long! The Ultimate Practical Guide to Integer Types in C Language

Stop Using int and long! The Ultimate Practical Guide to Integer Types in C Language

Many students finish learning C language, with their minds filled with short, int, and long. But what if I told you that in today’s professional, especially cross-platform project development, directly using these types, especially long, is often a “suicidal act”? Would you be surprised? Don’t worry, in this article, we will thoroughly explain this issue … Read more

Copilot: A Runtime Verification Framework for Hard Real-Time Systems

Copilot: A Runtime Verification Framework for Hard Real-Time Systems

What is Copilot? Copilot is a runtime verification framework for hard real-time systems. You can write business logic in a high-level streaming DSL, and Copilot will translate it into C99 code, which can be directly integrated into your project. The generated monitors have constant memory and execution time, making it a boon for embedded systems … Read more

Flexible Array Members in C99

Flexible Array Members in C99

Actually, the title should omit C++. The flexible array is a feature introduced in C99. Introduction A Flexible Array Member (FAM) is a feature introduced in the C99 standard that allows the last member of a structure to be an array of unspecified size. This design is typically used to implement variable-length data structures, such … Read more

What Are the Differences Between the Two Classic Standards of C Language?

What Are the Differences Between the Two Classic Standards of C Language?

Follow+Star Public Account Number, don’t miss the wonderful content Editor | StrongerHuang WeChat Public Account | Embedded ColumnThe C language has been around for over 50 years, and it is a classic and commonly used programming language. Most universities require students to learn C language as part of their curriculum, and in the embedded field, … Read more

The History and Development of C Language: From Its Birth to Modern Evolution

The History and Development of C Language: From Its Birth to Modern Evolution

The History and Development of C Language: From Its Birth to Modern Evolution The C language is a general-purpose programming language widely used in system software and application development. It is known for its efficiency, flexibility, and portability. This article will detail the development history of the C language and provide code examples to help … Read more

Don’t Overlook the C Language Standards in Embedded Programming!

Don't Overlook the C Language Standards in Embedded Programming!

Recently, during a code review, I noticed that many colleagues’ coding practices were teetering on the edge of risk, with one of the most glaring issues being the arbitrary placement of local variable definitions. For seasoned C programmers, most have developed the habit of “defining variables at the beginning of a statement block”. I vaguely … Read more