| In recent years, the embedded systems have been used widely in the control field.μC/OS-Ⅱis a famous open source operating system, but it has no network abilities. LwIP is an open source TCP/IP stack, its design emphasis is to use as little RAM as possible while can still support most functions of the TCP/IP stack. This feature makes LwIP stack work well in an embedded system. SoμC/OS-Ⅱand LwIP together can give the ability of network to the embedded systems whose resource is very limited. In most cases, the control programs designed forμOS-Ⅱhave to be compiled with the OS files, after downloaded into an embedded system, they are hard to change. If you need some complex control features, you have to design a big and comprehensive system, or download different programs according to needs.Firstly, this paper gives some study on the core module, task management module, synchronization and communication module, memory management module and the transplantation interface in theμC/OS-Ⅱ, after that, it discusses how to transplantμC/OS-Ⅱto ARM 9.Secondly, this paper studies the overall structure, memory management and the API in the LwIP.Thirdly, a driver of the DM9000 is designed for LwIP, and the operating system simulation layer in the LwIP is completed using the API provided byμC/OS-Ⅱ, after these, the LwIP can work onμC/OS-Ⅱ.Fourthly, a server in the embedded system and a client in PC are designed, the server and the client can communicate with each other using some special messages. The client can not only control the server to run programs received through net, but can also control and query the states of the running programs in the embedded system.Finally, some test operations are carried out to prove that the system can work well and the flexibility is enhanced significantly. |