Embedded Study Guide (necessary) (reprint)

In recent years, development of embedded systems in the country can be described in full swing, many companies are in urgent need of developers of embedded systems. However, in universities, teaching embedded system but still lags behind many high school and undergraduate students newly enrolled graduate students could not know where to begin. In this article, the author will be based on their embedded systems development and teaching experience, brief learning embedded system, and strive to help beginners find an entry road.

What is an embedded system?                     
        Learning embedded systems, first of all should be clear what is embedded system, otherwise the effort to learn, but I do not know what they have learned what that is, would not disconsolate? A lot of factors that define an embedded system, which is plagued embedded systems learning. According to their own development and understanding of the teaching process, as well as the application of a variety of embedded systems summary, proposed a simple definition of embedded systems: embedded systems are referred to as embedded computer systems, embedded computer systems highlight this definition and common ordinary computer system. The following table lists some typical applications of embedded systems:
                  Intelligent Robot (SDR 4, Mars landers)
                  entertainment and consumer electronics (Gameboy Advance, Sony PSP)
                  network communications products (Smartphone)
                  Military Equipment (Military PDA)
                  Automotive (Car navigation, autopilot, entertainment systems)
                  intelligent instrument (virtual instruments)
                  safety (fire, theft)
                  environmental protection (balloons)
                  banks and commercial consumption (ATM)
        To analyze the definition of embedded systems to Mars landers example. Mars lander may sound technically feeling some high unpredictable, but the essence is the application of embedded computer systems, its core is a computer system, which consists of the computer system there is no difference with the traditional computer systems in nature. A significant difference between the two is that the computer system for the Mars lander is attached to the Mars lander. Of course, a computer system can be installed in the Mars lander, is the need for a lot of special design. But the essence, the core concept of embedded systems is still a computer system. Embedded systems are focused on learning the computer system. On the one hand, learners need to firmly grasp the concept of the computer system itself, more important is learning the difference with a conventional computer system development process of embedded systems development process. It should be noted that many learners have never had engaged in the development of a complete computer system, teaching program is designed for university center, constitutes a computer system, Caozuojitong principle, programming languages and other courses are designed to enable students make better use of computer systems programming in existing computing platform up design and implementation of a variety of applications, students generally do not have the opportunity to learn how a complete computer system is built, and personally involved in every process of building. And for embedded systems, people engaged in the development of the platform is to personally go to the development of a complete computer system, this process involves
                  l needs analysis
                  2 hardware design
                  3 Driver
                  4 Bootloader & BSP (board support package)
                  5 Caozuojitong transplant
                  develop applications 6
                  7 performance check
        The purpose embedded system teaching is to teach students how to build an embedded computer systems to meet the needs of a particular industry on demand. Enable students to learn how members of hardware platforms, hardware design, embedded operating system to choose the best to meet the application requirements, and complete the Bootloader, write BSP and drivers, porting and debugging process. In order to meet the needs of the industry, and ultimately to write debug the corresponding application on the system established, and performance testing and inspection.


