As the saying goes, the beginning is always the hardest. When starting out, do you feel completely lost, unable to find your way amidst a sea of new terms while searching online? Even going to the library to look for books seems directionless? With terms like ARM, Linux, and U-Boot, it can be overwhelming. Where do you even begin?
Follow me on this journey to learn the design of embedded engineering!
In simple terms, we will cover everything from ARM basics to bare-metal programming, from uCOSII to Linux, from basic Linux commands to shell programming, from U-Boot to file systems, and finally to Linux driver programming. This path will take you from simple to complex, from foundational to advanced knowledge.
Phase One: Basics of Embedded Hardware and Bare-Metal Programming
(1) Basics of ARM processors, operating modes, registers, interrupts and exceptions, addressing modes, and assembly instruction sets.
(2) Familiarity with the ADS integrated development environment to prepare for bare-metal programming.
(3) Bare-metal programming: LED, serial ports, LCD, touch screens, NAND flash, I2C, IIS, DMA, etc.
This phase focuses on familiarizing oneself with embedded hardware to lay the foundation for future Linux drivers. Since ARM is the primary processor architecture for embedded systems, we will focus on ARM. First, we learn the basics, then practice on development boards. The materials used in this phase mainly include:
(1) “ARM Embedded Basics Tutorial” – This book focuses on ARM foundational knowledge. Although it discusses ARM7, the basic instruction set and model are the same across ARM.
(2) “Complete Manual for Embedded Linux Application Development” – This book mainly covers the S3C2410 interface module, which is necessary for hardware knowledge during bare-metal experiments.
3. Time Required:Approximately two months.
Phase Two: Basics of Linux and Shell Programming
(1) Basic knowledge of Linux.
(2) Installation and usage of Linux.
(3) Common Linux commands.
(5) Basic shell programming.
This phase mainly focuses on getting familiar with Linux, learning to install it, understanding its basic concepts, and performing simple operations. It is recommended to install Linux on a virtual machine at first, and for development boards, install Fedora9 according to the provided instructions, then practice various commands on it.
The main resource for this phase is “Bird Brother’s Linux Cookbook: Basic Learning Edition”. This book has an electronic version, and you don’t have to read it all, just focus on the descriptions of basic Linux knowledge and commands. It’s impossible to memorize all commands at once, so you can look them up later as needed. The main goal of this phase is to gain an overall understanding of Linux, at least knowing some basic concepts and performing some basic operations.
3. Time Required:Approximately one month.
Phase Three: Basic Development of Linux Applications
(1) Basics of GCC, GDB, and Make.
(2) File and time programming.
(3) Multi-process and multi-thread program design.
(4) Inter-process communication.
This phase mainly focuses on understanding the writing and debugging of Linux applications, which are also foundational knowledge, with the main goal of becoming familiar with Linux. It is essential to understand application-related concepts to lay the groundwork for future development. The primary resource for this phase is “Standard Tutorial for Embedded Linux Application Development”, which details the writing of applications on Linux and is not too difficult. The classic book “Advanced Programming in the UNIX Environment” goes into depth, but it might be a bit challenging at first, so it’s better to start with something simpler. After learning application programming, it may not necessarily lead to application development, but for those entering the embedded Linux industry, these skills are essential.
3. Time Required:Approximately one month.
Phase Four: Learning the uCOSII Operating System
(1) Concepts and basic knowledge of embedded real-time operating systems.
(2) Reading the source code of the uCOSII operating system.
(4) Application programming for the uCOSII operating system.
This phase mainly focuses on understanding the basics of embedded real-time operating systems, as uCOSII is open-source and allows for code research. It provides an intuitive understanding of task scheduling and resource management within operating systems. Reading its source code can improve programming skills and standardize coding habits. Although a ported version of uCOSII is provided, performing the actual porting oneself leads to a deeper understanding.
This operating system is relatively simple, so writing applications becomes very important. Implementing several functionalities helps in understanding the system. The primary resource for this phase is the book “Embedded Real-Time Operating System uCOS-II” translated by Shao Beibei, which provides detailed analysis of the operating system’s source code. After thoroughly reading this book, one will have an in-depth understanding of uCOSII. The main objectives of this phase are to understand operating system knowledge, such as task scheduling, concurrency, and race conditions, as well as to enhance programming abilities. Reading the source code of an operating system is much more rewarding than reading countless books on operating principles.
3. Time Required:Approximately one month.
Phase Five: Learning Bootloader
(1) Basic knowledge of bootloaders.
(2) Basics and commands of U-Boot.
The bootloader is an indispensable part of a Linux embedded system. This phase focuses on understanding the role of bootloaders and the knowledge of the universal bootloader – U-Boot. Initially, learn to use various U-Boot commands. Then analyze the U-Boot startup process, Makefile, and the process of loading the kernel. Follow the steps provided by others to port the kernel, repeating the process to become familiar with it. Once comfortable with U-Boot, independently complete the porting and add your own modifications. The main references for this phase are the U-Boot porting reference manual that comes with the CD and various online articles. I find that there are plenty of online resources available for U-Boot porting.
3. Time Required:Approximately one month.
Phase Six: Learning File Systems
(1) Types and roles of Linux file systems.
(2) Familiarity with the use of BusyBox and the Linux system startup process.
(3) Building your own root file system.
The file system is also an essential part of a Linux embedded system. This phase focuses on understanding the role and basic knowledge of the root file system and building your own root file system. The book “Building Embedded Linux Systems” details all elements of embedded Linux, including file systems. Here, I mainly focus on the file system section. I also refer to some online articles. First, familiarize yourself with the basic Linux file systems, then learn to use BusyBox and understand the Linux startup process, and finally follow others step-by-step to build your own file system.
3. Time Required:Approximately half a month.
Phase Seven: Embedded GUI Development
(1) Types and characteristics of embedded graphical user interfaces (GUIs).
(2) Basic knowledge of MiniGUI.
(3) Porting MiniGUI and writing programs.
As an upper-layer system in embedded systems, understanding embedded GUIs is also necessary. I only learned MiniGUI because QT requires knowledge of C++, which I have not learned, so I focused only on MiniGUI. The goal of this phase is mainly to familiarize myself with the development process of embedded graphical interfaces, as I do not plan to engage in application development in the future.
Just getting MiniGUI ported to the board and running a hello program is sufficient. There is no need to delve deeper into other aspects. By porting MiniGUI, I will gain a new understanding of the software and library functions running on Linux, as well as the principles of program execution and compilers.
3. Time Required:Approximately half a month.
Phase Eight: Basic Knowledge of Linux Drivers
(1) Read “Linux Device Drivers” and cover all chapters except for network drivers, tty drivers, and block drivers.
(2) Experiment with all examples in the book, carefully analyze the results, and understand relevant knowledge points.
(3) Even for examples, ensure consistency in programming habits and standardize documentation.
The purpose of this phase is to lay the groundwork for Linux drivers. “Linux Device Drivers” (3rd edition), commonly referred to as LDD3, is the classic book on Linux drivers that must be read multiple times. The first read may be challenging and feel obscure, but after several readings, it becomes much clearer. After reading the book, experiment with the examples provided.
3. Time Required:Approximately two months.
Phase Nine: Practical Linux Driver Development
(1) Understand the registration and implementation of miscellaneous character devices through LED drivers, and master the IO operation process of MINI2440.
(2) Understand basic interrupt implementation methods through button driver programs.
(3) Master PWM driver programming.
(4) Understand the implementation of input device models through touch screen driver programs.
(5) Master the design of ADC driver programs.
(6) Master the design of watchdog and RTC driver programs.
(7) Analyze the implementation of platform device models through LCD driver programs.
This phase focuses on mastering the implementation of simple practical driver programs and analyzing differences from LDD3. Through this phase, one can gain a deeper understanding of Linux driver programming and improve the ability to read extensive code. The main work in this phase involves reading code, experimenting, reading code, and experimenting, learning through observation.
3. Time Required:Approximately one month.
Phase Ten: In-Depth Understanding of the Linux Kernel and USB Subsystem Research
After completing the first nine phases, I feel I have entered the realm of embedded Linux. Therefore, I am planning the tenth phase. This phase will primarily determine my future direction. Since USB is a standard interface in embedded systems, learning about USB-related knowledge is highly competitive. Those who work with drivers should have a certain understanding of the kernel, so “Understanding the Linux Kernel” is essential.
This phase mainly involves learning the USB protocol, reading all the code of the Linux USB subsystem, deepening the understanding of USB through code reading, and then becoming familiar with various USB class protocols, writing and porting USB drivers. I have determined that USB is my direction because I believe that to excel in anything, one must specialize rather than dabble in many things. Therefore, I have decided to learn about USB and pursue a career related to USB in embedded systems. This phase of learning is currently in progress, and I am navigating through the vast code of the Linux USB subsystem.
﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌
Disclaimer:This article is reprinted from the internet, and copyright belongs to the original author. If there are any copyright issues, please contact us in a timely manner. Thank you!
Collection of Previous Good Articles
Circuit and Love<< Click Here
Should I Transition from Microcontrollers to Embedded Linux? << Click Here
Learning Path for “Unmanned Driving”… << Click Here
Cool Trick!Make a “Circuit” with Iron Wire, You Can’t Refute It!<< Click Here
If you find this article useful,sharing it is also our motivation to keep updating.
5T Resource Giveaway!Including but not limited to:C/C++, Linux, Python, Java, PHP, Artificial Intelligence, PCB, FPGA, DSP, LabVIEW, Microcontrollers, etc.!
Reply “More Resources” in the public account to get them for free, we look forward to your attention~
Long press to recognize the QR code in the image to follow