| After operating system is introduced by embedded system, application developers can easily manage various hardware and software resources of embedded system, and the embedded system runs stably. Application developers can use system service functions which operating systems provides to fast develop applications that users need. Embedded equipment, which has network function, can realize more extensive and more general sharing of data, sharing of hardware and the communication function. Comparing with the traditional isolated embedded equipment, embedded system, which is connected to network, not only has the traditional functions, but also has the advantages of network. So it has important and practical significance to join the operating system and network protocol into embedded systems.The aim of this paper is to add network protocol toμC/OS-Ⅱwhich has no network protocol currently. Embedded equipment, whereμC/OS-Ⅱruns as its operating system, can be connected to network. The structure and features of embedded operating systemμC/OS-Ⅱkernel are introduced. The porting of puttingμC/OS-Ⅱinto hard development platform is designed and implemented. Then, the comment on features and theory of LwIP is made. The initialization, receiving, sending and interrupt handling driver programs for network card chip are devised and realized. The interface between LwIP and network card chip driver programs is planned. The operating system emulation layer of this network protocol stack is realized. From the result of experiment, the response to Ping command can be received from operating system where network protocol runs as a task. This phenomenon indicates that low level driver, data link layer, IP protocol and ICMP protocol work normally. At last, the network protocol stack designed by this paper is used. A embedded WEB server is designed and implemented in the operating system. From the result of experiment, user can remotely access and control development board. This shows that the HTTP request, what is submitted by user, can be handled by embedded WEB server. The HTTP protocol of LwIP works correctly. A conclusion can be reached:the embedded network protocol, which is deigned by this paper, is successfully run inμC/OS-Ⅱ. It is feasible to use this system deigned by this paper to develop network application. |