ARM development steps: After watching the development of ideas would be more clear

Be minimum system board: If you have not done ARM development, I suggest you do not start Tandaqiuquan, all the applications are doing, because the start-up mode and ARM microcontroller or dsp different, often encounter all kinds of problems, it is recommended that only a small cloth to the system board Flash, SRAM or SDRAM, CPU, JTAG, and reset signals, leaving expansion interface. Minimize system to function properly, your task is half completed, and good peripheral interface standard interface are basically the ARM, if you already have experience in these wiring hardware, which is speaking to you is a very easy thing. 2. Write enable code to write the first hardware address according to a small code that can be initiated, including the following sections: port initialization, maskable interrupt, the program copied to the SRAM; complete re-mapping code; interrupt handler configuration, an inlet connected to the C language. Maybe you see you give some examples of programs which, bootloader will be a lot of things, but do not be troubled by these complex procedures, because you are not doing development board, your task is to do a small section of the program, to make your application able to run down. 3. Careful study of the information you use chips, although on ARM-compatible core, but each chip has its own characteristics, we must consider these issues when writing programs. Especially girls, in here do not have a psychological dependence, always want to take someone else's sample program modifications, talks about change more chaotic. 4. Look at some of the operating system program, a lot, in order to improve their application in open source program ARM, we should look at other people's program, linux, uc / os-II, etc. These are all good original code. 5. If you are for the hardware, each manufacturer has a substantially schematic DEMO for the chip board. First schematics digestion. So after you do the design, a pretty good idea of ​​allocating resources. DATSHEET device must be a good digestion. 6. If you do the best software for the operating system mechanism to understand. Of course, this is a piece of cake for software engineers. But if the hardware is born a bit strenuous. Q: do the minimum system board is a 2 layer or 4-layer good? A: Only two layers can AT91 plate, at least 4 of the other layer; 44b0 ground and power handling plate can also be two; On the four-layer board and the 33 ohm resistance: selection of four-layer board is not only the problem of power and ground, required by high-speed digital circuit impedance traces, floor plate not controlled impedance. 33 ohm resistance is generally applied to the drive side, but also play the role of an impedance matching; first wiring layout data address lines, and the need to ensure a high-speed line; when at a high frequency, the trace of the PCB to be regarded as a transmission line. Transmission line has a characteristic impedance, transmission line theory learned know, when somewhere in the transmission line impedance mutation (mismatch) occurs, signal reflection occurs, the reflected signals interfere with the original, severe will affect the normal circuit jobs. When using four-layer board, the outer layer usually take the signal lines, respectively, two middle power and ground planes, so that one isolates the two signal layers, the outer layer is more important traces are formed close to the plane thereof, said as "microstrip" (A microstrip) transmission line, its impedance is relatively fixed, but can be calculated. For the two-layer board is more difficult to do so. This transmission line impedance mainly on the trace width of the line, the distance to the reference plane, and the thickness of the copper-clad dielectric properties of material related to many existing procedures and formulas for calculation. After the 33 ohm resistor in series usually end on driving (33 ohm fact, not necessarily from a few ohms to fifty or sixty Europe has, depending on the particular circuit), the effect of which is the output impedance of the transmitter and in series down impedance matching line, so that reflected (assuming the terminating impedance does not match solution) signal is not reflected back again (absorbed), signal receiving end so that it will not be affected. The receiving side can be matched, for example, a resistance connected in parallel, but in a digital system with relatively small, it is more troublesome, and many times are out of overcharging, such as an address bus, as the source matching and easy to do. Said shuttle frequency here is not necessarily very high clock rates the circuit is at a higher frequency than the frequency of watching, more importantly, it is to look up signal fall time. Generally it can be estimated by the rise (or fall) time-frequency circuit, and generally half the reciprocal of the rise time, such as if the 1ns rise time, then it is 1000MHz reciprocal, which means that circuit design considerations is of 500MHz frequency band Yaoan . Sometimes to deliberately slow down the edge of time, the slope of the output drive which many high-speed IC is adjustable. Configuration embedded Linux Linux itself includes a set of tools chain, easy to set up the development environment and operating environment of the embedded system crossing themselves, and may be barriers across the embedded system development simulation tools (ICE) is. Completely open the kernel so that people can design their own and develop real hard real-time systems and soft real-time systems in Linux can easily be realized. Strong network support makes it possible to use Linux network protocol stack will be the development of its embedded TCP / IP network protocol stack. Linux provides substantially complete embedding of the kernel and the user interface required for all, it is multi-faceted. It can handle embedded tasks and user interface. A small embedded Linux system requires only three basic elements: Embedded Linux Linux has constructed its own set of tools chain, easy to set up cross-development environment and runtime environment for embedded systems on their own, and barriers to the development of embedded systems simulation tools (ICE) can span. Completely open the kernel so that people can design their own and develop real hard real-time systems and soft real-time systems in Linux can easily be realized. Strong network support makes it possible to use Linux network protocol stack will be the development of its embedded TCP / IP network protocol stack. Linux provides substantially complete embedding of the kernel and the user interface required for all, it is multi-faceted. It can handle embedded tasks and user interface. A small embedded Linux system requires only three basic elements: Embedded Linux Linux has constructed its own set of tools chain, easy to set up cross-development environment and runtime environment for embedded systems on their own, and barriers to the development of embedded systems simulation tools (ICE) can span. Completely open the kernel so that people can design their own and develop real hard real-time systems and soft real-time systems in Linux can easily be realized. Strong network support makes it possible to use Linux network protocol stack will be the development of its embedded TCP / IP network protocol stack. Linux provides substantially complete embedding of the kernel and the user interface required for all, it is multi-faceted. It can handle embedded tasks and user interface. A small embedded Linux system requires only three basic elements:Guide tool Linux micro-kernel, the memory management, process management and transaction processing constitute the initialization process if you want it to do something and remain small, have to add: hardware drivers provide one or more application programs required functions . Add features, you may need these:A file system (perhaps in ROM or RAM), * TCP / IP networking stack Here we have to streamline the kernel, system startup, the driver, X-Window MicroWindows into four steps describe the actual development of embedded Linux. Streamline core kernel configuration commonly used commands include: make config, dep, clean, mrproper, zImage, bzImage, modules, modules_install. Command Description slightly. Let's use an example to explain: I am using Mandrake enclosed 2.2.15. I have not changed a single line of program code, modify configuration files get completely rely on these data. First, make config can remove all of the options are paid too. Do floppy; do not SMP, MTRR; do Networking, SCSI; all the block device is removed, leaving only the old IDE device; all the character device removed; all the filesystem removed, leaving only minix; do not sound support. Believe me, I've put all options are removed. After doing so, I got the heart of a 188K. Small enough it? OK, coupled with a move, please send the following two files in the -O3, -O2 replaced by -Os. ./Makefile. / Arch / i386 / kernel / Makefile As a result, the entire core smaller 9K, become 179K. However, the core functionality of Linux would be difficult to play, so I decided to go back and add the network. The network support General added back in, recompile, the core becomes 189 K. 10K plus on a TCP / IP stack, seems to be get on with business. There is no driver stack is all in vain, so I took the usual RTL8139 driver embedded board added back, 195K. If you need to DOS file system, it becomes the size of 213K. If using ext2 minix replacement, the size grow to 222K. Linux memory needed between about 600K ~ 800K. 1MB memory may be turned on, but less useful, because the serial C libraries have difficulties. 2MB of memory to be able to do something, but you want to 4MB or more before they can perform a more complete system. Because the Linux filesystem is quite large, about 230K, accounting for a third of the volume. Memory management accounts for the sum of 80K, and other core part of the same. TCP / IP stack accounted for 65K, drivers accounted for 120K. SysV IPC accounts for 21K, if necessary, can be removed, core files can be even smaller about 10K. If you want to crop the size of the core, should move there? The answer is obvious, of course, is the file system. Linux VFS simplifies the design of the file system, buffer cache, directory cache increases the efficiency of the system. But these embedded systems is simply not very useful. If they can be removed, about 20K core can be reduced immediately. If you skip the whole VFS, written directly to the file system type of a driver should be able to be reduced to about 230K 50K. The entire core shrink to about 100K. Boot the system boot sequence and related documents are still under the core source code directory, see the following documents: ./arch/$ARCH/boot/ bootsect.s ./arch/$ARCH/boot/setup.s ./init/ main.c bootsect. S and setup.S This program is the first program of the Linux kernel, including Linux own bootstrap program, but in the description of this program before, you must first explain the operation (turn here means "when the general IBM PC boot open PC power "). When a PC is generally opened the power is determined by the memory address FFFF: 0000 begin execution (this address must be in the ROM BIOS, generally in the ROM BIOS into FFFFFh FEOOOh), while the content here is a jump instruction, jump to another position located in the ROM BIOS starts executing the series of operations. Immediately after the system test code, control is transferred to the boot program (ROM bootstrap routine) ROM in. Zero track of the first sector of zero on this program from the disk into memory, as to where memory read it - absolute position 07C0:? 0000 (ie at 07C00h), which is characteristic of IBM PC series. And, it is the Linux bootsect program located on the Linux boot disk boot sector. The well known MS DOS and Linux boot section to be a superficial comparison. MS DOS responsibility of the boot program is located on the disk boot sector of the IO.SYS into memory, the DOS and IO.SYS are liable to the kernel --MSDOS. SYS loaded into memory task. And Linux is the responsibility of the bootsect program is located in the setup and the boot sector of the Linux kernel loaded into memory, then control to setup. Driver Linux systems, this set of entry points provided by the device driver to the system will be described by one structure. Device driver entry point is provided, in register with the system when the device driver initialization, so that the system call at the appropriate time. Linux system, registered character device driver to the system by calling register_chrdev. In Linux, in addition to directly modify the source code of the core system, the device driver is added to the core in the outside, the device drivers can be loaded as a module, it is loaded dynamically by the system administrator, to become part of the core . It can also be dynamically loaded modules unloaded by the system administrator. Linux, the modules can be written in C, compiled with gcc into object files (without links as a * .o files exist). This requires adding gcc -c parameter in the command line. (After calling register_chrdev success) after successfully registering the device driver to the system, you can use mknod command to the device mapped to a particular file. Other programs use this device, as long as this particular files to operate on the line. The X-Window replaced MicroWindows MicroWindows design method using a hierarchical structure. It allows different layers to suit practical application. At the lowest level, it provides the drive screen, mouse / touch screen and keyboard, so that the program can access the actual hardware devices and other customized equipment. Layer in the middle, there is a portable graphics engine, a drawing lines, filling areas, rendering polygons, clipping and color modes. At the upper level, it provides a different API for graphics applications. The API may or may not provide desktop and windows appearance. Currently, MicroWindows supports Windows Win32 / WinCE GDI and Nano-X API. The API provides close compatibility with Win32 and X Window System so that other applications can be easily ported to MicroWindows. o file exists). This requires adding gcc -c parameter in the command line. (After calling register_chrdev success) after successfully registering the device driver to the system, you can use mknod command to the device mapped to a particular file. Other programs use this device, as long as this particular files to operate on the line. The X-Window replaced MicroWindows MicroWindows design method using a hierarchical structure. It allows different layers to suit practical application. At the lowest level, it provides the drive screen, mouse / touch screen and keyboard, so that the program can access the actual hardware devices and other customized equipment. Layer in the middle, there is a portable graphics engine, a drawing lines, filling areas, rendering polygons, clipping and color modes. At the upper level, it provides a different API for graphics applications. The API may or may not provide desktop and windows appearance. Currently, MicroWindows supports Windows Win32 / WinCE GDI and Nano-X API. The API provides close compatibility with Win32 and X Window System so that other applications can be easily ported to MicroWindows. o file exists). This requires adding gcc -c parameter in the command line. (After calling register_chrdev success) after successfully registering the device driver to the system, you can use mknod command to the device mapped to a particular file. Other programs use this device, as long as this particular files to operate on the line. The X-Window replaced MicroWindows MicroWindows design method using a hierarchical structure. It allows different layers to suit practical application. At the lowest level, it provides the drive screen, mouse / touch screen and keyboard, so that the program can access the actual hardware devices and other customized equipment. Layer in the middle, there is a portable graphics engine, a drawing lines, filling areas, rendering polygons, clipping and color modes. At the upper level, it provides a different API for graphics applications. The API may or may not provide desktop and windows appearance. Currently, MicroWindows supports Windows Win32 / WinCE GDI and Nano-X API. The API provides close compatibility with Win32 and X Window System so that other applications can be easily ported to MicroWindows. API. The API provides close compatibility with Win32 and X Window System so that other applications can be easily ported to MicroWindows. API. The API provides close compatibility with Win32 and X Window System so that other applications can be easily ported to MicroWindows.

Guess you like

Origin blog.51cto.com/14355585/2414439