第1篇:嵌入式应用实践总结
嵌入式应用实践总结
嵌入式系统无疑是当前最热门最有发展前途的IT应用领域之一。以下小编为你带来嵌入式应用实践总结,希望对你有所帮助!
嵌入式应用实践总结篇1
嵌入式系统用在一些特定专用设备上,通常这些设备的硬件资源(如处理器、存储器等)非常有限,并且对成本很敏感,有时对实时响应要求很高等。特别是随着消费家电的智能化,嵌入式更显重要。像我们平常常见到的手机、PDA、电子字典、可视电话、VCD/DVD/MP3 Player、数字相机(DC)、数字摄像机(DV)、U-Disk、机顶盒(Set Top Box)、高清电视(HDTV)、游戏机、智能玩具、交换机、路由器、数控设备或仪表、汽车电子、家电控制系统、医疗仪器、航天航空设备等等都是典型的嵌入式系统。
看到了嵌入式系统的范围,你也应该知道嵌入式系统工程师是做什么的,就是开发上面的那些电子产品的工程师。
首先C语言,这个是毋庸置疑的,不管是做嵌入式软件还是硬件开发的人员,对C语言的掌握这个是必需的,特别是对于以后致力于嵌入式软件开发的人,现在绝大部分都是用C语言,你说不掌握它可以吗?至于如何学习C语言,我想这些基础的知识每个人都有自己的方法,关键要去学习,看书也好,网上找些视频看也好。很多人会问,C语言要学到怎么样,我觉得这没有标准的答案。我想至少你在明白了一些基础的概念后,就该写代码了,动手才是最重要的,当你动手了,遇到问题了,再反过来学习,反过来查查课本,那时的收获就不是你死看书能得到的。
其次,应该对操作系统有所了解,这对你对硬件和软件的理解,绝对有很大的帮助。应该把系统的管理理解一下,比如进程、线程,系统如何来分配资源的,系统如何来管理硬件的,当然,不是看书就能把这些理解透,如果不是一时能理解,没关系,多看看,结合以后的项目经验,会有更好的理解的。
还有应该学习嵌入式系统,如linux或者wince下的编程,这些对以后做应用的编程很有帮助,当然,如果做手机的话,那可以学习MTK、塞班、Android等操作系统,Android是以后发展的趋势,现在很热门,Android也是基于linux系统封装的,所以建议先学习下linux。
还有,应该学习下单片机或者ARM或者MIPS,很多人说我没有单片机的经验,直接学ARM可以吗?我觉得那完全没有问题的,当然如果你学习过单片机,那最好不过了,以后学习ARM就更简单了。
最后如果你把以上的知识都有所了解后,就该去阅读阅读一些优秀的代码,比如结合arm芯片手册学习去学习下UBOOT的源代码,了解下最小的系统开发,那对你整个嵌入式开发的非常有帮助的,可以的话,还可以学习下linux的源代码,当然如果你直接阅读2.6的代码,我想你会很痛苦的,可以先看看linux 代码早期的版本,比如0.12 的代码等等,麻雀虽小,五脏俱全,如果你全看完了,那我想你就是一名很成功的嵌入式工程师。
至于上面说的知识如何学习呢?每个人都应该去找自己最好的方法,所谓的最好的方法就是最适合自己的方法。很多人看不进书,那就去看看视频吧。视频也应该要选择,不是随便看看,应该要有所选择,有所挑选。我也是这样一路走过来的,不过我这人比较懒,我看不进书,一看书我就想睡觉,所以这几年我都是看视频过来的,现在也算学有所成,但也不敢说是高手吧。
我在网上看到,有人把自己学习嵌入式的视频总结出来,嵌入式系列实践和视频教程,大家可以看看网址我仔细看了觉得很不错,我本来也想整理下,可是奈何我自己的电脑硬盘空间才40G,没有办法,时间也是不够,心有余而力不足,我不是在帮他做广告,虽然要花钱,我觉得算不错,至少自己不用去整理和花大量的时间去找资源,当然如果网上有的下,你网速和硬盘都够的话,我建议大家自己网上下也好。想想我自己该开始学的时候,那时视频资源少之又少,我买书和买视频至少花了几千块,但是我觉得那很值,至少我现在赚回来了很多知识。
最后,希望这篇文章对热爱嵌入式,想致力于嵌入式开发的朋友有所帮助。送给大家一句简单而又朴素的话,坚持就是胜利,贵在坚持,也可以看看如何坚持嵌入式学习!
嵌入式应用实践总结篇2
首先我声明,我是基于嵌入式系统平台级设计的,硬件这个方向我相对来讲比较有发言权,如果是其它方面所要具备的基本技能还要和我们培训中心其它专业级讲师沟通。他们的方面上我只能说是知道些,但不是太多,初级的问题也可以问我。
对于硬件来讲有几个方向,就单纯信号来分为数字和模拟,模拟比较难搞,一般需要很长的经验积累,单单一个阻值或容值的精度不够就可能使信号偏差很大。因此年轻人搞的较少,随着技术的发展,出现了模拟电路数字化,比如手机的Modem射频模块,都采用成熟的套片,而当年国际上只有两家公司有此技术,自我感觉模拟功能不太强的人,不太适合搞这个,如果真能搞定到手机的射频模块,只要达到一般程度可能月薪都在15K以上。
另一类就是数字部分了,在大方向上又可分为51/ARM的单片机类,DSP类,FPGA类,国内FPGA的工程师大多是在IC设计公司从事IP核的前端验证,这部分不搞到门级,前途不太明朗,即使做个IC前端验证工程师,也要搞上几年才能胜任。DSP硬件接口比较定型,如果不向驱动或是算法上靠拢,前途也不会太大。而ARM单片机类的内容就较多,业界产品占用量大,应用人群广,因此就业空间极大,而硬件设计最体现水平和水准的就是接口设计这块,这是各个高级硬件工程师相互PK,判定水平高低的依据。而接口设计这块最关键的是看时序,而不是简单的连接,比如PXA255处理器I2C要求速度在100Kbps,如果把一个I2C外围器件,最高还达不到100kbps的与它相接,必然要导致设计的失败。这样的情况有很多,比如51单片机可以在总线接LCD,但为什么这种LCD就不能挂在ARM的总线上,还有ARM7总线上可以外接个Winband的SD卡控制器,但为什么这种控制器接不到ARM9或是Xscale处理器上,这些都是问题。因此接口并不是一种简单的连接,要看时序,要看参数。 一个优秀的硬件工程师应该能够在没有参考方案的前提下设计出一个在成本和性能上更加优秀的`产品,靠现有的方案,也要进行适当的可行性裁剪,但不是胡乱的来,我遇到一个工程师把方案中的5V变1.8V的DC芯片,直接更换成LDO,有时就会把CPU烧上几个。前几天还有人希望我帮忙把他们以前基于PXA255平台的手持GPS设备做下程序优化,我问了一下情况,地图是存在SD卡中的,而SD卡与PXA255的MMC控制器间采用的SPI接口,因此导致地图读取速度十分的慢,这种情况是设计中严重的缺陷,而不是程序的问题,因此我提了几条建议,让他们更新试下再说。因此想成为一个优秀的工程师,需要对系统整体性的把握和对已有电路的理解,换句话说,给你一套电路图你终究能看明白多少,看不明白80%以上的话,说明你离优秀的工程师还差得远哪。其次是电路的调试能力和审图能力,但最最基本的能力还是原理图设计PCB绘制,逻辑设计这块。这是指的硬件设计工程师,从上面的硬件设计工程师中还可以分出ECAD工程师,就是专业的画PCB板的工程师,和EMC设计工程师,帮人家解决EMC的问题。硬件工程师再往上就是板级测试工程师,就是C语功底很好的硬件工程师,在电路板调试过程中能通过自已编写的测试程序对硬件功能进行验证。然后再交给基于操作系统级的驱动开发人员。
总之,硬件的内容很多很杂,硬件那方面练成了都会成为一个高手,我时常会给人家做下方案评估,很多高级硬件工程师设计的东西,经常被我一句话否定,因此工程师做到我这种地步,也会得罪些人,但硬件的确会有很多不为人知的东西,让很多高级硬件工程师也摸不到头脑。
那么高级硬件件工程师技术技能都要具备那些东西哪,首先要掌握EDA设计的辅助工具类如ProtelORCADPowperPCBMaplux2ISE、VDHL语言,要能用到这些工具画图画板做逻辑设计,再有就是接口设计审图能力,再者就是调试能力,如果能走到总体方案设计这块,那就基本上快成为资深工程师了。
硬件是要靠经验,也要靠积累的,十年磨一剑,百年磨一针。
把一个月前想写的东西,今天终于用一上午的进间整理完了,希望对喜爱嵌入式系统开发的工程师和学生们有所帮助。
第2篇:嵌入式Linux应用:概述
Embedded Linux applications: An overview Linux now spans the spectrum of computing applications, including IBM's tiny Linux wrist watch, hand-held devices(PDAs and cell phones), Internet appliances, thin clients, firewalls, industrial robotics, telephony infrastructure equipment, and even cluster-based supercomputers.Let's take a look at what Linux has to offer as an embedded system, and why it's the most attractive option currently available.One.Emergence of embedded systems The computers used to control equipment, otherwise known as embedded systems, have been around for about as long as computers themselves.They were first used back in the late 1960s in communications to control electrome chanical telephone switches.As the computer industry has moved toward ever smaller systems over the past decade or so, embedded systems have moved along with it, providing more capabilities for these tiny machines.Increasingly, these embedded systems need to be connected to some sort of network, and thus require a networking stack, which increases the complexity level and requires more memory and interfaces, as well as, you gueed it, the services of an operating system.Off-the-shelf operating systems for embedded systems began to appear in the late 1970s, and today several dozen viable options are available.Out of these, a few major players have emerged, such as VxWorks, pSOS, Neculeus, and Windows CE.Two.Advantages/disadvantages of using Linux for your embedded system Although most Linux systems run on PC platforms, Linux can also be a reliable workhorse for embedded systems.The popular “back-to-basics” approach of Linux, which makes it easier and more flexible to install and administer than UNIX, is an added advantage for UNIX gurus who already appreciate the operating system because it has many of the same commands and programming interfaces as traditional UNIX.The typical shrink-wrapped Linux system has been packaged to run on a PC, with a
hard disk and tons of memory, much of which is not needed on an embedded system.A fully featured Linux kernel requires about 1 MB of memory.However, the Linux micro-kernel actually consumes very little of this memory, only 100 K on a Pentium CPU, including virtual memory and all core operating system functions.With the networking stack and basic utilities, a complete Linux system runs quite nicely in 500 K of memory on an Intel 386 microproceor, with an 8-bit bus(SX).Because the memory required is often dictated by the applications needed, such as a Web server or SNMP agent, a Linux system can actually be adapted to work with as little as 256 KB ROM and 512 KB RAM.So it's a lightweight operating system to bring to the embedded market.Another benefit of using an open source operating system like Embedded Linux over a traditional real-time operating system(RTOS), is that the Linux development community tends to support new IP and other protocols faster than RTOS vendors do.For example, more device drivers, such as network interface card(NIC)drivers and parallel and serial port drivers, are available for Linux than for commercial operating systems.The core Linux operating system itself has a fairly simple micro-kernel architecture.Networking and file systems are layered on top of the micro-kernel in modular fashion.Drivers and other features can be either compiled in or added to the kernel at run-time as loadable modules.This provides a highly modular building-block approach to constructing a custom embeddable system, which typically uses a combination of custom drivers and application programs to provide the added functionality.An embedded system also often requires generic capabilities, which, in order to avoid re-inventing the wheel, are built with off-the-shelf programs and drivers, many of which are available for common peripherals and applications.Linux can run on most microproceors with a wide range of peripherals and has a ready inventory of off-the-shelf applications.Linux is also well-suited for embedded Internet devices, because of its support of multiproceor systems, which lends it scalability.This capability gives a designer the option of running a real-time application on a dual proceor system, increasing total proceing power.So you can run a Linux system on one proceor while running a GUI, for example, simultaneously on another proceor.The one disadvantage to running Linux on an embedded system is that the Linux architecture provides real-time performance through the addition of real-time software modules that run in the kernel space, the portion of the operating system that implements the scheduling policy, hardware-interrupts exceptions and program execution.Since these
real-time software modules run in the kernel space, a code error can impact the entire system's reliability by crashing the operating system, which can be a very serious vulnerability for real-time applications.An off-the-shelf RTOS, on the other hand, is designed from the ground up for real-time performance, and provides reliability through allocating certain procees a higher priority than others when launched by a user as opposed to by system-level procees.Procees are identified by the operating system as programs that execute in memory or on the hard drive.They are aigned a proce ID or a numerical identifier so that the operating system may keep track of the programs currently executing and of their aociated priority levels.Such an approach ensures a higher reliability(predictability)with the RTOS time than Linux is capable of providing.But all-in-all, it's still a more economical choice.Three.Different types of Embedded Linux systems There are already many examples of Embedded Linux systems;it's safe to say that some form of Linux can run on just about any computer that executes code.The ELKS(Embeddable Linux Kernel Subset)project, for example, plans to put Linux onto a Palm Pilot.Here are a couple of the more well-known small footprint Embedded Linux versions: ETLinux--a complete Linux distribution designed to run on small industrial computers, especially PC/104 modules.LEM--a small(
A minimal Embedded Linux system needs just three eential elements:
A boot utility
The Linux micro-kernel, composed of memory management, proce An initialization proce Drivers for hardware
One or more application procees to provide the needed functionality A file system(perhaps in ROM or RAM)TCP/IP network stack
A disk for storing semi-transient data and swap capability A 32-bit internal CPU(required by all complete Linux systems)management and timing services
To doing anything useful while remaining minimal, you also need to add:
As additional requirements become neceary, you might also want:
Four.Hardware platform options Choosing the best hardware can be complex because of internal company politics, prejudices, legacies of other projects, a lack of complete or accurate information, and cost, which should take into account the total product costs and not just the CPU itself.Sometimes a fast, inexpensive CPU can become expensive once bus logic and the delays neceary to make it work with other peripherals are considered.To calculate the neceary speed of a CPU for any given project, start with a realistic view of how fast the CPU needs to run to accomplish a given task and triple it.Also, determine how fast the bus needs to run.If there are secondary buses, such as a PCI bus, consider them also.A slow bus(that is, one that is saturated with DMA traffic)can significantly slow down a fast CPU.Here are some of the best hardware solutions for Embedded Linux applications.Bright Star Engineering: Bright Star Engineering's ipEngine-1 is a credit-card sized single-board computer with Embedded Linux support.It utilizes a PowerPC-based CPU and provides an array of on-board peripherals, including Ethernet, LCD/Video Controller, USB, Serial I/O, and a 16K gate user-configurable FPGA.BSE's Embedded Linux configuration allows Linux to be booted from the ipEngine's on-board 4MB flash memory.Calibri: CalibriTM-133 is a ready-to-use, compact, multipurpose network appliance
that uses Embedded Linux as its operating system.It offers a highly efficient and low-cost solution to firewall, VPN, and routing demands.EmbeddedPlanet: EmbeddedPlanet has created a PostPC-era computer that comes loaded with MontaVista's HardHat Linux.Powered by a PowerPC-based computing engine and matching I/O card, Linux Planet comes in a colorful translucent case with a touchscreen and acce to digital and analog I/O.Eurotech: Eurotech provides embedded PC SBC and sponsors ET-Linux, a complete Linux system designed to run on small industrial computers and based on glibc 2.1.2.Microproce Ingenierie: Microproce develops, produces, and sells standard and customized products for the industrial and embedded market.Microproce has a global activity in real-time software and great expertise in systems integration.Its products, like the 740 PowerPC compactPCI board, can be ordered with a standard distribution of Linux or an Embedded Linux version.Moreton Bay: Moreton Bay is releasing their NETtel 2520 and NETtel 2500 range of Linux-based Internet routers.These small, easy-to-connect intelligent router solutions are engineered to offer a simple, secure, and affordable extranet-friendly Virtual Private Network(VPN)for flat networks.The NETtel router family runs an Embedded Linux kernel.A development kit is available;it enables customized code to be stored in flash memory and executed inside the NETtel.The code may contain special encryption or authentication protocols, or some local monitoring script where NETtel is used as a remote control device.Matrix Orbital: This an optional, but not recommended, addition.Matrix Orbital manufactures a line of serial LCDs and VFDs, which many Linux users are including in their embedded systems.The product line ranges from 8x2 to 40x4 character LCDs, 20x2 and 20x4 VFDs, plus a 240x64 graphic LC(128x128 on the way).Communication with the displays is accomplished via either RS232 or I2C, both of which are standard on all of their modules.A comprehensive command set is included in the modules' BIOS.Five.Real-time Embedded Linux applications One of the most important iues with embedded systems is the need for a real-time operating system.The definition of real-time here varies quite a bit.To some people, real-time means responding to an event in the one-microsecond range, to others it is 50 milliseconds.The hardne of real-time also varies quite a bit.Some systems need hard
real-time response, with short deterministic response latencies to events.However, on many systems, when analyzed closely, we see a response time requirement that is actually near real-time.Often the real-time requirement is a tradeoff of time and buffer space.With memory getting cheaper, and CPUs getting faster, near real-time is now more typical than hard real-time and many commercial operating systems that claim to be real-time are far from being hard real-time.Usually, when you get into the detailed design of these systems, there are warnings that the drivers' interrupts and applications must be very carefully designed in order to meet real-time requirements.RT-Linux(Linux with real-time extensions)contains time critical functions to provide precise control over interrupt handling, through the use of an interrupt manager, and does a good job of making sure that critical interrupts get executed when needed.The hardne of this approach depends mostly on the CPU interrupt structure and context-switch hardware support.This approach is sufficient for a large range of real-time requirements.Even without the real-time extensions, Linux does pretty well at keeping up with multiple streams of events.For example, a Linux PC system on a low end Pentium is able to keep multiple 10BaseT interfaces executing effectively, while simultaneously running character-level serial ports at a full 56KBPS without losing any data.Some real-time hardware and software Linux APIs to consider are RTLinux, RTAI, EL, and Linux-SRT.RTLinux is a hard real-time Linux API originally developed at the New Mexico Institute of Technology.RTAI(DIAPM)is a spin-off of the RTLinux real-time API that was developed by programmers at the Department of Aerospace Engineering, Polytechnic Politecnico di Milano(DIAPM).EL/IX is a proposed POSIX-based hard real-time Linux API being promoted by Red Hat.And Linux-SRT is a soft real-time alternative to real-time APIs, which provides performance-enhancing capabilities to any Linux program without requiring that the program be modified or recompiled.See the Resources section later in this article for information on the above and for some Web sites offering different flavors of software extensions, development tools, support, and training courses for the standard Linux operating system.Short deterministic response latencies Some real-time embedded systems need to respond quickly to external events in order to accomplish a specific task.A custom microcontroller embedded inside a miile, for example, needs to respond quickly to external events such as moving targets, weather, humans, etc., before instructing the miile to target a specific object in its surrounding
environment.Short deterministic response latencies mean that the embedded system can determine the time it will take to respond to an external event.Six.Configuration procedures Now let's take a look at how to make LEM, a small, embeddable Linux distribution, which provides both network and X server.You can download this distribution, although it is not eential.You will need a full Linux distribution to build your own Embedded Linux operating system, which will contain everything you need(utilities, sources, compiler, debugger, and documentation).Here is a list of the software that can be used to make LEM: TinyLogin: TinyLogin is a suite of tiny UNIX utilities for handling logging into, being authenticated by, changing one's paword for, and otherwise maintaining users and groups on an embedded system.It also provides shadow paword support to enhance system security.TinyLogin is, as the name implies, very small, and makes an excellent complement to BusyBox on an embedded System.BusyBox: BusyBox is a multicall binary used to provide a minimal subset of POSIX-style commands and specialized functions.It is geared toward the very small, such as boot floppies, embedded systems, etc.Specifically it is used in the Debian Rescue/Install system(which inspired development on the original BusyBox), the Linux Routeur Project, LEM, lineo, and others.Busybox is being maintained by Erik Andersen.Ash: Ash is a very small Bourne shell.Sysvinit: Sysvinit is the most used init package for Linux.We will use init and the C version of the start-stop-daemon.See the Resources section for more information on these items.Seven.Creating a bootdisk A bootdisk is basically a miniature, self-contained Linux system on a floppy diskette.It can perform many of the same functions that a complete full-size Linux system performs.The following material is based on the Bootdisk-HOWTO(see Resources).Step 1.Bios
All PC systems start the boot proce by executing code in ROM(specifically, the BIOS)to load the sector from sector 0, cylinder 0 of the boot drive.The boot drive is usually the
first floppy drive(designated A: in DOS and /dev/fd0 in Linux).The BIOS then tries to execute this sector.On most bootable disks, sector 0, cylinder 0 contains either:
Code from a boot loader such as LILO, which locates the kernel, loads it, and The start of an operating system kernel, such as Linux executes it to start the boot proper
If a Linux kernel has been raw copied to a diskette, a hard drive, or another media, the first sector of the disk will be the first sector of the Linux kernel itself.This first sector will continue the boot proce by loading the rest of the kernel from the boot device.Step 2.The boot loader
You will use a boot loader like LILO to operate the boot proce.It allows the development and production platforms to co-exist on the same hardware and permits switching from one to the other just by rebooting.The LILO boot loader is loaded by the bios.It then loads kernels or the boot sectors of other operating systems.It also provides a simple command line interface to interactively select the item to boot with its options.See Resources for more information on LILO.Step 3.The kernel
The kernel checks the hardware and mounts the root device and then looks for the init program on the root filesystem and executes it.Step 4.Init Init is the parent of all other procees that will run on your Linux OS.It will watch its child procees and start, stop, re-launch them if needed.Init takes all information from /etc/inittab.Step 5.Inittab The file /etc/inittab/ refers to scripts named /etc/rc...to do the system setup.It also has entries for the getty tool to handle the login proce.Step 6.The login proce
There is one getty available in the inittab file for each console allowed for the users.Getty will launch /bin/login to verify the user paword.Step 7.Creating a new partition
From the LFS-HOWTO(see Resources): Before we can build our new Linux system, we need to have an empty Linux partition on which we can build our new system.If you already have a Linux Native partition available, you can skip this step and the following one.Start the fdisk program(or cfdisk if you prefer that program)with the appropriate hard disk as the option(like /dev/hda if you want to create a new partition on the primary
master IDE disk).Create a Linux Native partition, write the partition table, and exit the(c)fdisk program.If you get the meage that you need to reboot your system to ensure that the partition table is updated, then please reboot your system now before continuing.Step 8.Creating an ext2 file system on the new partition
From the LFS-HOWTO(see Resources): To create a new ext2 file system we use the mke2fs command.Give $LFS as the only option, and the file system will be created.From now on I'll refer to this newly created partition as $EMBPART.$EMBPART should be substituted with the partition you have created.Step 9.Mounting the partition
To acce the newly created filesystem, you have to mount it.To do this, create an /mnt/hda? directory and type the following at the shell prompt:
mkdir /mnt/hda? mount $EMBPART /mnt/hda? If you created your partition on /dev/hda4 and you mounted it on /mnt/hda4, then you'll need to return to the step where you copied a file to $dollar;EMBPART/usr/sbin, and copy that file to /mnt/hda4/usr/bin.Do this after the last command in Step 14(Copy the file in $EMBPART/usr/sbin).Step 10.Populating the filesystem
The root filesystem must contain everything needed to support a full Linux system.We will build a directory structure not that far from the File Hierarchy Standard(see Resources).Step 11.Directories The mkdir function in the new mounted filesystem creates the following directories: /proc
Directory stub required by the proc filesystem /etc :System configuration file /sbin :Critical System binaries
/bin :Basic binaries considered part of the system /lib :Shared Libraries to provide run-time support /mnt :Mount point for maintenance /usr :Additional utilities and applications
cd /mnt/hda?
mkdir bin dev home proc sbin usr boot etc liv mnt root tmp var mkdir-p usr/bin usr/sbin usr/share usr/lib mkdir-p etc/config etc/default etc/init.d etc/rc.boot
mkdir-p etc/rc0.d etc/rc1.d etc/rc2.d etc/rc3.d etc/rc4.d etc/rc5.d etc/rc6.d etc/rcS.d
/dev :The dev directory is the stub required to perform devices input / output.Each file in this directory may be created using the mknod function.You may save time by directly copying the required dev entries from your desktop Linux, using the following instruction: cp-dpR /dev /mnt Eight.Installing TinyLogin and login dependencies TinyLogin(see the Resources section to install it)will give us the following tools in le than 35Kb:
/bin/addgroup, /bin/adduser, /bin/delgroup, /bin/deluser, /bin/login, /bin/su, /sbin/getty, /sbin/sulogin, /usr/bin/pawd.Please refer to your main distribution doc or man pages for a full description of those commands.Step 12.Configuring TinyLogin
From the TinyLogin README: TinyLogin is modularized to help you build only the components you need, thereby reducing binary size.To turn off unwanted TinyLogin components, simply edit the file tinylogin.def.h and comment out the parts you do not want using C++ style(//)comments.Step 13.Installing TinyLogin After the build is complete, a tinylogin.links file is generated, which is then used by make install to create symlinks to the tinylogin binary for all compiled-in functions.By default, make install will place a symlink forest into pwd /_install unle you have defined the PREFIX environment variable.Step 14.Installing Sysvinit and start-stop daemon
After the kernel is done loading, it tries to run the init program to finalize the boot proce.Now: 1.Unpack the Sysvinit archive 2.Go to the src directory
3.Copy the init executable in $EMBPART/sbin
The Sysvinit package also offers a C version of the start-stop-daemon in the contrib directory.1.Compile it
2.Copy the file in $EMBPART/usr/sbin Step 15.Configuring Sysvinit
Sysvinit needs a configuration file named inittab, which should be placed in $EMBPART/etc.Here is the one used in the LEM distribution: # /etc/inittab: init(8)configuration.# $Id: inittab,v 1.6 1997/01/30 15:03:55 miquels Exp $ # Modified for LEM 2/99 by Sebastien HUET # default rl.id:2:initdefault: # first except in emergency(-b)mode.si::sysinit:/etc/init.d/rcS # single-user mode.~~:S:wait:/sbin/sulogin # /etc/init.d executes the S and K scripts upon change # 0:halt 1:single-user 2-5:multi-user(5 may be X with xdm or other)6:reboot.l0:0:wait:/etc/init.d/rc 0 l1:1:wait:/etc/init.d/rc 1 l2:2:wait:/etc/init.d/rc 2 l3:3:wait:/etc/init.d/rc 3 l4:4:wait:/etc/init.d/rc 4 l5:5:wait:/etc/init.d/rc 5 l6:6:wait:/etc/init.d/rc 6 # CTRL-ALT-DEL preed.ca:12345:ctrlaltdel:/sbin/shutdown-t1-r now # Action on special keypre(ALT-UpArrow).kb::kbrequest:/bin/echo “Keyboard Request--edit /etc/inittab to let this work.” # /sbin/mingetty invocations for runlevels.1:2345:respawn:/sbin/getty 9600 tty1 2:23:respawn:/sbin/getty 9600 tty2 #3:23:respawn:/sbin/getty tty3 #you may add console there #4:23:respawn:/sbin/getty tty4 Step 16.Creating initial boot scripts
As seen in the inittab file, Sysvinit needs additional scripts in its own directories.Step 17.Creating the neceary directories and base files
Use the following command to create the directories: cd $EMBPART/etc mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d init.d rcS.d rc.boot Go to the unpacked Sysvinit source directory Copy the debian/etc/init.d/rc to:$EMBART/etc/init.d Go to the $EMBPART/etc/init.d/ Create a new file rcS like those in LEM: #!/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin runlevel=S prevlevel=N umask 022 export PATH runlevel prevlevel /etc/default/rcS export VERBOSE # Trap CTRL-C only in this shell so we can interrupt subprocees.trap “:” 2 3 20 # Call all parts in order.for i in /etc/rcS.d/S??* do
[!-f “$i” ] && continue
case “$i” in
*.sh)
(trap-2 3 20
.$i start)
;;
*)
$i start
;;
esac done # run the files in /etc/rc.boot [-d /etc/rc.boot ] && run-parts /etc/rc.boot
Copy run-parts from your distro to $EMBPART/bin.Step 18.Adding base scripts
A lot of the commands being used here are UNIX/Linux commands that set, export, etc.paths that are embedded inside of a UNIX shell script.Create a new file reboot containing the following: #!/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin echo-n “Rebooting...” reboot-d-f-i Create a new file halt containing the following: #!/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin halt-d-f-i-p
Nine.Summary The Linux operating system has a very bright future in the area of embedded applications for anything from Internet appliances to dedicated control systems.Roughly 95% of all newly manufactured microcomputer chips are used for embedded applications.The power, reliability, flexibility, and scalability of Linux, combined with its support for a multitude of microproceor architectures, hardware devices, graphics support, and communications protocols have established Linux as an increasingly popular software platform for a vast array of projects and products.Because Linux is openly and freely available in source form, many variations and configurations of Linux and its supporting software components have evolved to meet the diverse needs of the markets and applications to which Linux is being adapted.There are small footprint versions and real-time enhanced versions.Despite the origins of Linux as a PC architecture operating system, there are now ports to numerous non-x86 CPUs, with and without memory management units, including PowerPC, ARM, MIPS, 68K, and even microcontrollers.But look out, there's more coming in the near future for many other Information Technology(IT)domains!
第3篇:嵌入式总结
一、嵌入式系统原理与应用课程总结
这个学期我学习了《嵌入式原理与应用》这门课程,虽然这个学期马上就要结束了,对嵌入式的学习也要告一段落了,但是我觉得收获还是很大的。学期开始,我开始学习《嵌入式系统及应用》,由于初次接触嵌入式系统,感觉蛮难的,所以收获不是很大,很多的概念都比较模糊,真是茫然无从下手。虽然一个学期的学习时间不是很长,但是我觉得对嵌入式系统也已经有了一个大致的概念。对它的历史发展与今后展望都有了一定的了解。嵌入式技术的掌握是需要一个过程的,对嵌入式技术的全面掌握是有相当难度的。如果要真正掌握的话还是需要一步步积累才能熟练掌握的,所以我们还要自己多加学习,不断地回顾以前学到的知识,也要吸收新的概念与技术,使自己的学习目标更加明确,学习方法更加完善,也体会到软件开发的乐趣,更加清楚的认识
第4篇:专业嵌入式实践报告
实习的相关行业改革开放以来历史变迁研究
一、实践方案策划
(一)确定实践主题
由于对金融业历史的浓厚兴趣,本人选择的实践主题为实习的相关行业改革开放以来历史变迁研究,具体来讲,本人将调研改革开放后中国银行业的历史变迁。
(二)实践背景概述
改革开放是我国经济转型与发展的重要时期,许多传统行业的运作模式改变,许多新兴行业从无到有,在大胆尝试和改变的过程中,我国的经济状况发生了翻天覆地的变化。银行作为基础的企业融资和居民储蓄的机构,扮演着重要的沟通投资人与融资人间的桥梁角色,经济发展的规律要求银行系统在实体经济改革中要随着居民与企业的需求提供相应的服务,同时自身也要推陈出新,满足本行业创新与发展的需要。而我国自改革开放以来,银行业也确实经历了迅猛的发展,了解银行的发展历史,对今后进入该系统工作,亦或在现有基
第5篇:嵌入式系统设计与应用
第一章:
嵌入式系统定义:以应用为中心,以计算机技术为基础,软硬件可裁剪,适应应用系统对功能,可靠性,成本,体积,功耗严格要求的专用计算机系统。(一切非PC计算机系统)嵌入式系统特点:“专用”计算机系统,运行环境差异很大,比通用PC系统资源少,功耗低,体积小,集成度高,成本低,具有完整的系统测试和可靠性评估体系,具有较长的生命周期,需要专用开发工具和方法进行设计,包含专用调试电路,多学科知识集成系统。嵌入式系统应用范围:汽车,工业控制,通信设备,消费电子,商业终端,航空航天,军事需求。
嵌入式系统的基本开发流程:系统定义与需求分析阶段,方案设计阶段,详细设计阶段,软、硬件集成测试阶段,系统功能性测试及可靠性测试阶段。
系统定义与需求分析阶段:对系统需求进行分析,制定系统的设计依据。方案设计阶段:确定