This paper has been transferred to the Development Board iTOP-4412 Development Board Practical manual: Http://www.topeetboard.com
Just read this article, for just getting started embedded very useful, dedicated to me as confused, suffering from no clue, no one to guide the study of Friends. The
mainly discusses the embedded technology learning methods, mainly for embedded software.
Embedded technology is an edge science (also known as interdisciplinary Sciences), involving a very wide range of content, a number of schools in the previous years, including first-class universities are discussing whether to set up this major. Not to set up this major itself has any problems, but because the curriculum is not easy to arrange, if the hardware, then it becomes an electronic engineering class, if the soft words become a computer professional.
Because of this, many people in the study of embedded technology, do not know where to start, because the knowledge system is very complex, if there is no guidance, it is likely to lead time, learning efficiency will be poor.
So, here's a look at the learning method, in a more concise way, so that you understand the embedded system knowledge system, and its entire context.
1 Embedded Development Learning Method-Framework Learning Method
Learning methods for embedded systems many people have spoken, I believe that you have been on the Internet or other channels of contact with some ideas and methods, here to talk about personal experience.
First of all, is there a shortcut to learning? One argument is that it can be accelerated, and can be learned in a few days, and I think the quick talk is too exaggerated, it's impossible.
Some people talk about learning without shortcuts, you have to go through a long-term effort, called charm. But learning embedded technology, if there is no good way that is not right, learning a new knowledge system is sure to work hard, but also need to have good guidelines, that is, a shortcut, in fact, here is the way to learn. The
method is very important, if there is no method, close the focus on the chaos of the collision, certainly not. As we go to find a place that we have not been to, we follow the feeling to find the hope is very small, if there is a map in hand, and there is a compass, it is much faster, if we have navigation, naturally faster and more convenient. In fact, this is the importance of the method.
So here, we're going to introduce a learning approach that's been summed up by the company's years of training and product development experience.
You may ask, Schindler has also done embedded training? In fact, we have a lot of training experience.
We think that ' framework learning ' is one of the most suitable methods for beginners, which contains the idea of rapid prototyping, i.e. framework learning, rapid prototyping. Then the dominant idea is that from the beginning, we should see the whole picture of embedded system knowledge, and then gradually go deeper!
For example, we want to know the city of Beijing, if wandering in the alley, may not be able to understand the city for several years, if we first study through the Beijing map, understand where Tiananmen Square, where the bird's Nest, Xiangshan badaling where. Together with our visit to these places, we may soon be able to grasp the full picture of the city.
It is important to note here that even if we have a map, we need some foundation, such as what we want to know about Tiananmen Square, the origin of the bird's Nest, and what badaling is, in fact, these are basic knowledge. That is to say we have a certain basis before learning the system framework, otherwise this map is not understand.
Learning embedded technology also requires a certain foundation, and in a moment we specialize in what kind of foundation we need.
Next, if we want to learn more about the city, we have to study the history of the city and even the history of China. A more detailed step, you can further study the palace itself map.
So a ring is set. Through continuous research, will gradually grasp the city's geography, culture, political and economic characteristics.
Through the brief example of Beijing, this paper uses framework learning method to understand and master the whole system in the learning process of different levels of framework.
If we do not pay attention to the method, every day in the alley back and forth, it must be less effort, will be in a long time to no avail.
2 Framework for embedded system learning
Learning embedded is also the case. Must master a certain method, can compare fast and effective study.
Then this method is the framework learning method, just now we also said, first in understanding the basic framework before we have a certain foundation, then this is the basis of a single-chip microcomputer and C language, do not need you to master how good, but must have a certain C language programming ability. Like some other courses, such as computer professional compiling principles, data structure, computer system architecture, these knowledge is not really necessary, to understand it.
With the C Language Programming Foundation, and learned the microcontroller, this time you can learn the basic framework of embedded Linux, very simple, that is to make clear bootloader, Kernel, and file system, the next brief introduction.
What is bootloader?
In fact, it is a boot program, that is, after the hardware reset the first program to execute, it is the main task is to initialize the operating system running environment, such as memory, timers, buffers, etc., when the work is done, then the operating system code into memory, and then the operating system can be started and executed, so far, Bootloader's mission is complete.
Then someone asked, there is no bootloader line, can! However, because the operating system itself is generally a common software, it to run on different platforms, such as X86,ARM,POWERPC, and so on, and different processors of the initialization operation is different, if the operating system's soft and hard to consider when the different platform at the start of the difference, it seems too complex. In addition, there are other reasons, such as the ease of writing system to consider and so on, here is not to do in-depth discussion.
There are many kinds of common bootloder, such as U-boot, Redboot, Lilo and so on, we develop the board with the Uboot.
What is kernel?
Kernel is the kernel of Linux, which means the code of the Linux operating system itself. Then u-boot boot to the end, is to load it into memory, and jump to kernel to execute.
What is a file system?
Now let's introduce the file system, and here's the fact that Linux booting up to the end of the file system must be mounted. This is a feature of Linux, it is not like other operating systems, such as VxWorks, is not required file system, VxWorks no file system can be run. It's also important to know that the Linux kernel is the root of the QT system, Android, and Ubuntu systems, unlike their file systems, which means that some code related to Android, such as the GUI system, the Android virtual machine, Android's skeleton code is in the last file system that Linux hangs on. If you understand this, then the basic architecture of these systems is clear.
Figuring out these concepts, we actually understand the basic Linux system framework, and then we learn how to compile these files according to the Development Board supporting information, because like Uboot, Kernel, file system, the final compilation is generated by a separate file, This means that three files will be generated, and finally we will have to learn to write these files on the board. The
learns to compile and burn, and then, on the basis of this framework, we learn how to do the applications on Linux.
What is an application (APP)? This is the framework of the content, it is running on the operating system, by invoking the operating system resources to work, is the ultimate business logic, such as our windows has a lot of applications, such as QQ, Storm Video, WORD, Exel, and so on, a lot of different apps.
According to our later video tutorial, we should soon be able to learn, such as serial port programs, network programs and so on, these are applications, we do not need to do too much, learn a few deepen the understanding of the framework can be.
Next, we need to learn some Linux drive knowledge, which is also in the framework of the driver can be seen as part of the operating system, it is specialized in the bottom and hardware. So if you know a little bit about it, there are three types of Linux drivers: Character devices, block devices, and network devices.
This time, we should note that only need to learn the character device driver, the other two do not go to the tube first. It is important to remember that you should not study block devices and network devices when you first learn about embedded technology. In other words, the character equipment can be understood. Because the general company to develop embedded products limited to the development of character equipment, mastering the concept of the framework of character equipment and development steps can be competent. As for block equipment and network equipment, directly with the Development Board or a development platform itself to provide the driver is sufficient, these are the first-line processor manufacturers do things, generally do not need us to complete, these processors developed by the processors in the development of a companion BSP for the processor will be involved in these tasks.
Of course, some students may say, XXX Company is doing block device driver, I mean, from the embedded industry in general, most companies do not need to do so, a lot of technology is directly to use. We have mastered the character device-driven development approach, has been able to cope with most of the company's development requirements, for a student who has not yet started, must follow my way to learn.
after mastering the basic skills in the future, we can learn more about the programming in terms of framework learning methods. At this time, those computer professional courses, such as data structure, computer system architecture, various algorithms and so on can come in handy, their level will be in the process of learning to sublimate again.
To learn the character device drivers, follow the video to learn the LED driver authoring method, as well as the buzzer, ad conversion and other GPIO-related driver development techniques.
Mastered these, can say, we have become a more qualified embedded driver engineer!
This time I further introduce what is rapid prototyping, if you have learned software engineering, then you will have heard of a top-down product development method, this method is very effective, most of the product development method is to follow this idea, probably from the initial feasibility analysis, then outline design, detailed design, coding, Testing and so on.
In addition, there is a development method is ' rapid prototyping ', this is a Microsoft adoption of a method, in short, rapid prototyping is a gradual iterative approach, that is, the product as soon as possible to develop the prototype, and then gradually clear, step by step towards maturity.
Here we put the rapid prototyping method to learn, it was originally a development method, we learn from here, learn from the framework of the mind.
That is to say, we have a certain foundation, we have to learn the framework, when the framework is clear, then to learn to update more in-depth framework knowledge, such a ring, interlocking, the final study more and more deeply, and then become an expert in this industry.
So in the embedded industry, the engineer's position is actually this way, we look at:
Basic Digital circuit + C language + basic framework knowledge-----> Embedded Driver Engineer
Array structure + compiling principle------> Advanced Embedded Driver Engineer
Computer system architecture + operating system (from abstraction to concrete)-------> System Architecture Engineer
Because in the first stage, you will find that as long as the C language, have good programming skills enough, in the work of little involved in the compilation of principles, data structure of these aspects of knowledge, so many other professional graduates, even the original learning mechanical design students can become embedded driver engineer.
It is true, too, that in most embedded technology companies, especially those that use product development, it is enough to understand the basics of Linux architecture and to be able to write character class drivers. Because like network device drive and block device drive, basically have a demo design, as long as the reference to this demo can do, do not need us to do anything, if said need to do, that is to change the Gpio settings, modify the interrupt pin, only that.
So in-depth study, the analysis of the operating system source code will find that the knowledge of data structure gradually come in handy, especially in some professional firms, responsible for a specific area of the time, this may rewrite the operating system part of the code, to adapt to their own hardware of various situations, will be in-depth analysis of a certain aspect of the technology, such as file system, network protocol, this time data structure and other aspects of knowledge is very useful.
With the basic prototype, by continuing to learn new knowledge, gradually make the previous level, more profound understanding of embedded technology, while the knowledge system is more complete, can do a higher level of work.
The application of such learning methods, in the learning process, will also make the learning process has a goal, and will not feel dull, every day will have a sense of accomplishment, from the beginning can seize the context of the embedded system, as long as put into efforts, lasting learning, can become embedded industry experts.
Finally, we summarize, we want to grasp the embedded technology faster, to apply framework learning method, on a certain knowledge based on the basis of learning the framework of knowledge, so it is easy to get started, with the accumulation of development experience, and then to learn more in-depth basic knowledge, as well as a deeper framework of knowledge. Iterate this way until they are proficient in embedded technology.
This method also fully illustrates that computer science is an experimental science.
So in the course of learning, we should pay attention to, do not learn too much foundation, that is, C language and the basis of a single-chip computer can learn the basic framework of embedded, and then can become a qualified embedded engineer, later can continue to study, learning data structure compiler principle operating system and other aspects of knowledge, in-depth learning algorithm, To learn more about Linux framework structure, so that the overall level of further sublimation.
Now let's sum up and clarify the roadmap for learning embedded technology:
Microcontroller + C Language-----> Learning basic framework knowledge (including Bootloadre,linux kernel, file system compilation and write-----> to learn the programming of Linux upper applications, and the driver of character devices, you will feel the introduction after learning, I can do something.-----> Further study computer system structure, data structure, operating system principles and so on some knowledge, through the analysis of Linux system source code, until mastered the embedded programming technology.
I think we can follow this learning method, based on our iTOP-4412 Development Board to provide information and video, we will be able to learn this technology.
3 about bare-metal programs and simulations
Some users want to learn the bare-metal program through the ARM Development Board, in fact we do not recommend this, do some bare metal programs on arm, not not, but not too much value, because the bare metal program does not play the performance of the ARM processor, only running the operating system can fully tap the advantages of ARM processors, To ensure the safety and stability of the system operation.
If you really want to learn the bare-metal program, single-chip computer is enough. In terms of architecture, the microcontroller and arm are the same, are CPU, and the programming idea is not much different, but arm speed is too fast, only on the above operating system, and the use of multi-tasking programming method to maximize the advantages of ARM processor.
In the actual product development is also the case, almost no arm run bare metal way to develop products. If the use of bare-metal programming, the recommendation of a single-chip microcomputer, so the overall cost will be much smaller, in fact, this is the case.
In the early days, we also did a lot of bare-metal programs on arm, and with the emulator to debug; many people, especially from the microcontroller, want to learn this technology, because they feel that the bare-metal program is more cordial, and directly using the operating system feel very insecure, can not fully grasp the operation of the system In fact, the idea is wrong. We must develop products in the abstract level, and gradually change the concept, can not say that the development of a product, we must be very clear about the details of each program, should learn to develop products in the abstract software of the operating system, so as to meet the trend, but also product development and personal development must change the ideas and concepts.
Because we see too much to do SCM development engineers can not be transferred to the development of embedded products, I am afraid that the concept of change can be said to be the biggest obstacle, hope to attract attention.
What to learn in embedded development