How to Learn Embedded Systems? Steps for Learning Embedded Linux.

How to Learn Embedded Systems? Steps for Learning Embedded Linux.

Master C Language!

Master C Language!

Master C Language!

Important things are said three times!

How to Learn Embedded Systems? Steps for Learning Embedded Linux.

If you are a university student, please also learn the following courses: Data Structures, Computer Principles (including Assembly), Compiler Principles, Operating Systems.

How to Learn Embedded Systems? Steps for Learning Embedded Linux.

First do the above, don’t rush! To be a good embedded engineer, stay away from impatience!

If you seriously think you have learned enough, consider the following questions: Can you write a linked list by yourself without referencing any code? How about tree traversal? How to implement the shortest path in a graph? Can you write a small preemptive kernel by yourself? How to implement syntax analysis and lexical analysis in C?

PS: The above four courses are essential for embedded experts!

How to Learn Embedded Systems? Steps for Learning Embedded Linux.

Then you can start working with a development board. Just a point: start with bare metal (please repeat this sentence three times).

The earlier you get in touch with Linux, the better; the more familiar you are with commands, the better; the more dazzling your vim operations, the better…

Let’s talk about microcontrollers first! Some say the 51 series is outdated, but I think it’s not a bad idea for beginners to start with. You can buy a board on X treasure or directly use Proteus for simulation. Decide based on your budget. Understand what IO, serial communication, interrupts, etc. are. It’s best to write an IIC and SPI driver using IO pins in a simulated timing manner. Don’t spend too much time on the 51; for beginners, about a month should suffice (assuming you have learned the basics I mentioned above, depending on your learning ability).

Then you can learn about MCUs or processors.

ARM is recommended.

ARM is recommended.

ARM is recommended, because if you use other architectures, you will find that there are very few boards available on X treasure, and they are also expensive.

How to Learn Embedded Systems? Steps for Learning Embedded Linux.

Start with bare metal programming, just like with the 51, starting from lighting up an LED. Please note: it’s best not to dive in and try to cover all modules at once, as that can be time-consuming (not a waste, but the effectiveness may not be the best).

Learning bare metal programming is essentially learning CPU programming concepts, because you will definitely not just use one type of CPU in the future. How to control pins and configure registers may vary from CPU to CPU. What you need to learn is this method, this principle. Ah!!! I don’t know how to express it, forgive me… I guarantee that you will be able to easily drive a new MCU you get in the future. It’s not that you are proficient with one model, but when you switch to another, you are at a loss!

As mentioned above, first understand the resources of the CPU itself! IO, interrupts (which are very important in microcontroller programming), UART, memory addressing methods, etc. If possible, learn its assembly language. If you have also learned assembly, great! Please write a time-slice scheduler based on this MCU, not too complex, just running a multitasking program will do. (The focus here is not on writing the scheduler, but on the various stack operations involved, context saving and restoring, which will involve a lot of assembly and you will learn a lot.)

Then do some experiments based on peripheral devices; I won’t elaborate on this, but you will encounter something: datasheets. If your English is not good, it can be a headache. Here’s a small suggestion: if it’s really painful, taking some painkillers before reading might help.Then, based on the resources of the board, you can explore things like DAC/ADC, audio, LCD screens, buttons, clock chips, etc.!

Lastly, regarding microcontrollers: if you play with microcontrollers, you must buy a development board!!!! If you don’t play with microcontrollers, don’t buy a development board!!

Now let’s talk about learning Linux.

How to Learn Embedded Systems? Steps for Learning Embedded Linux.About Commands

Of course, the more you know, the better; the more familiar you are, the better. But first, never practice commands just for the sake of practicing commands: search for common Linux commands and get a bunch of results, then just type them out! Boring! Low efficiency! Easy to forget! My suggestion is to learn from usage. For example, if you want to configure Samba, you need to install Samba: yum, apt-get, or make install, and you will learn the installation commands and their usage. To close the firewall, you need to learn sudo service iptables stop. If you are motivated, you will definitely want to know not just that this command closes the firewall, but also the meaning and usage of each word… good job!! By the end of this process, you will have learned a lot and feel great!! Linux can do many things, and you can learn a lot from it!

