嵌入式系统的网络服务器外文翻译、中英文翻译、外文文献翻译
- 格式:doc
- 大小:1.47 MB
- 文档页数:14
Implementation and Evaluation for Sophisticated Periodic ExecutionControl in Embedded SystemsYuuki Furukawa, Toshihiro Yamauchi and Hideo Taniguchi Graduate School of Natural Science and Technology, Okayama Universityfurukawa@swlab.cs.okayama-u.ac.jp, {yamauchi, tani}@cs.okayama-u.ac.jpAbstractEmbedded systems are complicated, and a large number of these systems are widely used today. In embedded systems, the types of processings to be executed are limited, and many processes are executed periodically. In such systems, we need to reduce the overhead of periodic execution control and the dispersion of the processing time. ART-Linux has been proposed as a conventional real-time operating system that can be used for this purpose in various devices such as robots. In this paper, we discuss the periodic execution control of ART-Linux and clarify several problems. Next, we propose a design for sophisticated periodic execution control in order to solve these problems. In addition, we discuss the realization of periodic execution control, and the effects of the proposed control. Finally, we show the results of our evaluation for the release and the wait to clarify the effects of the proposed control.Keywords: P eriodic execution control, Scheduling, ART-Linux, Control overhead, Real-time process1. IntroductionEmbedded systems are complicated, and a large number of these systems are widely used today [1]. Therefore, it is important to upgrade the software that controls the resources of the embedded devices. In embedded systems, the types of processings to be executed are limited, and many processes are executed periodically. An example of such a process is a process that controls the motor of a robot; this process needs to be executed every 5 ms. Such a process must be executed before a deadline, and this is an example of real-time processing. In this case, we need to reduce the overhead of the periodic execution control and the dispersion of the processing time.ART-Linux [2][3][4] has been proposed as a conventional real-time operating system that can be used in devices such as robots [5]. In ART-Linux, we can use the application program (AP) and the device driver for Linux, the real-time process with the short period can be periodically executed without significant jitter. There have been studies related to the improvement of the performance of ART-Linux [6].In this paper, we discuss the periodic execution control of ART-Linux and clarify several problems. Next, we propose a design of a sophisticated periodic execution control to solve these problems. In addition, we discuss the realization of periodic execution control, and the effects of the proposed control. Finally, we present the evaluations of the control overhead and the dispersion of the processing time to clarify the effects of the proposed control.2.1. Periodic Execution ControlART-Linux is a real-time operating system based on Linux. We refer to processes executed periodically as real-time processes; all other processes are termed non-real-time processes.ART-Linux manages real-time processes and non-real-time processes separately. Real-time processes have a higher priority than non-real-time processes. That is, non-real-time processes are executed only when there are no real-time processes to be executed.We show the periodic execution control of ART-Linux in figure 1. The ready queue in figure 1 manages the real-time processes that are in a ready state so that the processes can be executed on the basis of priority. We call this the ready state. The wait queue manages the real-time processes that are in a wait state. We call the transition from the wait queue to the ready queue a release. In the next few paragraphs, we explain the processing of the periodic execution control of ART-Linux.1. RegisterWhen a non-real-time process requires registration, this process is connected to the ready queue. Consequently, it is managed as a real-time process. This real-time process is assigned a period and a priority.2. ExecuteIf there is already a real-time process in the ready queue, the real-time processes are executed on the basis of their priorities.3. WaitA real-time process requires a wait when the processing of the real-time process for oneperiod is finished. Then, this real-time process is disconnected from the ready queue, connected to the wait queue, and set a waiting time. The waiting time is the time from the next release time of the real-time process before this one in the wait queue to the next release time of this real-time process. In this way, the real-time process waits until its next release time.4. ReleaseAt the time of a timer interrupt, the waiting time of the real-time process at the top of the wait queue is calculated. If the resulting value is less than 0, the real-time process is disconnected from the wait queue and connected to the ready queue. Then, the waiting time of the next real-time process in the wait queue is calculated, and the release of this real-time process is judged. The above step is repeated until the waiting time after calculation is greater than 0 or until all real-time processes are disconnected from the wait queue. In other words, the above step is repeated until all real-time processes reaching a release time are connected to the ready queue.5. UnregisterWhen a real-time process requires unregistration, this process is disconnected from the ready queue and managed as a non-real-time process. Then, its period and priority are initialized.2.2. Performance2.2.1. Measurement environment and items: We measured the processing time from the timer interrupt to the execution of a real-time process to clarify the periodic execution control overhead in ART-Linux. Further, we measured the interval error of the periodic execution to clarify the precision of the periodic execution control. An interval of the periodic execution is the time from a processing start time to the next processing start time for a real-time process. In addition, the interval error is the difference in value between an interval and the period of a real-time process. We list the measurement environment in table 1. We used the rdtsc instruction to record the time.2.2.2. Time from timer interrupt to execution of real-time process: We registered one real-time process with a period of 1 ms and the maximum priority and measured the time from the timer interrupt to the execution of this process 100 times. This result is shown in table 2, and the distribution of the time is shown in figure 2.The difference between the average values and the maximum values is considerably larger than the difference between the average values and the minimum values in both table 2 and figure 2. We speculate that the dispersion of the time from the timer interrupt to the execution of the real-time process is large. One reason for this may be the fact that the processing time for the release is proportional to the number of real-time processes to be released at the same time, and the time from the timer interrupt to the execution of the real-time process increases. Therefore, we believe that the precision of the periodic execution will be low.2.2.3. Measurement of interval of periodic execution: We registered one real-time process with a maximum priority and measured the interval of periodic execution. We set theexecution in each case. The interval error is shown in figure 3; we have explained it below.The interval error of the periodic execution is proportional to the period shown in figure 3. We measured the precision of the timer interrupt period to clarify this factor. As a result of the measurement, we found that the actual timer interrupt interval is approximately 0.996 ms for the timer interrupt interval of 1 ms. Therefore, there is approximately 0.4% error for the timer interrupt interval. In figure 3, the interval error of the periodic execution is approximately 4 µs for a period of 1 ms. That is, this error is affected by the error of the timer interrupt interval. In addition, we speculate that the timer interrupt does not occur by a correct period because of the difference between the timer interrupt period that the system requires and the precision of the timer movement clock.2.3. ProblemsWe will discuss five problems to be clarified by the processing of the periodic execution control and the result of the measurement in ART-Linux.1. The control overhead for a release is proportional to the number of real-time processesscheduled to be released at the same time, and the dispersion of the processing time for the release is considerable.For the release at the time of the timer interrupt in ART-Linux, the waiting time for a real-time process at the top of the wait queue is calculated, and the release of this process is judged. Then, all real-time processes scheduled to be released at this time are disconnected from the wait queue and connected to the ready queue. Therefore, the control overhead for the release is proportional to the number of real-time processes scheduled to be released at the same time. Therefore, if there are a considerable number of real-time processes scheduled to be released at the time of the timer interrupt, the processing time for the2. The control overhead of the connection processing to the wait queue for the wait isproportional to the number of real-time processes, and the dispersion of the processing time for the wait is considerable.For the wait of a real-time process in ART-Linux, the wait queue is searched from the top to calculate the waiting time of a real-time process that requires a wait and decide a position to insert this process into the wait queue. Therefore, processing that is proportional to the length of the wait queue is required; the control overhead for the wait is affected by the number of real-time processes and the waiting time of each real-time process in the wait queue. For example, if there are a considerable number of real-time processes that are released earlier than the real-time process that requires a wait, the processing time for the wait is significant. Hence, the processing time for the wait is long, and the dispersion of this processing time is considerable.3. A real-time process that is not completely processed before the next release time has anadverse effect on the other real-time processes.Let us consider a case in which a real-time process is not completely processed before the next release time of a periodic execution control. Such a real-time process changes the interval of the periodic execution of the other real-time processes, and the precision of the periodic execution becomes low. In figure 4, process B is an example of such a real-time process. When process B requires a wait in ART-Linux, it waits from this time to the next release time. In this case, process B waits until the release time of t2 not t1. In other words, even if process B is not executed periodically on the basis of its period, the execution of this process continues periodically. Process B uses the time when process A is feasible, and the interval of the periodic execution of process A changes.4. The dispersion of time from the timer interrupt to the execution of a real-time process issignificant.As shown in Section 2.2.2, there is a case in which the change in the time from the timer interrupt to the execution of a real-time process is considerable. If such a change in time is big, the precision of the periodic execution is low. One of this reason is that the dispersion of the processing time for the release is significant.5. A difference in the clock precision between a timer and a processor is not coordinated.As shown in Section 2.2.3, the interval error of the periodic execution is proportional to the period and increases because there is a difference in the clock precision between a timer and a processor. If the difference between the period and the interval of the period execution is considerable, the precision of the periodic execution will be low.3. Sophisticated periodic execution control3.1. DesignThe processing time of the release and the wait for the periodic execution control of ART-Linux are affected by the number of real-time processes, and the dispersion of those processing time is significant. This results from the waiting time of a real-time process. Therefore, the sophisticated periodic execution control that we propose manages the real-time process scheduled to be released with respect to the time of each timer interrupt without managing the real-time processes that need to wait in one queue. Therefore, the proposed control can solve four of the five above-mentioned problems for the periodic execution control in ART-Linux.In figure 5, we show the schematic representation of the sophisticated periodic execution control that can solve problems 1–4 of ART-Linux. The control can be explained as follows: The execution management table in figure 5 is equivalent to the ready queue shown in figure 1, and the periodic control table is equivalent to the wait queue.particular, it manages the release element of the real-time process to be executed by connecting it to the entry of the execution management table on the basis of the priority of the real-time process. The release element is the element that has the information of the real-time process and has two queue entries. These entries are used for connecting the real-time process to the execution management table and the periodic control table. The periodic control table manages the real-time process scheduled to be released each time; the number of entries is equivalent to the longest period that can be set. One entry in this table is equivalent to one timer interrupt and is connected to the release element of the real-time process to be released at the timer interrupt. In other words, the number of entries in the periodic control table should be the least common multiple of the periods for all real-time processes.We explain the processing of the sophisticated periodic execution control below.1. RegisterWhen a non-real-time process requires registration, this process is managed as a real-time process by the periodic control table. Then, the periodic control table is searched, an entry that is connected to few release elements in the periodic control table is found, and the release element of the real-time process is connected to this entry. Simultaneously, the real-time process is set a period and a priority.2. ReleaseAt the time of the timer interrupt, the current entry is translated to the next entry. The current entry is the entry that corresponds to the time of the timer interrupt in the periodic control table. If there is a release element in the current entry, the decision to release a real-time process is taken. In particular, the release element is connected to the execution management table on the basis of the priority of the real-time process. Then, the release element is not disconnected from the periodic control table. If the priority of the real-time process to be released is greater than that of the current process, a pre-emption occurs. In addition, if there is a release element of the real-time process to be executed in the execution management table at this time, all release elements of this real-time process are disconnected from the execution management table and the periodic control table, and this real-time process is terminated. This is done to restrain the adverse effect that this real-time process has on the other real-time processes.3. ExecuteAfter the processing of release, wait, and unregister, if there is a release element in the execution management table, real-time processes are executed on the basis of their priorities. Then, the release element is not disconnected from the execution management table. Therefore, there is a release element of the real-time process being executed at the top of the entry corresponding to the priority of the execution management table. A bitmap is used for deciding which entry should be connected to the execution management table.4. WaitWhen a real-time process requires a wait, its release element is disconnected from the periodic control table. Therefore, the real-time process waits until the next release time.5. UnregisterWhen a real-time process requires unregistration, all release elements of this process are disconnected from the periodic control table. Then, the period and the priority of this process are initialized. Hence, this process is managed as a non-real-time process.3.2. CharacteristicsThe sophisticated periodic execution control that we proposed in Section 3.1 has the following characteristics:1. The release of the real-time process is managed by the periodic control table.2. A release element has two queue entries that are used for connecting the release element tothe execution management table and the periodic control table.3. A real-time process that is not completely processed before the next release time isterminated.4. When the release element is connected, the dispersion for the number of release elementsconnected to each entry of the periodic control table becomes low.According to characteristic 1, the calculation of the waiting time is unnecessary. Because of characteristic 2, the processing of the disconnection from the periodic control table for the release and the processing of the connection to the periodic control table for wait are unnecessary. Furthermore, because of characteristic 1 and 2, the number of queue operations required decreases, and the control overheads for the release and wait become small. In addition, we have speculated that the dispersion of the processing time for the release and wait become small because the number of processing for searching the release element is few. Because of characteristic 3, the influence of a real-time process that is not completely processed before the next release time on the other real-time processes is restrained. Because of characteristic 4, the dispersion of the processing time for the release becomes small.3.3. Realization3.3.1. Data structure: We have realized the sophisticated periodic execution control that we proposed earlier. We show the data structure of this periodic execution control in figure 6 and explain each management table below. The data structure of the periodic execution control has six management tables.real-time processes with the periodic control table. The current entry (curpointp) is translated into the next entry at every timer interrupt. Pct is the pointer to the top of the periodic control table, and pctsize is the number of entries in the periodic control table.The number of entries in the periodic control table is the least common multiple of the periods of all real-time processes. Each entry manages the release element. All release elements that are connected with the entry to which curpointp points, (current entry) are connected to the execution control table for the release. The count of the periodic control table is the number of release elements to manage.The release element contains information on the real-time process. Next is used for connecting the release element to the periodic control table, whereas prinext is used for connecting the release element to the execution management table. Procp is pointer to the real-time process.The execution management table manages the release elements of the real-time processes that are to be executed on the basis of their priority. In this table, the release element of the real-time process being executed is at top of the entry that has the maximum priority among the entries that release elements are connected.The real-time information table manages the period and the priority of the real-time process. The number of each entry is equivalent to the process identifier. If the process management table manages the period and the priority of the real-time process, the access time may increase because the process management table has a considerable amount of information. Therefore, the cache miss is restrained, and the access time required to use the real-time information table becomes short. When a real-time process is registered, rflag is set a period and rpri is set a priority. If the real-time process is released, the most significant bit of rflag is set. Further, when the real-time process requires a wait, this bit is reset.number of unused release elements, and maxnum is the number of all release elements that are allocated at the time of the initialization of all management tables.3.3.2. Coding:Bear in mind the following for the implementation of the sophisticated periodic execution control.First, the optimization of the code and the use efficiency improvement of the register used in the method are required in order to speed up processing. For example, we summarize the cords handling the same variable in one place in order to reduce the amount of rewriting in the register. As a result, the processing time becomes short.Many release elements may be used by a real-time process in the proposed control. Therefore, the quantity of data to be referred to during one processing may become considerable, and the cache miss rate may become high. Moreover, the access time may increase significantly because the data spatial locality becomes low. Therefore, when the sophisticated periodic execution control is implemented, it is necessary to devise how to handle data such as the period and the priority of the real-time processes and how to allocate the release element.Hence, we reduce the quantity of data for a real-time process and minimize the quantity of data for a release element. Further, during the processing of the release and the wait, data that do not relate with the periodic control are not read. The release element has only two queue entries and a pointer to the process. Information related to the real-time process, such as the period and the priority, is described in the real-time information table. This is done to avoid giving the information of the real-time process in the process management table and to reduce the quantity of data that is accessed. If the process management table contains the information of the real-time process, the quantity of data that needs to be accessed increases considerably because the process management table has a significant amount of information. Moreover, the state of the real-time process as ready or wait is contained in rflag. We can use the same entry to manage the period and the state of the real-time process because the period of the real-time process is only changed in the processing of registration or unregistration. Therefore, we can reduce the quantity of data accessed, and the cache miss rate becomes low.Figure 7 shows how to allocate release elements in the control that we have realized. At the initialization of each management table, release elements are allocated according to the maxnum size. Let x be the value that is obtained by dividing maxnum by pctsize. “i” is the serial number of each entry in the periodic control table. When the release element is connected to the i-th entry, the unused release element to use is searched from the (x * i)-thentry of all release elements. Therefore, the release element for each entry in the periodic control table is accumulated in the memory. Therefore, the data spatial locality is improved, and the access time for the release and wait decreases.3.4. EffectsWe have described the effects of the sophisticated periodic execution control below.1. The control overhead of the release becomes small.For the release of a real-time process in ART-Linux, the waiting time for all real-time processes scheduled to be released at the same time is calculated; then, these processes are disconnected from the wait queue and connected to the ready queue. On the other hand, in the proposed control, the current entry is translated into the next entry, and all release elements of the current entry are connected to the execution management table. Therefore, it is unnecessary to calculate the waiting time and to disconnect the real-time processes from the wait queue. Moreover, the number of processing that is influenced by the number of real-time processes scheduled to be released at the same time decreases, and the dispersion of the processing time for release becomes small.2. The control overhead of the wait becomes small, and the dispersion of the processing timefor the wait becomes small.For the wait of a real-time process, in ART-Linux, the wait queue is searched from the top, and the waiting time for the real-time process that requires a wait is calculated. Then, the real-time process is disconnected from the ready queue and connected to the wait queue.On the other hand, in the proposed control, the release element is only disconnected from the execution management table. In addition, the release element of the real-time process being executed is at the top of the entry with its priority. Therefore, the processing time for the wait is short, and this value is fixed without affecting the number of the real-time processes in the wait queue and the waiting time of each real-time process.3. The adverse effect of a real-time process that could not be completely processed before thenext release time on the other real-time processes is restrained.In ART-Linux, the execution of the real-time process continues periodically even if the execution is not completed before the next release time. On the other hand, in the proposed control, if there is a release element of the real-time process still to be executed in the current entry as a release at the next release time, this real-time process is terminated. In other words, a real-time process that is not completely processed before the next release time is terminated. Therefore, the influence of such a real-time process on the other real-time processes is restrained.4. The dispersion of the processing time for the release is small.In the proposed control, for registration, when the release element is connected to the periodic control table, the periodic control table is searched, an entry managing few release elements in the periodic control table is found, and the release element of the real-time process is connected to this entry. Therefore, the dispersion for the number of release elements being connected to each entry of the periodic control table becomes low. Hence, when there are real-time processes with different periods, the dispersion of the processing time for a release becomes small. As a result, the dispersion of the time from the timer interrupt to the execution of a real-time process becomes small.974. Evaluation4.1. AnT operating systemWe have implemented and evaluated the proposed control in AnT [7][8]. AnT is an operating system based on microkernel architecture. The basic architecture of AnT is shown in figure 8. The program consists of OS and service. The OS comprises the kernel, which is called as the internal core, and the external core, which is executed as processes (OS server). Service consists of AP processes that execute the applications program. The internal core is the program part that guarantees the execution for a minimum number of common functions in all the systems. As the main function, the internal core has functions of scheduling management and memory management. The external core is the necessary program part to adapt to the use cases of the systems, it has a dynamically reconfigurable structure. For example, AnT offers the functions of input/output control, file management, and device driver as processes. Service is the program part that offers services.AnT has the following characteristics: fast inter-server program communication mechanism, process control mechanism for dynamic running mode switch, adaptive-control function, and dynamic OS server replacement mechanism. The fast inter-server program communication mechanism offers high-speed communication control using copy-less data transfer, protection of the transfer data and provision of interface that adapted to the use case of the systems [8]. The dynamic running mode switch mechanism is mechanism that can switch the running mode of a process dynamically and freely. The adaptive-control function dynamically changes the software function and structure to adapt to the use case of the system. The dynamic OS server replacement mechanism allows us to continue the service without stopping the operating system when the OS server is extended or when the OS server is malfunctioning.4.2. Evaluation itemsWe have clarified the effects of the proposed control by comparison of AnT and ART-Linux. We evaluated the following.1. The processing time of the release when there are a large number of real-time processesscheduled to be released at the same time2. The processing time of the wait when there are a large number of real-time processes inthe wait state3. The dispersion for the number of real-time processes to be released at the same time98。
1.TDP--Thermal Design Power 散热设计功耗2.SMBus ---System Management Bus 系统总线3.GPIO---General Purpose Input Output 通用输入/输出或总线扩展器4.SIO--超级输入输出芯片5.SO-DIMM--小外形双列内存模组6.DIMM--Dual-Inline-Memory-Modules,即双列直插式存储模块7.SPI--Serial Peripheral Interface--串行外设接口8.IDE--微型计算机智能接口,是现在普遍使用的外部接口,主要接硬盘和光驱,传输模式有以下三种:PIO(Programmed I/O)模式、DMA(Driect Memory Access)模式、Ultra DMA(简称UDMA)模式9.AMT---主动管理技术10.POST--通电自检程序11.HDMI--High Definition Multimedia Interface高清晰度多媒体接口12.CRT ---Cathode Ray Tube 阴极射线管13.DAC --Digital Analog Converter 数模转换器14.DDC --Display Data Channel—I2C bus interface between a display and a graphics adapter. 显示数据通道15.DVI --Digital Visual Interface —video interface standard developed by the Digital Display Working Group (DDWG). 数字可视化界面16.EFT --Electrical Fast Transient 电快速瞬变17.EMI --Electro magnetic Interference 电磁干扰18.ESD --Electrostatic Discharge 静电放电19.ExpressCard--A PCMCIA standard built on the latest USB 2.0 and PCI Express buses.20.GBE --Gigabit Ethernet 千兆以太网21.LPC-- Low Pin-Count Interface: a low speed interface used for peripheral circuits such as Super I/O controllers, which typically combine legacy-device support into a single IC. 低针脚数接口22.LVDS --Low-Voltage Differential Signaling 低压差分信号23.PCI Express (PCIe)--Peripheral Component Interface Express – next-generation high speed Serialized I/O bus24.PCI Express Lane --One PCI Express Lane is a set of 4 signals that contains two differential lines for Transmitter and two differential lines for Receiver. Clocking information is embedded into the data stream.25.SATA --Serial ATA attachment: serial-interface standard for hard disks26.SDVO --Serial Digital Video Out— proprietary technology introduced by Intel. to add additional video signaling interfaces to a system. 连续数字式录影27.T.B.D. --To be determinedB --Universal Serial Bus29.x1, x2, x4, x16 x1 refers to one PCI Express Lane of basic bandwidth; x2 to acollection of two PCI Express Lanes; etc.. Also referred to as x1, x2, x4, x16 link.30.ASIC(专用集成电路)Application-Specific Integrated Circuit. A piece of custom-designed hardware in a chip. 专用集成电路。
嵌入式系统嵌入式系统是一种设计用来执行一种或几种功能的实时计算机系统。
它被嵌入于一个完整的包括硬件和机械装置的设备中。
与传统计算机,例如个人电脑相比,他的设计更灵活应用更广泛。
在今天由嵌入式系统控制的设备很普遍。
历史第一个被大家认可的现代嵌入式系统是麻省理工学院仪器研究室的查尔斯·斯塔克·德雷珀开发的阿波罗导航计算机。
在两次月球飞行中他们在太空驾驶舱和月球登陆舱都是用了这种惯性导航系统。
在计划刚开始的时候,阿波罗导航计算机被认为是阿波罗计划风险最大的部分。
为了减小尺寸和重量而使用的当时最新的单片集成电路加大了阿波罗计划的风险。
第一款大批量生产的嵌入式系统是1961年发布的民兵I导弹上的D-17自动导航控制计算机。
它是由独立的晶体管逻辑电路建造的,它带有一个作为主内存的硬盘。
当民兵II导弹在1966年开始生产的时候,D-17由第一次使用大量集成电路的更新计算机所替代。
仅仅这个项目就将与非门集成电路模块的价格从每个1000美元降到低了每个3美元,使集成电路的商用成为可能。
民兵导弹的嵌入式计算机有一个重要的设计特性:它能够在项目后期对制导算法重新编程以获得更高的导弹精度,并且能够使用计算机测试导弹,从而减少测试用电缆和接头的重量。
这些二十世纪六十年代的早期应用,使嵌入式系统得到长足发展,它的价格开始下降,同时处理能力和功能也获得了巨大的提高。
英特尔4004是第一款微处理器,它在计算器和其他小型系统中找到了用武之地。
但是,它仍然需要外部存储设备和外部支持芯片。
1978年,国家工程制造商协会发布了可编程微控制器的“标准”,包括几乎所有以计算机为基础的控制器,如单片机,数控设备,以及基于事件的控制器。
随着微控制器和微处理器的价格下降,一些消费性产品用使用微控制器的数字电路取代如分压计和可变电容这样的昂贵模拟组件成为可能。
到了二十世纪八十年代中期,许多以前是外部系统的组件被集成到了处理器芯片中,这种结构的微处理器得到了更广泛的应用。
嵌入式常见英文缩写和英文词汇(搜集中)英文缩写ARM:Advanced RISC MachineAAPCS:ARM Architecture Process call standard ARM体系结构过程调用标准RISC:Reduced Instruction Set Computer 精简指令集计算机RTOS:Real Time Operating System 实时操作系统DMA:Direct Memory Access 存储器直接访问EXTI: External Interrupts 外部中断FSMC: Flexible static memory controller 可变静态存储控制器FPB:flash patch and breakpoint FLASH 转换及断电单元HSE:Hign speed externalHSI: High speed internalLSE: Low Speed externalLSI: Low Speed InternalLSU: load store unit 存取单元PFU: prefetch unit 预取单元ISR:Interrupt Service Routines 中断服务程序NMI: Nonmaskable Interrupt 不可屏蔽中断NVIC: Nested Vectored Interrupt ControllerMPU: Memory Protection UnitMIPS:million instructions per second 每秒能执行的百万条指令的条数RCC:Reset and clock control 复位和时钟控制RTC: Real-Time Clock 实时时钟IWDG: independent watchdogWWDG:Window watchdogTIM:timer 定时器端口AFIO:alternate function IO 复用IO端口GPIO:general purpose input/output 通用IO端口IOP(A-G):IO port A - IO port G (例如:IOPA:IO port A)CAN:Controller area networkFLITF:The Flash memory interface 闪存存储器接口I2C:Inter-integrated circuitIIS:integrate interface of sound 集成音频接口JTAG:joint test action group 联合测试行动小组SPI:Serial Peripheral InterfaceSDIO: SD I/OUART: Universal Synchr./Asynch. Receiver TransmitterUSB: Universal Serial Bus寄存器相关CPSP:Current Program Status Register 当前程序状态寄存器SPSP:saved program status register 程序状态备份寄存器CSR:clock control/status register 时钟控制状态寄存器LR:link register 链接寄存器SP:stack pointer 堆栈指针MSP: main stack pointer 主堆栈指针PSP:process stack pointer 进程堆栈指针PC:program counter 程序计数器调试相关ICE:in circuit emulator 在线仿真ICE Breaker 嵌入式在线仿真单元DBG:debug 调试IDE:integrated development environment 集成开发环境DWT: data watchpoint and trace 数据观测与跟踪单元ITM: instrumentation trace macrocell 测量跟踪单元ETM:embedded trace macrocell 嵌入式追踪宏单元TPIU:trace port interface unit 跟踪端口接口单元TAP:test access port 测试访问端口DAP: debug access prot 调试访问端口TP: trace port 跟踪端口DP:debug port 调试端口SWJ-DP: serial wire JTAG debug port 串行-JTAG 调试接口SW-DP: serial wire debug port 串行调试接口JTAG-DP:JTAG debug port JTAG 调试接口系统类IRQ:interrupt request 中断请求FIQ:fast interrupt request 快速中断请求SW:software 软件SWI:software interrupt 软中断RO:read only 只读(部分)RW:read write 读写(部分)ZI:zero initial 零初始化(部分)BSS:Block Started by Symbol 以符号开始的块(未初始化数据段)总线Bus Matrix 总线矩阵Bus Splitter 总线分割AHB-AP:advanced High-preformance Bus-access portAPB:advanced peripheral busAPB1: low speed APBAPB2: high speed APBPPB:Private Peripheral Bus 专用外设总线杂类ALU:Arithmetic Logical Unit 算术逻辑单元CLZ:count leading zero 前导零计数(指令)SIMD:single instruction stream multiple data stream 单指令流,多数据流VFP:vector floating point 矢量浮点运算词汇/词组Big Endian 大段存储模式Little Endian 小段存储模式context switch 任务切换(上下文切换)(CPU寄存器内容的切换)task switch 任务切换literal pool 数据缓冲池词汇类/单词arbitration 仲裁access 访问assembler 汇编器disassembly 反汇编binutils 连接器bit-banding 位段(技术)bit-band alias 位段别名bit-band region 位段区域banked 分组buffer 缓存/ceramic 陶瓷fetch 取指decode 译码execute 执行Harvard 哈佛(架构)handler 处理者heap 堆stack 栈latency 延时load (LDR) 加载(存储器内容加载到寄存器Rn)store (STR) 存储(寄存器Rn内容存储到存储器)Loader 装载器optimization 优化process 进程/过程thread 线程prescaler 预分频器prefetch 预读/预取指perform 执行pre-emption 抢占tail-chaining 尾链late-arriving 迟到resonator 共振器指令相关instructions 指令pseudo-instruction 伪指令directive 伪操作comments 注释FA full ascending 满栈递增(方式)EA empty ascending 空栈递增(方式)FD full desending 满栈递减(方式)ED empty desending 空栈递减(方式)翻译1.number of wait states for a read operation programmed on-the-fly动态设置(programmed on-the-fly)的读操作的等待状态数目参考文章1.BSS的参考:/view/453125.htm?fr=ala0_1BSS是Unix链接器产生的未初始化数据段。
编号:桂林电子科技大学信息科技学院毕业设计(论文)外文翻译(译文)系别:电子工程系专业:电子信息工程学生姓名:韦骏学号:0852100329指导教师单位:桂林电子科技大学信息科技学院姓名:梁勇职称:讲师2012 年6 月5 日设计与实现基于Modbus 协议的嵌入式Linux 系统摘要:随着嵌入式计算机技术的飞速发展,新一代工业自动化数据采集和监测系统,采用核心的高性能嵌入式微处理器的,该系统很好地适应应用程序。
它符合消费等的严格要求的功能,如可靠性,成本,尺寸和功耗等。
在工业自动化应用系统,Modbus 通信协议的工业标准,广泛应用于大规模的工业设备系统,包括DCS,可编程控制器,RTU 及智能仪表等。
为了达到嵌入式数据监测的工业自动化应用软件的需求,本文设计了嵌入式数据采集监测平台下基于Modbus 协议的Linux 环境采集系统。
串行端口的Modbus 协议是实现主/从式,其中包括两种通信模式:ASCII 和RTU。
因此,各种药膏协议的设备能够满足串行的Modbus通信。
在Modbus 协议的嵌入式平台实现稳定和可靠。
它在嵌入式数据监测自动化应用系统的新收购的前景良好。
关键词:嵌入式系统,嵌入式Linux,Modbus 协议,数据采集,监测和控制。
1、绪论Modbus 是一种通讯协议,是一种由莫迪康公司推广。
它广泛应用于工业自动化,已成为实际的工业标准。
该控制装置或不同厂家的测量仪器可以链接到一个行业监控网络使用Modbus 协议。
Modbus 通信协议可以作为大量的工业设备的通讯标准,包括PLC,DCS 系统,RTU 的,聪明的智能仪表。
随着嵌入式计算机技术的飞速发展,嵌入式数据采集监测系统,使用了高性能的嵌入式微处理器为核心,是一个重要的发展方向。
在环境鉴于嵌入式Linux 的嵌入式工业自动化应用的数据,一个Modbus 主协议下的采集监测系统的设计和实现了这个文件。
因此,通信设备,各种药膏协议能够满足串行的Modbus。
中英文资料对照外文翻译嵌入式Linux概述摘要本文我将论述一下嵌入式Linux目前的发展趋势(状况)。
我将概述Linux是什么,嵌入式Linux系统与桌面系统有什么不同的特点。
然后,我将详细地论述六个关键领域:•配置•实时性•图形用户界面•开发工具支持•经济性•技术支持选项下面,我将比较嵌入式Linux与Windows CE的实时性,操作系统映像大小和内存需求。
然后我会讨论一些基于嵌入式Linux的零售设备并与大家讨论一下关于嵌入式Linux一些大概的评论。
简介除非你在过去的几年里一直与世隔绝,否则毫无疑问你一定听说过Linux操作系统。
作为微软的Windows NT在软件开源中的竞争对手,它已经在软件开发和系统管理社区,以及主流的非技术性新闻媒体上被广泛宣传和激烈的讨论。
当Linux系统首次推出的时候,它是专门针对运行在英特尔80x86或兼容的微处理器上台式电脑。
引用Linux操作系统的创始Linus Torvalds说过的一句话:“ 从Linux操作系统诞生之日起,它将只会运行在拥有一块IDE硬盘的PC上” 。
回首至今为止的21世纪,这句话显得非常滑稽。
如今的Linux已经被移植到许多不同的微处理器上并运行在许多并不含有硬盘的平台上。
这些设备甚至没有通用的计算机系统,也没有如网络路由器,核心监控程序和用来跟踪旋风管的数据收集单位。
正是这些类型的系统,被统称为“嵌入式Linux” 。
在下一节我会关注嵌入式Linux系统和它的堂兄弟桌面Linux系统之间的区别。
然后,我要回详细描述嵌入式Linux在:配置,实时性, GUIs ,开发工具的支持,经济性,和技术支持这六个方面的特点。
然后,我将比较一下基于同样配置的嵌入式Linux内核与Windows CE内核的大小和实时性特征。
然后,我将讨论三个基于嵌入式Linux的有趣的设备:光学遥测系统,NetTel路由器和IBM公司的掌上电脑研究项目“ itsy ” 。
毕业设计翻译文献文献题目:Construction of Embedded System Platform which Based on μC/OS-Ⅱ and ARM7 Kernel Microprocessor 构建基于μC/ OS-Ⅱ和ARM7内核微处理器的嵌入式系统平台学生姓名:易康乐学院:信息与通信工程学院专业:电子信息工程指导教师:万忠民2015年 5 月 10 日构建基于μC/ OS-Ⅱ和ARM7内核微处理器的嵌入式系统平台Yujun Bao Xiaoyan Jiang摘 要今天,嵌入式系统被广泛地应用于各行各业。
引入嵌入式操作系统在嵌入式发展中已经是一种趋势。
嵌入式操作系统能够适用于不同的系统硬件,并能够显著的减少开发费用,缩短研究周期。
μC/ OS-Ⅱ是一款优秀的开源,轻型内核,占用少量资源并且在实时性方面有着高性能的嵌入式操作系统。
μC/ OS-Ⅱ适用于越来越多的32位ARM7核微处理器,本文介绍了基于ARM7微处理器的μC/ OS-Ⅱ嵌入式操作系统的移植方法。
最终实现了构建基于μC/ OS-Ⅱ和ARM7内核处理器的嵌入式开发平台。
该平台能有效的简化软件程序开发流程,并缩短工程研究的周期和显著提高系统的执行效率。
关键字:嵌入式系统;嵌入式操作系统;ARM7内核;μC/ OS-Ⅱ一、介绍所谓的操作系统移植是一个实时操作系统内核可以在运行在其他微处理器上。
移植部分对于不同的CPU具有对应的不同的代码。
大多数μC / OS-Ⅱ代码是用C编程语言编写的,这对于移植μC / OS -Ⅱ是非常方便的。
但根据不同的微处理器,用户仍然需要使用汇编语言编写一些有关不同微处理器的硬件的程序。
这是因为当μC / OS-Ⅱ读或写寄存器时,它只依赖于汇编语言。
因为μC / OS -Ⅱ操作系统的要求,有三个文件需要当μC / OS-Ⅱ移植到一个特定的微处理器。
整个移植工作主要围绕创建这三个文件。
这些文件显示如下:1、在C语言中的头文件OS_CPU中,一些与编译器无关的数据类型需要定义OS_CPU中。
1.TDP--Thermal Design Power 散热设计功耗2.SMBus ---System Management Bus 系统总线3.GPIO---General Purpose Input Output 通用输入/输出或总线扩展器4.SIO--超级输入输出芯片5.SO-DIMM--小外形双列内存模组6.DIMM--Dual-Inline-Memory-Modules,即双列直插式存储模块7.SPI--Serial Peripheral Interface--串行外设接口8.IDE--微型计算机智能接口,是现在普遍使用的外部接口,主要接硬盘和光驱,传输模式有以下三种:PIO(Programmed I/O)模式、DMA(Driect Memory Access)模式、Ultra DMA(简称UDMA)模式9.AMT---主动管理技术10.POST--通电自检程序11.HDMI--High Definition Multimedia Interface高清晰度多媒体接口12.CRT ---Cathode Ray Tube 阴极射线管13.DAC --Digital Analog Converter 数模转换器14.DDC --Display Data Channel—I2C bus interface betweena display and a graphics adapter. 显示数据通道15.DVI --Digital Visual Interface —video interface standard developed by the Digital Display Working Group (DDWG). 数字可视化界面16.EFT --Electrical Fast Transient 电快速瞬变17.EMI --Electro magnetic Interference 电磁干扰18.ESD --Electrostatic Discharge 静电放电19.ExpressCard--A PCMCIA standard built on the latest USB 2.0 and PCI Express buses.20.GBE --Gigabit Ethernet 千兆以太网21.LPC-- Low Pin-Count Interface: a low speed interface used for peripheral circuits such as Super I/O controllers, which typically combine legacy-device support into a single IC. 低针脚数接口22.LVDS --Low-Voltage Differential Signaling 低压差分信号23.PCI Express (PCIe)--Peripheral Component Interface Express – next-generation high speed Serialized I/O bus 24.PCI Express Lane --One PCI Express Lane is a set of 4 signals that contains two differential lines for Transmitter and two differential lines for Receiver. Clocking information is embedded into the data stream.25.SATA --Serial ATA attachment: serial-interface standard for hard disks26.SDVO--Serial Digital Video Out—proprietary technology introduced by Intel. to add additional video signaling interfaces to a system. 连续数字式录影27.T.B.D. --To be determinedB --Universal Serial Bus29.x1, x2, x4, x16 x1 refers to one PCI Express Lane of basic bandwidth; x2 to acollection of two PCI Express Lanes; etc.. Also referred to as x1, x2, x4, x16 link.30.ASIC(专用集成电路)Application-Specific Integrated Circuit. A piece of custom-designed hardware in a chip. 专用集成电路。
6.1 ConclusionsAutonomous control for small UAVs imposes severe restrictions on the control algorithmdevelopment, stemming from the limitations imposed by the on-board hardwareand the requirement for on-line implementation. In this thesis we have proposed anew hierarchical control scheme for the navigation and guidance of a small UAV forobstacle avoidance. The multi-stage control hierarchy for a complete path control algorithmis comprised of several control steps: Top-level path planning,mid-level pathsmoothing, and bottom-level path following controls. In each stage of the control hierarchy,the limitation of the on-board computational resources has been taken intoaccount to come up with a practically feasible control solution. We have validatedthese developments in realistic non-trivial scenarios.In Chapter 2 we proposed a multiresolution path planning algorithm. The algorithmcomputes at each step a multiresolution representation of the environment usingthe fast lifting wavelet transform. The main idea is to employ high resolution closeto the agent (where is needed most), and a coarse resolution at large distances fromthe current location of the agent. It has been shown that the proposed multiresolutionpath planning algorithm provides an on-line path solution which is most reliableclose to the agent, while ultimately reaching the goal. In addition, the connectivityrelationship of the corresponding multiresolution cell decomposition can be computed directly from the the approximation and detail coefficients of the FLWT. The path planning algorithm is scalable and can be tailored to the available computational resources of the agent.The on-line path smoothing algorithm incorporating the path templates is presentedin Chapter 3. The path templates are comprised of a set of B-spline curves,which have been obtained from solving the off-line optimization problem subject tothe channel constraints. The channel is closely related to the obstacle-free high resolutioncells over the path sequence calculated from the high-level path planner. Theobstacle avoidance is implicitly dealt with since each B-spline curve is constrainedto stay inside the prescribed channel, thus avoiding obstacles outside the channel.By the affine invariance property of B-spline, each component in the B-spine pathtemplates can be adapted to the discrete path sequence obtained from thehigh-levelpath planner. We have shown that the smooth reference path over the entire pathcan be calculated on-line by utilizing the path templates and path stitching scheme. The simulation results with the D_-lite path planning algorithm validates the effectivenessof the on-line path smoothing algorithm. This approach has the advantageof minimal on-line computational cost since most of computations are done off-line.In Chapter 4 a nonlinear path following control law has been developed for asmall fixed-wing UAV. The kinematic control law realizes cooperative path followingso that the motion of a virtual target is controlled by an extra control input to helpthe convergence of the error variables. We applied the backstepping to derive theroll command for a fixed-wing UAV from the heading rate command of the kinematiccontrol law. Furthermore, we applied parameter adaptation to compensatefor theinaccurate time constant of the roll closed-loop dynamics. The proposed path followingcontrol algorithm is validated through a high-fidelity 6-DOF simulation of a fixed-wing UAV using a realistic sensor measurement, which verifies the applicabilityof the proposed algorithm to the actual UAV.Finally, the complete hierarchical path control algorithm proposed in this thesis isvalidated thorough a high-fidelity hardware-in-the-loop simulation environment usingthe actual hardware platform. From the simulation results, it has been demonstratedthat the proposed hierarchical path control law has been successfully applied for pathcontrol of a small UAV equipped with an autopilot that has limited computational resources.6.2 Future ResearchIn this section, several possible extensions of the work presented in this thesis are outlined.6.2.1 Reusable graph structure The proposed path planning algorithm involves calculating the multiresolution cell decomposition and the corresponding graph structure at each of iteration. Hence, the connectivity graph G(t) changes as the agent proceeds toward the goal. Subsequently, let x 2 W be a state (location) which corresponds to nodes of two distinct graphs as followsBy the respective A_ search on those graphs, the agent might be rendered to visit x at different time steps of t i and t j , i 6= j. As a result, a cyclic loop with respect to x is formed for the agent to repeat this pathological loop, while never reaching the goal. Although it has been presented that maintaining a visited set might be a means of avoiding such pathological situations[142], it turns out to be a trial-and-error scheme is not a systemical approach. Rather, suppose that we could employ a unified graph structure over the entire iteration, which retains the information from the previous search. Similar to the D_-lite path planning algorithm, the incremental search over the graph by reusing the previous information results in not only overcoming the pathological situation but also reducing the computational time. In contrast to D_ orD_-lite algorithms where a uniform graph structure is employed, a challenge lies in building the unified graph structure from a multiresolution cell decomposition. Specifically, it includes a dynamic, multiresolution scheme for constructing the graph connectivity between nodes at different levels. The unified graph structure will evolveitself as the agent moves, while updating nodes and edges associated with the multiresolutioncell decomposition from the FLWT. If this is the case, we might be ableto adapt the proposed path planning algorithm to an incremental search algorithm, hence taking advantages of both the efficient multiresolution connectivity (due tothe FLWT) and the fast computation (due to the incremental search by using the previous information).6.1个结论小型无人机自主控制施加严厉限制控制算法发展,源于所施加的限制板载硬件并要求在线实施。
Web Server for Embedded SystemsAfter the “everybody-in-the-Internet-wave” now obviously follows the“everything-in-the-Internet-wave”.The most coffee, vending and washingmachines are still not available about the worldwide net. However the embeddedInternet integration for remote maintenance and diagnostic as well as the so-calledM2M communication is growing with a considerable speed rate.Just the remote maintenance and diagnostic of components and systems by Webbrowsers via the Internet, or a local Intranet has a very high weight for manydevelopment projects. In numerous development departments people work oncompletely Web based configurations and services for embedded systems. Theremaining days of the classic user interface made by a small LC-display with frontpanel and a few function keys are over. Through future evolutions in the field ofthe mobile Internet, Bluetooth-based PAN s (Personal Area Network's) andthe rapidly growing M2M communication (M2M=Machine-to-Machine)a further innovating advance is to be expected.The central function unit to get access on an embedded system via Web browser isthe Web server. Such Web servers bring the desired HTML pages (HTML=HyperText Markup Language) and pictures over the worldwide Internetor a local network to the Web browser. This happens HTTP-based (HyperText Transfer Protocol). A TCP/IP protocol stack –that means it is based onsophisticated and established standards–manages the entire communication.Web server (HTTP server) and browser (HTTP client) build TCP/IP-applications. HTTP achieved a phenomenal distribution in the last years.Meanwhile millions of user around the world surf HTTP-based in the WorldWide Web. Today almost every personal computer offers the necessaryassistance for this protocol. This status is valid more and more for embeddedsystems also. The HTTP spreads up with a fast rate too.1. TCP/IP-based HTTP as Communication PlatformHTTP is a simple protocol that is based on a TCP/IP protocol stack (picture 1.A).HTTP uses TCP (Transmission Control Protocol). TCP is a relative complex andhigh-quality protocol to transfer data by the subordinate IP protocol. TCP itselfalways guarantees a safeguarded connection between two communication partnersbased on an extensive three-way-handshake procedure. As aresult the data transfer via HTTP is always protected. Due tothe extensive TCP protocol mechanisms HTTP offers only a low-gradeperformance.Figure 1: TCP/IP stack and HTTP programming modelHTTP is based on a simple client/server-concept. HTTP server and clientcommunicate via a TCP connection. As default TCP port value the port number80 will be used. The server works completely passive. He waits for a request(order) of a client. This request normally refers to the transmition of specificHTML documents. This HTML documents possibly have to be generateddynamically by CGI. As result of the requests, the server will answer with aresponse that usually contains the desired HTML documents among others(picture 1.B).GET /test.htm HTTP/1.1Accept]: image/gif, image/jpeg, */*User selling agent: Mozilla/4.0Host: 192.168.0.1Listing 1.A: HTTP GET-requestHTTP/1.1 200 OKDate: Mon, 06 Dec 1999 20:55:12 GMTServer: Apache/1.3.6 (Linux)Content-length: 82Content-type: text/html<html><head><title>Test-Seite</title></head><body>Test-SeiteThe DIL/NetPCs DNP/1110 – Using the Embedded Linux</body></html>Listing 1.B: HTTP response as result of the GET-request from listing 1.AHTTP requests normally consist of several text lines, which are transmitted to theserver by TCP. The listing 1.A shows an example. The first line characterizes therequest type (GET), the requested object (/test1.htm) and the used HTTP version(HTTP/1.1). In the second request line the client tells the server, which kind offiles it is able to evaluate. The third line includes information about theclient- software. The fourth and last line of the request from listing 1.A is used toinform the server about the IP address of the client. In according to the type ofrequest and the used client software there could follow some further lines. Asan end of the request a blank line is expected.The HTTP responses as request answer mostly consist of two parts. At first thereis a header of individual lines of text. Then follows a content object (optional).This content object maybe consists of some text lines –in case of a HTML file– ora binary file when a GIF or JPEG image should be transferred. The first line of theheader is especially important. It works as status or error message. If anerror occurs, only the header or a part of it will be transmitted as answer.2. Functional principle of a Web ServerSimplified a Web server can be imagined like a special kind of a file server.Picture 2.A shows an overview. The Web server receives a HTTP GET-requestfrom the Web browser. By this request, a specific file is required as answer (seestep 1 into picture 2.A). After that, the Web server tries to get access on the filesystem of the requested computer. Then it attempts to find the desired file (step 2).After the successful search the Web server read the entire file(step 3) and transmit it as an answer (HTTP response comprising of headerand content object) to the Web browser (step 4). If the Web server cannot findthe appropriate file in the file system, an error message (HTTP response whichonly contains the header) is simply be send as response to the client.Figure 2: Functional principle from Web server and browserThe web content is build by individual files. The base is build by static files withHTML pages. Within such HTML files there are references to further filesembedded –these files are typically pictures in GIF or JPEG format. However,also references to other objects, for example Java-Applets, are possible. After aWeb browser has received a HTML file of a Web server, this file will beevaluated and then searched for external references. Now the steps 1 to 4 frompicture 2.A will run again for every external reference in order to request therespective file from the corresponding Web server. Please note, that such areference consists of the name or IP address of a Web server (e.g. ""),as well as the name of the desired file (e.g. "picture1.gif"). So virtually everyreference can refer to another Web server. In other words, a HTML file could belocated on the server "ssv-embedded.de" but the required picture -which isexternal referenced by this HTML file- is located on the Web server"". Finally this (worldwide) networking of separate objects is thecause for the name World Wide Web (WWW). All files, which are required by aWeb server, are requested from a browser like the procedure shown on picture2.A. Normally these files are stored in the file system of the server. TheWebmaster has to update these files from time to time.A further elementary functionality of a Web server is the CommonGateway Interface(CGI) -we have mentioned before. Originally this technologyis made only for simple forms, which are embedded into HTML pages. The data,resulting from the padding of a form, will be transmitted to a Web server viaHTTP-GET or POST-request (see step 1 into picture 2.B). In such a GET- orPOST-request the name of the CGI program, which is needed for theevaluation of a form, is fundamentally included. This program has to be on theWeb server. Normally the directory "/cgi-bin" is used as storage location.As result of the GET- or POST-request the Web server starts the CGI programlocated in the subdirectory "/cgi-bin" and delivers the received data in form ofparameters (step 2). The outputs of a CGI program are guided to the Web server(step 3). Then the Web server sends them all as responses to the Web browser(step 4).3. Dynamic generated HTML PagesIn contradiction to a company Web site server, which informs people about theproduct program and services by static pages and pictures, an embeddedWeb server has to supply dynamically generated contents. The embedded Webserver will generate the dynamic pages in the moment of the first access by abrowser. How else could we check the actual temperature of a system viaInternet? Static HTML files are not interesting for an embedded Web server.The most information about the firmware version and service instructions arestored in HTML format. All other tasks are normally made via dynamic generatedHTML.There are two different technologies to generate a specific HTML page in themoment of the request: First the so-called server-side-scripting and secondthe CGI programming. At the server-side-scripting, script code is embeddedinto a HTML page. If required, this code will be carried out on the server (server-sided).For this, there are numerous script languages available. All these languages areusable inside a HTML-page. In the Linux community PHP is used mostly. Thefavourite of Microsoft is VBScript. It is also possible to insert Java directly intoHTML pages. Sun has named this technology JSP(Java Server Pages).The HTML page with the script code is statically stored in the file system of theWeb server. Before this server file is delivered to the client, a special programreplaces the entire script code with dynamic generated standard HTML. The Webbrowser will not see anything from the script language.Figure 3: Single steps of the Server-Side-ScriptingPicture 3 shows the single steps of the server-side-scripting. In step 1 the Webbrowser requests a specific HTML file via HTTP GET-request. The Web serverrecognizes the specific extension of the desired file (for example *.ASP or *.PHPinstead of *.HTM and/or *.HTML) and starts a so-called scripting engine(see step 2). This program gets the desired HTML file including the script codefrom the file system (step 3), carry out the script code and make a newHTML file without script code (step 4). The included script code will be replacedby dynamic generated HTML. This new HTML file will be read by the Webserver (step 5) and send to the Web browser (step 6). If a server-sided scripting issupposed to be used by an embedded Web server, so you haveto consider the necessary additional resources. A simple example: In orderto carry out the embedded PHP code into a HTML page, additional programmodules are necessary for the server. A scripting engine together with theembedded Web server has to be stored in the Flash memory chip of an embeddedsystem. Through that, during run time more main memory is required.4. Web Server running under LinuxOnce spoken about Web servers in connection with Linux most peopleimmediately think of Apache. After investigations of the Netcraft Surveythis program is the mostly used Web server worldwide. Apache is anenhancement of the legendary NCSA server. The name Apache itself hasnothing to do with Red Indians. It is a construct from "A Patchy Server" becausethe first version was put together from different code and patch files.Moreover there are numerous other Web servers - even for Linux. Most of this arestanding under the GPL (like Apache) and can be used license free. Avery extensive overview you can find at "/". EveryWeb server has his advantages and disadvantages. Some are developed forspecific functions and have very special qualities. Other distinguishes at bestthrough their reaction rate at many simultaneous requests, as wellas the variety of theirconfiguration settings. Others are designed to need minimal resources and offer very small setting possibilities, as well as only one connection to a client.The most important thing by an embedded Web server is the actual resource requirements. Sometimes embedded systems offer only minimal resources, which mostly has to be shared with Linux. Meanwhile there are numerous high- performance 32-bit-386/486-microcontroller or (Strong)ARM-based embedded systems that own just 8 Mbytes RAM and 2 Mbytes Flash-ROM (picture 4). Outgoing from this ROM (Read-only-Memory, i.e. Flash memory chips) a complete Linux, based on a 2.2- or 2.4-Kernel with TCP/IP protocol stack and Web server, will be booted. HTML pages and programs are also stored in the ROM to generate the dynamic Web pages. The space requirements of an embedded system are similar to a little bigger stamp. There it is quite understandable that there is no place for a powerful Web server like Apache.Figure 4: Embedded Web Server Module with StrongARM and LinuxBut also the capability of an Apache is not needed to visualize the counter of a photocopier or the status of a percolator by Web servers and browsers. In most cases a single Web server is quite enough. Two of such representatives are boa () and thttpd (). At first, both Web servers are used in connection with embedded systems running under Linux. The configuration settings for boa and thttpd are poor, but quite enough. By the way, the source code is available to the customer. The practicable binary files for these servers are always smaller than 80 Kbytes and can be integrated in the most embedded systems without problems. For the dynamic generation of HTML pages both servers only offer CGI (Common Gateway Interface) as enlargement. Further technologies, like server-side-includes (SSI) are not available.The great difference between an embedded Web server and Apache is, next to the limited configuration settings, the maximal possible number of simultaneous requests. High performance servers like Apache immediately make an own process for every incoming call request of a client. Inside of this process allfurther steps will then be executed. This requires a very good programming and a lot of free memory resources during run time. But, on the other hand many Web browsers can access such a Web server simultaneously. Embedded Web server like boa and thttpd work only with one single process. If two users need to get access onto a embedded Web server simultaneously, one of both have to wait a few fractions of a second. But in the environment of the embedded systems that is absolutely justifiable. In this case it is first of all a question of remote maintenance, remote configuration and similar tasks. There are not many simultaneous requests expected.The DIL/NetPCs DNP/1110 – Using the Embedded LinuxList of FiguresFigure 1: TCP/IP stack and HTTP programming modelFigure 2: Functional principle from Web server and browserFigure 3: Single steps of the Server-Side-ScriptingFigure 4: Embedded Web Server Module with StrongARM and LinuxListingsListing 1.A: HTTP GET-requestListing 1.B: HTTP response as result of the GET-request from listing 1.A ContactSSV Embedded SystemsHeisterbergallee 72D-30453 HannoverTel. +49-(0)511-40000-0Fax. +49-(0)511-40000-40Email: sales@ist1.deWeb: www.ssv-embedded.deDocument History (Sadnp05.Doc)Revision Date Name1.00 24.05.2002FirstVersion KDWThis document is meant only for the internal application. The contents ofthis document can change any time without announcement. There is takenover no guarantee for the accuracy of the statements. Copyright ©SSV EMBEDDED SYSTEMS 2002. All rights reserved.INFORMATION PROVIDED IN THIS DOCUMENT IS PROVIDED 'ASIS' WITHOUT WARRANTY OF ANY KIND. The user assumes the entirerisk as to the accuracy and the use of this document. Some names withinthis document can be trademarks of their respective holders.嵌入式系统的网络服务器在“每个人都处在互联网的浪潮中”之后,现在很明显随之而来的是“每件事都处在互联网的浪潮中”。