Who are you, what things you need to learn?
         If you work just need to write a picture viewer program on a PC, then you do not need to know when the system receives an ARP request packet how it should respond. By the same token, learning embedded systems also have a lot of respect. The design and implementation of embedded systems, basically requires four different tasks: system design, hardware design, driver and operating system porting and application design and development work.
        1. Design work                     
        in the design phase of the system, the system analyst will be based on the needs of the basic configuration of hardware systems, choose to use that processor according to the needs of the system, which operating system to use, those using software development tools. Systems analysts tend to be more involved in the whole process of complete embedded system design, system application industry for better understanding, for embedded system development process itself is very clear people.
        2. The hardware design of
        system hardware designers need to design according to the results of systems analysts, hardware design schematics. Usually it requires hardware designers familiar with the hardware configuration of embedded systems. Hardware designers need to understand the common embedded system processor, memory (Flash, SDRAM), Ethernet MAC chip, an audio / video codec chip, power management chip, a bus interface circuit (USB, PCI), liquid crystal display modules, programmable logic device (FPGA / CPLD), a wireless network communication module (Bluetooth, WLAN, GPRS) and the like constituting the basic principle of a hardware circuit elements, connection methods, content usage considerations, the basic commissioning method. Many companies could find a schematic diagram of evaluation board on the network, these schematics carefully studied to find out the method of the processor is connected with a memory device, a network card, or the like and causes the liquid crystal module. Through the study of these circuits, able to quickly understand the composition of the entire embedded systems, these circuits with the actual product, although some differences circuits, especially for handheld devices, but these differences do not affect the beginners to learn Embedded Systems the basic structure of the hardware design.                     
       These knowledge, often need to learn and accumulate a long time, need opportunities to practice personally involved. For students new to embedded systems hardware development is concerned, generally impossible to understand all this knowledge, but it will not be all ignorant. The author developed in conjunction with their teaching experience and think: should first select a mainstream and relatively simple embedded system processor, such as based on the ARM7TDMI core AT91M40800, S3C44B0 other embedded system processor, 32-bit programming model learning RISC processor instruction set. Teaching, the single-chip computer courses generally explain the 8051 single-chip as the core, due to the structure and development mode of modern 32-bit processor has a large difference from the 8-bit microcontroller, learners still need to spend a little effort to study the following 32 bit processors. ARM processor, for example, learners need to understand the variety of operating modes, backup registers, features RISC instruction set, MMU and virtual processors address, interrupt processing and other content. In the process of learning instruction set, each is preferably able to learn several instructions, these several instructions on the use of the simulator in the following experiments, observations processor. This process on the one hand the learners to learn the commands themselves can achieve a better effect, the other is to develop a learning tool itself. Then, you can begin to learn to use and configure on-chip resources. Then you need to develop a board easy to use, learners will be able to debug with the development board connected to the PC through the JTAG emulator, download, debugging. In particular, to examine the system initialization and interrupt handling of the process. In the development process, if you encounter a problem, they should analyze their causes of the problem, by analyzing the narrow issues that may arise and ultimately find the problem. The most important thing is to maintain confidence in a problem-solving, how to face difficult treatment, are often able to determine whether the final system is capable of debugging success. Then, the learner can learn carefully start connection, configure the processor with a memory storage space, extended various devices, such as network cards, AC97 sound works and use. Embedded system hardware design often requires the use of programmable devices, the learner will take some time to learn the use of conventional programmable device (CP LD / FPGA), commonly used products of Xilinx and Altera Corporation. System hardware schematic design, we need to use schematic design EDA tools, common EDA Schematic design tools including Cadence's Capture, Protel's Protel99SE and so on. Next, with reference to a circuit diagram of the evaluation board may, depending on the design requirements of the system, starts schematic drawing of a. In the schematic drawing process, we must learn why evaluation board circuit connections, for the moment there is no problem in the clear must not get away. For example, some of the address lines of the processor units of bits in bytes, and the address lines of the other processors is two bytes, when the 16-bit memory is connected, the process must not be taken for granted a 0 is directly connected to the memory a 0 above. In addition, students should have some ability to draw the PCB diagram, because at this stage, many companies can not completely separate the design work and the work of rendering the PCB schematics, often require designers to perform both hardware schematic design can FIG performed plate design. Even the PCB design and schematic design separate companies, designers need to be able to raise the schematic layout of the PCB designer requirements for different signals.
       3. Driver and Caozuoxitong transplants
       development of modern embedded systems compared with conventional 8-bit microcontroller development system, a significant difference is the widespread use of embedded Caozuoxitong. After completion of soldering the circuit board to get, and basic test, it is necessary for transplantation of the driver and Caozuojitong. Preparation and transplantation of Bootloader first to be carried out. Bootloader equivalent PC system BIOS. For some embedded Caozuoxitong, such as uc / OSII no bootloader can also develop and debug. But for WindowsCE and embedded linux system Bootloader is a must. In this paper, Windows CE, for example, a brief description.
       Porting Windows CE system is mainly BSP (Board Support Package) development process. BSP difference with the specific hardware operating system isolated from the core, consists of three parts Bootloaer, OAL (OEMAbstraction Layer) composition and device drivers. WindowsCE system Bootloader is called Eboot. Eboot is written to the system boot Flash. Run Eboot system startup, the completion of the debugging features through the network card in the PC Windows CE operating system image is downloaded to the target system SDRAM and begin execution. For a system Porters, you first need to read the documentation, understand the basic concept and development process WindowsCE system Bootloader and the BSP. (Oh, we need to do this work, ah, I did not think (beginner ^ _ ^)) Windows CE Platform Builder development system provides detailed documentation and routines, developers need to carefully read the documents and routines. Call to find out the relationship between the various functions. In a development process step it is important to get through the serial port, so that the target plate can transmit data to the PC through a PC debug port. Since the more expensive ARM system emulator, and debugging the operating system often do not use JTAG debugger to step through. So from the implementation process and results of the program for debugging serial observation it is very important. Serial get through after a more difficult problem is to debug the chip card. People new to embedded systems development are often not used directly in the register-level experience in the chip card, note cards and chips are generally more brief, which requires developers to learn some of the basics of Ethernet, MAC layer for Ethernet I have a basic understanding. In addition, using a variety of network debugging (capture) tools can greatly reduce the difficulty of system debugging. OAL system needs to make appropriate changes depending on the particular hardware, this portion may refer to the document, based on the information analyze what went wrong during debugging serial. To give full play to cross-file search tool string functions, find the location of the error in a broad array of source files. Of course, with the developers of the system file directory structure of knowledge and understanding, wrong positioning speed will continue to accelerate. WindowsCE driver is relatively better written. Program structure is simple, with reference to a learner 
                  http://msdn.microsoft.com/library/default.asp  the MSDN Home> the MSDN Library> Mobile and Embedded Development> Embedded Operating System Development> SPOT the Columns at The Geek and the Drivers WindowsCE this article.
       4. Application Development
       application development for embedded systems application development on the PC, with not a big difference. For Windows CE system, Microsoft has provided a more comprehensive development tools. Particularly the use of the .NET Compact Framework, so that based on Windows CE.NET CompactFramework applications with cross-platform. Windows developers can use the C # language development and simulation debugging CE.NET applications directly on the PC, the target system can also connect with a PC for online debugging. There are many systems support J2ME (JAVA embedded system version), which makes JAVA account for a large advantage in the embedded system application development. In addition, as a professional embedded system software developers, but also to fully understand the technical knowledge of object-oriented design patterns and other aspects of the course as a beginner can start without further research in this area.