How to Learn Embedded Systems? Steps for Learning Embedded Linux.About System Programming

I do not recommend diving straight into APUE, because if your foundation is weak, you may not understand some parts, which can dampen your interest. Linux system programming is essentially about function calls, IO, processes, threads, IPC (inter-process communication), network programming, and possibly UI. Many Chinese authors write technical books that are largely copied, but they have one big ‘advantage’: they are not too profound. I don’t know if they are easy to understand, but they are simple enough, which is exactly what many beginners need: a quick understanding of what Linux programming is and how to write a simple program, like a file copy program (think about it, how many times have you gone through a lot of theory but still couldn’t write a program? Isn’t it clear what the function does, but you don’t know how to call it? The series from entry to mastery is just right for solving this problem; it’s like a Chinese man page with examples, explaining parameters, return values, and then providing an example…). You can find such books in a large bookstore, look in the computer section, and either read them in the store or buy them. Quickly understand what Linux programming is. Then, looking at books like APUE will be much easier. Of course, if your foundation is solid, you can ignore the above content. Additionally, frequently try writing system commands: ls, cd, cp, etc., and often check the man pages.

How to Learn Embedded Systems? Steps for Learning Embedded Linux.About Drivers

Drivers are a very profound topic. I have only recently started working with drivers and don’t have much authority to speak, but I still want to say a few words. When learning drivers, don’t just limit yourself to the driver framework; you must understand the implementation principles of each function. For example, if you add a poll function to a driver, don’t just know that writing it this way can implement poll; you should also understand its principles!! You need to look into the kernel to see how it is called step by step and what happens in between! Learning drivers requires looking at the kernel source code more! Understand the kernel subsystems!

How to Learn Embedded Systems? Steps for Learning Embedded Linux.About Vim

As I said, the more dazzling your operations, the better! Please Google its configuration methods! Here are a few common plugins: ctags, cscope, clang, wm, and many more! Please Google them! Don’t use Baidu!!

Vim is a powerful tool! Its functionality is on par with any IDE like Source Insight! Anyone who uses it knows! Have you noticed all the ‘!’ I’ve used here?!

About Microcontrollers

1: Do you need to learn microcontrollers to learn embedded systems?2: Do you need to learn assembly language to learn microcontrollers?3: Can you learn embedded systems without microcontroller experience?

For the first two questions, my answer is: Yes, you need to learn. Why? Because having more skills is never a disadvantage. Microcontrollers are very fun; you can DIY many things that you wanted to buy as a child but your parents wouldn’t let you. Also, most embedded experts are proficient in both software and hardware, like my project director, who can provide great advice on PCB, drivers, and upper-layer applications. And microcontrollers are really not that difficult!

The importance of assembly language was mentioned at the beginning. You may never use it after learning, but after learning assembly and compiler principles, your ability to control and apply code will definitely improve significantly!

It sounds like I’m very proficient in compiler principles, but actually, I only have a superficial understanding. However, I will definitely make up for this course and try to arm myself with knowledge.

For the third question, my answer is: Yes, you can learn. And why not start with microcontrollers?

This article concludes.How to Learn Embedded Systems? Steps for Learning Embedded Linux.

Friendship Academy

Thanks to Mr. Crane for sharing his learning methods with everyone. Many people say that learning embedded systems is difficult to start, but every major has its challenges. However, with guidance and help from industry veterans, the learning time can be greatly shortened. Spending enough time to learn, think, research, and practice is a necessary process for getting started.I hope this article can provide some guidance and help to those learning embedded systems. There are 100 ways to learn; finding the one that suits you and following the necessary processes and thoughts of professional learning is the best choice.

Leave a Comment