Recently, I saw on CSDN that many people posted topics about the graduation season. Taking this opportunity, I also want to re-examine my own learning process, and share some learning experiences with myself and Da Niu. I hope to inspire and help everyone .
The main purpose of this article is to:
Provides an embedded learning road map
Provide learning advice at different stages
Recommend learning materials for different stages
More than 3,000 words, it took 1 week, it is recommended to collect; the code word is not easy, if it is helpful, generous three times
This article divides the embedded learning route into several aspects:
Embedded Basics Prerequisites
Small and beautiful RTOS
In this fast-paced era, it is not easy to calm down and read articles patiently.
2. Essential knowledge of embedded basics
Lao Tzu said: “The tree that embraces is born at the end of the millet; the nine-story platform starts from the base of the soil; the journey of a thousand miles begins with a single step.” The importance of the foundation is self-evident.
So for the embedded route, how to establish a solid foundation?
2.1. Learning content
C language basics
This part mainly includes several core knowledge points: three major grammatical structures, commonly used data types, functions, structures, pointers, file operations, etc.
In this part, the core knowledge points are: basic knowledge of circuits, basic knowledge of digital and analog electronics, commonly used electronic components, etc.
Core knowledge points: arrays, queues, linked lists, stacks, trees, graphs, hash tables, etc.
Core knowledge points: process management, memory management, file management, input and output management, etc.
Core knowledge points: data representation and calculation, storage system, instruction system, bus system, central processing unit, input and output system, etc.
2.2. Learning suggestions
For the basic learning of C language, we must focus on mastering it proficiently. The solid foundation directly determines the quality of our code.
For the basic learning of hardware, it is necessary to have a proper understanding, to be able to understand some simple circuit structures, and to know commonly used electronic components.
For data structure learning, the first five are necessary to learn. You may not feel the role at the beginning of learning, but when you come into contact with embedded underlying design and algorithm design, you will suddenly realize it.
For operating system learning, focus on learning its ideas, have a general understanding of relevant knowledge points, and continue to focus on learning after exposure to it. Whether it is RTOS or Linux, these are involved.
For the study of computer principles, it can be regarded as a detailed explanation of each module of the embedded system, which will give you an overall understanding of embedded systems, and each part is worth studying.
2.3. Learning materials
C Language Basics: Recommended Classic Book **”C Language Programming” (2nd Edition) Tan Haoqiang Edition**.
Hardware foundation: The knowledge involved in the book “Digital, Electronics and Analog Electronics” in the university is enough.
Data structure: Recommended classic book ** “Data Structure” – Yan Weimin Edition**.
Operating system, computer principles: I use the series of **”The King’s Way”**, and I personally feel good.
Computer composition, data structure, operating system, and database are must-read books for embedded or computer introductory books, and they are also included in college textbooks, which are the real basic knowledge.
You don’t have to read all of the above to experience the fun of programming. This foundation is a gradual process, and it can’t be completed overnight. You can have a general idea first, and when you do subsequent projects, you don’t know where to make up!
This involves an important learning method: project-oriented learning method.
3. Embedded Introduction – 51 MCU
After getting familiar with the above basic knowledge (C language foundation, computer composition, hardware foundation are necessary), we are ready to open the door to the embedded world.
For the introductory article, 51 microcontrollers are still recommended. Of course, some people will say, wouldn’t it be better to directly use STM32?
My opinion: It is recommended that novices should start with the 51 single-chip microcomputer, because the STM32 architecture is much larger than the 51, and it may not be easy for novices to adapt at the beginning.
3.1. Learning content
This part, mainly in the minimal embedded system, implements various interesting experiments. Through the study of 51 single-chip microcomputer, we have to do:
The main knowledge points are: understanding single-chip microcomputer, familiar with logic operation, lighting an LED light, key detection, serial communication, timer, interrupt, etc.
The main knowledge points are: understanding of resistor components, understanding of basic module circuits, clock circuits, trying to draw 51 single-chip schematic diagrams and PCBs
3.2. Learning suggestions
For the software category, we mainly do: know the single-chip microcomputer, be familiar with the input and output operations of the GPIO of the single-chip microcomputer, master the serial communication protocol, etc. These parts are necessary skills for any embedded device.
For the hardware category: we mainly do: be able to understand circuit diagrams, be familiar with the design circuits of some simple modules, and understand how to use Altium Designer.
3.3. Learning materials
51 single-chip microcomputer: Guo Tianxiang’s 51 single-chip microcomputer tutorial, a classic, enduring, highly recommended.
Zhuangzi said: “If the accumulation of water is not thick, it will be weak to carry a big boat.”
This part is the cornerstone of the embedded field. Only by laying a solid foundation can we afford the Linux Titan.
4. STM32 Advanced
STM32 is an advanced version of C51. With the basic knowledge of C51, developing STM32 will be handy.
Compared with C51, the system architecture and hardware design of STM32 have increased by one dimension, which is why I recommend getting started with C51.
Based on the STM32F407 platform, learn some of the current mainstream embedded technologies, explore the underlying principles, and achieve different platforms, all of which can be handy.
4.1. Learning content
This part, the main practice: lighting LED lights, GPIO input and output operations, interrupt operations, UART communication, IIC communication, etc.
This part, the main exercises: DMA communication, SPI communication, CAN communication, LCD display, ADC, etc.
This part mainly learns: STM32 clock architecture, bus architecture, power management, code framework, SDIO communication, USB communication, etc.
4.2. Learning Suggestions
For basic exercises, the main purpose is to facilitate the transition from C51 to STM32 environment.
For advanced exercises, we mainly practice some communication-related protocols, which can be developed in combination with some sensors.
For advanced exercises, the main purpose is to familiarize yourself with the design architecture of microcontrollers, programming frameworks, and some more complex communication technologies.
In addition, STM32 will have two versions of registers and library functions. It is recommended to cross-learn and understand more deeply.
4.3. Learning materials
STM32 MCU: STM32F103 or STM32F407 series of punctual atom and wildfire are recommended.
The learning materials of both are very rich, including detailed documentation and complete learning video tutorials, which are very suitable for beginners to learn.
As the saying goes: “If there is a way but no skills, skills can still be sought, but if there are skills but no ways, stop at skills.” To understand the difference between Taoism and art, don’t put the cart before the horse.
5. Small and beautiful RTOS
RTOS, real-time operating system, can be understood as a bridge between STM32 and Linux. Since most of its implementation ideas are taken from Linux, it is also called a simplified version of Linux.
The real-time operating systems we commonly use are: UCOS, VxWork, FreeRtos, and RT-Thread has also sprung up in recent years.
Learning these simple embedded systems can help us lay the foundation for learning the Linux operating system, and it can also broaden our career path.
As mentioned earlier, whether it is UCOS, FreeRtos, or Rt-thread, the internal design ideas are similar. The following mainly uses Ucos as an example.
5.1. Learning content
real-time system learning
In this part, the main study is: transplanting Ucos system, multi-task management, scheduling algorithm, message queue, semaphore mutex, event, memory management, etc.
5.2. Learning Suggestions
For real-time system learning, in addition to the above-mentioned core knowledge points, it is also necessary to combine 2.1 Basic knowledge of operating system books to deepen understanding.
5.3. Learning materials
RTOS learning: punctual atom and wildfire are still recommended, because the development of these real-time operating systems can be based on the STM32 development board, and there are also very detailed documents and video teaching.
After learning RTOS, half of the basic embedded technology has been mastered. You can also complete some small projects independently, and you can also find a good job, but you must not be self-satisfied. If you have the opportunity, you must get in touch with Linux.
Still the same sentence: ARM+Linux is also the most complicated thing. If you don’t get in touch with Linux, you will never know the charm of embedded.
Linux development is further divided into driver development, kernel development, and application development. Each direction requires years or even decades of accumulation.
As beginners, what we have to do is to have a macro understanding, expand our knowledge, and then choose the aspects we are interested in.
6.1. Learning content
This part mainly learns: Linux common commands, VIM learning, Linux Shell programming, Gcc compilation, Makefile, etc.
This part mainly learns: kernel module compilation principle, character device driver framework, platform device driver, device tree, Pinctrl subsystem, I2C subsystem, interrupt subsystem, block device driver framework, Bootloader, etc.
This part mainly learns: system call, storage management, process management, memory management, file management, etc.
This part mainly learns: QT programming, TCP/IP protocol, HTTP protocol, etc.
6.2. Learning Suggestions
For basic learning, if you are new to Linux, it is generally difficult to get started. It is completely different from the previous single-chip microcomputer, and requires a process of getting familiar with the environment.
For driver learning, the important thing is to understand “how to write a driver program in the Linux environment”. The underlying principle of the driver is still the same, adding a layer of framework, we need to be familiar with it.
For kernel learning, the above are also several core features of the system, the focus is on “how to optimize Linux performance”
For applied learning, the above-mentioned aspects are also the basis, and the focus is on what application to develop and what aspect of knowledge to learn, and there is no conclusion.
As for Linux, there is an old saying that “it takes 3 years to learn Linux, and it takes 5 years to be considered a Linux engineer. For unfamiliar fields, bloggers dare not make false assertions.”
6.3. Learning materials
For basic learning, I recommend introductory books such as “Bird Brother’s Linux Private Kitchen”, “Advanced Programming in Unix Environment” and so on.
For driver development, recommend **”Detailed Explanation of Linux Device Driver Development”**, detailed explanation of Linux kernel source code, etc.
For kernel learning, recommend **”Linux Shell Scripting Guide”, “In-depth Understanding of Linux Kernel”**, etc.
For application development, recommend **”Complete Handbook of Embedded Linux Application Development”, “Unix Network Programming”**, etc.
In addition, I recommend the three Linux development tutorials of punctual atom, wildfire, and Wei Dongshan. Most of Mr. Wei’s courses are well received, but it is still up to you which one is more suitable for you.
The overall learning route of the full text: Embedded basic learning -> 51 single-chip microcomputer -> STM32 single-chip microcomputer -> RTOS articles -> ARM+Linux