| The real-time operating system has been widely used in the development of embedded system because of its good real-time performance and reliability.But the real-time operating system is highly professional and highly related to the software platform and hardware platform.Different system software is difficult to transplant and reuse,and the threshold for application development is high.At the same time,the complex system kernel implementation leads to weak readability and low compilation speed of user projects,which directly affects development efficiency.Therefore,based on the general embedded computer architecture,this thesis studies the residency of the real-time operating system,and realizes the effective division of the system kernel and the user program,which can improve the compilation speed and program clarity of user projects,and reduce the difficulty of application software development.The main research contents are as follows.(1)The microcontroller software based on the general embedded computer architecture is divided into BIOS and User,and the feasible solution for the real-time operating system to reside in the BIOS is explored.Firstly,taking the transplantation technology as the leading research,a modular adaptation method is proposed to reduce the difficulty of transplantation and provide a basis for the residency of different real-time operating systems.Then,the key implementation of resident technology is given.Through the reasonable division of Flash and RAM resources,the independence of user projects is realized.And the user project can implement normal system function calls by using the vector table-like mechanism and the interrupt sharing mechanism.Finally,resident tests are carried out on RT-Thread and mbedOS respectively to verify the generality of the method.(2)The application project framework in which the real-time operating system resides is implemented by using the principles of layering and componentization.Firstly,The project structure,startup process and user interface of the framework are reasonably designed.And through the in-depth study of the kernel scheduling mechanism,the realtime performance of the framework is analyzed.Finally,the completeness of the framework is tested and optimized,and the portability of the framework is analyzed on different hardware platforms.(3)A brushless roller motor control system is developed using RT-Thread residency to verify the practicability of resident technology.The specific circuit design is given in hardware,and multi-threading is used to simplify program design in software.Finally,it is proved by testing that the system software developed based on the resident framework can guarantee the functionality,real-time and stability.This thesis explores the resident technology of real-time operating systems,and designs a stable and easy-to-use application project framework,which can provide operating system support for the user’s application development,lower the threshold for embedded development,and improve programming convenience. |