Common embedded system processor and operating system
        processors
        commonly used embedded processors including ARM processor, Power PC processor, MIPS-based embedded processor core, soft core processor (such as Altera's Nios and Xilinx MicroBlaze etc.) and DSP (digital signal processor) and the like.
        The main features of the ARM processor is a high performance per watt. ARM processors are widely used in mobile phones, PDA and other fields, one of the more famous are ARM core-based XScale family of processors produced by Intel. Because all ARM core processor produced with the same programming model, handheld and battery-powered systems, embedded ARM based processor system is often the first choice. The PowerPC (PPC for short) has a strong processor computing performance and data throughput, it has been widely used PPC-based embedded system processor and a data communications network. Motorola which produced the MPC860 / MPC8260 been widely used in embedded networking products. Features MIPS processor performance in a very powerful processing capability. As a high-performance processor, MIPS processors for networking, enterprise and advanced consumer electronics applications, especially in the set-top box system, MIPS processor has a high market share. With the continuous expansion of the scale programmable devices, making it possible to customize the processor as needed, and easily be customized for a particular application processor to facilitate the realization inside programmable devices. In addition to the processor, the computer system but also a variety of other components, such as multi-channel media in a data processing system, often need to use programmable devices to implement high-speed data processing, a DSP implemented using soft complex digital signal processing algorithms , also requires a transaction processor, in conjunction with programmable soft-core processor device, the processor together with the DSP, provides great flexibility for the system-level design. DSP (digital signal processor) is different from the general-purpose processor, concentrated expression on its powerful digital signal processing capabilities. In the DSP 
Provides internal hardware multiplier-accumulator, the processor is designed for special addressing modes optimized some DSP also supports zero-overhead loop (Zero OverheadLoop). To facilitate the design of embedded systems, DSP general mainstream also provides a wealth of peripherals. It is particularly worth mentioning is ADI's Blackfin family of DSP and TI's DSP DM64X series, the two processors offer a rich on-chip peripherals, ideal for embedded systems applications.
       OS
       Window CE.NET/5.0
       as Microsoft products, Window CE.NE/5.0 provides a full-featured platform Platform Builder development tools and application development tools Embedded Visual C ++ / Visual Studio 2003 . WindowsCE With the majority of users are familiar windows interface, the system provides a number of drivers, and there is a complete document support. For application developers, system developers familiar with Windows programmers to easily develop applications WindowsCE. Windows CE will be a very promising embedded operating system.
       VxWorks
       VxWorks is produced by Windriver (Wind River) Embedded real-time operating system, the famous Mars lander is the use of VxWorks. Windriver provides an integrated development environment tornado as VxWorks.
       υC / OSII
       υC / OS is an embedded real-time operating system open source code written by Jean Labrosse design, embedded operating system first contact with the author is it. Read and understand the depth υC / OS source code to understand the real-time system is helpful.
       ARM Linux
       ARM linux transplant is developed by other developers Russell King and linux operating system for ARM processors. ARM Linux system released under the GNU GPL. Interested readers can see http://www.arm.linux.org.uk/docs/whatis.shtml introduced.
       υCLinux
       υClinux is suitable for embedded processing without MMU's LinuxOS version. υ Clinux Also in the GNU GPL release, interested readers can see http://www.uclinux.org/index.html

 

FAQ embedded system development process and solutions
         how to write Bootloader Flash?
         Beginners usually encounter the problem of how the program is written processors. For different processors, different methods may be employed. Such as Intel's Xscale processor can use JFlash tools provided by Intel's programming. For processors with JTAG debugging tools, you can use the following ideas: write a program, this program can located in the data SDRAM / SRAM fixed address written in Flash. When programming, first of all, this software will be downloaded to the SDRAM, and debugging software to be written by the data downloaded to the Flash buffer to a fixed address SDRAM / SRAM start, and start execution of the program through the debugger, the data written in Flash. In addition, the network also provides a number of tools dedicated to write Flash, developers can choose according to their needs. (Now I understand why the first in the next flashProgramer.dxe BF533 first learned of)
       what is arm-elf-gcc?
       arm-elf-gcc cross is a C language compiler. We compiler, the same processor in the PC platform running on the same processor compiler generated code to be run. However, the PC 
when compiling the ARM program unit, the processor in the same processor running the compiler generates code that runs different, this is called cross compiler compiler. Which means elf format object file generated by the compiler. (In fact, we usually use the microcontroller compilers, such as GCC-AVR, etc., have a cross-compiler, I only now figure out what is cross compiler)
      away Which compiler path?
      Systems and drivers often contain a lot of compiler options, many options are defined via the command line at compile time, if you want to know the compiler is a program that you can use the following method:
                  #ifdef PLAT_AAA
                  #error Code for Platform AAA

                  #else
                  #error Code NOT for Platform AAA

                  #endif

So you know at compile time, which is compiled by the road. Support for #pragma message ( "I am here" ) compiler using #pragma message may also be pre-compiled instructions.
       I know how that code in that file?
       System programming often requires the use of search strings in multiple files, you can use multi-file search tool platform provides string in the windows platform. In linux platform, you can use grep to search for strings. Grep search function is very powerful, support for regular expression searches, skilled use grep to read the system and driver code is helpful.
       The system is operated from the beginning of the file?
        For Windows CE system, usually from WINCE420 \ PLATFORM \ YourPlatform \ KERNEL \ HAL file a compilation directory. For different versions of Linux systems there will be some differences, in order to arm processor, for example, will normally be linux2.4.x \ arch \ arm \ kernel in the head-armv.S.
       Program execution got there?
       Insert the following code in a program can be achieved
                  printf ( "I am here% s ,% d \ n", __ FILE__, __LINE__);

Code will play the file name and line number where the printf statement.

       Recommended Reading
       Jean J.Labrosse MicroC / OS-II The Real-Time Kernel, Second Edition is the book I contacted the embedded real-time systems primer in the country to buy Chinese version. This book is more clearly about the concept of real-time systems, the various components function, in particular, discloses a real-time system kernel source code, careful study will certainly benefit. There are little tips for beginners, this book can not first look at the first chapter, looks directly from the second chapter.
       Abraham Silberschatz, Peter Baer Galvin, Greg Gagne Operating System Concepts I found in the teaching process, whether it is electronic or computer engineering have a lot of students to the basic concepts of the operating system did not find out, few students have a complete system programming experience. Operating System Concepts This book describes the concept of the operating system can only be described as classic. Interested for embedded systems in-depth study of the students, we must first lay the foundation, this book has become a must-read thing.
      Andrew S. Tanenbaum Computer Networks Andrew S. Tanenbaum to bring students to learn computer must know operatingSystems: Design and 
Implementation of this book, the author for this professor Tanenbaum sincere admiration. Network protocol stack is part of a pillar of the embedded system. Willing to network dedicated to research in-depth technical students, this book will establish a solid network foundation you.
      Karim Yaghmour Building Embedded Linux Systems This book describes in detail the composition of embedded linux system, the basic concepts and how to build the various parts. The book is a small space, it can be described as short and pithy. That can be used as a primer embedded linux system, but also is a guide to various parts of the development process.
      Advanced RISC Machines Ltd (ARM) ARM7 TDMI Data Sheet Advanced RISC Machines Ltd (ARM) ARM920T Technical Reference Manual learning embedded systems do not understand the current most widely used embedded processor how the line? ARM7 TDMI the data sheet to learn ARM programming model, something good instruction set. In embedded systems, MMU (memory management unit) is a very important part, but also difficult to understand and master the part. ARM920T Technical Reference Manual can just help you to explain the contents of this area.
      Perter Van Der LinDen Expert C Programming Embedded system-level programming language is the most commonly used C. Many students regard their C from linguistics, Well, look at this book it, and look for their own Experts gap.

                  Note: This article is what I see in the Learning Center No. 12, 2004. The authors are Yuan Tong
                  Author
                  Yuan Tong, experimental college courses embedded systems Beijing University teacher, had in 2004 to visit a student working at Microsoft Research Asia.

                  After reading this article, I could not wait to get posted, because it really is good to write. I get embedded more than a year, from 8051 to ARM, he studied, a loss too, too happy, too depressed. . . Recently, even give up the idea, after all, in the end is embedded developers do not know the cause of a comprehensive, start a drill in technology, learn a variety of techniques, and ultimately lost in the quagmire of his own and caused's. This article is very clear about all aspects of embedded development, to confuse people so I played a sobering effect.
                  Embedded development and desktop development both different, there are a very large contact, but also paid great attention to practical skills. To engage in the development of the desktop when a man came into contact with the embedded, usually conversion, however, which is mainly reflected in the positioning. As stated in the text, who you are and what you do? I know the hardware is limited to the field of programming, PCB design know nothing about, but it does not say that you do not understand the hardware can not engage in embedded development. Development and design aspects of a system, make its own contribution in their own areas of interest and familiar is the most important.
                  1. Hardware design: the need for hardware design experience, have a good understanding of a variety of embedded devices.
                  2. System migration: the need for compilation experience, operating system and the underlying principle driving knowledge
                  3. Applications: Desktop programming experience required

Guess you like

Origin blog.csdn.net/xiebingsuccess/article/details/91826219