How Proficient Should You Be in C Language for Embedded Systems?

How Proficient Should You Be in C Language for Embedded Systems?

Word Count: 1700 Content Quality Index: ⭐⭐⭐⭐⭐

1
Point of View 1

Just like learning English, the C language is also a language. C is quite simple, with only 34 keywords (ANSI standard, but C99 introduces several new keywords and features to define new data types, variable-length arrays, etc.), over 40 operators, and an understanding of basic data types, as well as the three basic structures of sequence, branching, and looping. That’s all you need. Generally, after about a week of study, you can grasp these concepts.

However, having mastered these does not mean you are proficient in C or can use it for programming fluently. It’s impossible. Just like mastering the six tenses of English and various clause structures, you still cannot write ‘Harry Potter’ or compose a good English essay.

English grammar is straightforward, but what you need to further learn is how to use English as a tool to understand the culture, history, legal politics, and the thinking of Westerners. Otherwise, you will not understand some of the “jokes” that Westerners make, and you cannot be considered to have mastered authentic English.

Learning C is similar, especially for embedded systems engineers. We need to learn not only the basic syntax of C but more importantly, how to use C as a tool to understand our computer systems and CPU architecture:

1) How are programs compiled, linked, and executed?

2) How are various code segments, data segments, BSS segments, and the stack distributed and managed in memory during runtime?

3) What are the differences in programs across different platforms (ARM, X86), bare-metal environments, or OS environments (Linux, uC/OS, etc.)?

4) What are the differences between static and dynamic linking processes, and why use dynamic linking? Shared libraries?

5) What are the differences in C programming across various development platforms, IDEs, and compilers, and how can we achieve cross-platform compatibility, enhance program portability, and robustness?

6) What are the essence of variable names, function names, array names, and pointers? How does the compiler handle them?

Understanding the computer system knowledge behind these languages is still not enough; you also need to learn operating system-related knowledge: processes, threads, interrupts, and memory management.

For embedded development, you also need to learn about processor architectures like ARM, the various extensions of the GCC compiler to the C standard, and various obscure usages. Otherwise, when you read Linux kernel code or driver code, you might feel “strange,” as if something is off, and it doesn’t quite match the C you usually learn, making you feel like you are learning a fake version of C…

The essence of C lies in memory and storage management. Many hidden bugs are deeply related to memory: memory overflow, memory leaks, dangling pointers, etc. A careless mistake can lead to serious issues.

Even engineers with years of experience cannot guarantee that their code is free of problems. C language assumes that everyone is a pro or a computer expert, but the reality often has too many pitfalls and many teammates who are like pigs. Cultivating good programming habits and avoiding various bugs is also a key focus of advanced learning in C.

2
Point of View 2

First, it is important to know that for embedded learning,C language is just a small part of the content, but it is a very important part.

Actually, embedded software, especially embedded low-level driver development, can be described with a classic saying regarding the amount and value of code written:

If writing an embedded driver requires a total of 100 lines, the value of those 100 lines of code might only be 1 dollar, while understanding how to write them is worth 99 dollars.

Embedded development, especially low-level driver development, does not usually involve a large amount of code (especially compared to higher-level software), but you must understand the underlying logic, protocols, interfaces, frameworks, and platforms to write the code.

Understanding the underlying logic is often the difficult and key part.

Therefore, it cannot simply be said that you need to understand how to read complex programs; rather, it is that while the code volume may not be much, the software and hardware knowledge, system knowledge, and framework knowledge involved behind a few lines of code are the most complex.

In summary: Embedded development requires background knowledge:

  • Industry background knowledge

  • Operating systems, platforms

  • Driver frameworks on platforms

  • Specific implementation details of drivers

  • Understanding the device manual to configure operations

And much more, it’s quite diverse.

On the premise of understanding all these, the requirements for C language itself are not high; you only need some coding experience and to understand C syntax to write and modify code.

In short:

  • Understanding how to write accounts for about 70% of the technical weight;

  • While writing (high-quality) C language code might only account for around 30% of the technical weight.

The importance of C language in embedded learning is self-evident, but many people face the problem of knowing it’s important but not knowing where to start. I will share a learning outline that everyone can refer to 👇
How Proficient Should You Be in C Language for Embedded Systems?

Small Benefits

1

Smart Classroom Project Course with Source Code

2

Acquisition Method: Reply 【Team Up】 in the background

How Proficient Should You Be in C Language for Embedded Systems?

1

How to Succeed in Embedded, MCU, ARM, DSP: A Heartfelt Guide…

2

This is Too Much Work! This Note on C Language Basics is Enough…

3

A Must-Read for Microcontrollers | 2500 Words on How to “Feed the Dog”…

How Proficient Should You Be in C Language for Embedded Systems?

How Proficient Should You Be in C Language for Embedded Systems?

This Week’s Live Broadcast | Click to View👇

How Proficient Should You Be in C Language for Embedded Systems?

Tuesday | 1 Hour to Understand the Networking Protocol

1. Is the networking process in Bluetooth mesh a first-time experience?

2. What are the five stages of networking?

3. Why do we need a networking protocol?

4. What commonalities exist in wireless networking?

How Proficient Should You Be in C Language for Embedded Systems?

Tuesday | How to Write C Language in Daily Life

1. How to turn problem requirements into code?

2. How to debug and resolve code errors?

3. How to program to make the code more efficient?

How Proficient Should You Be in C Language for Embedded Systems?

Every day, hardworking Xiaochuang,

[Share, Like, Watch] Can I have a duck?

Leave a Comment