Introduction to the embedded operating system of nucleus splus

Source: Internet
Author: User
The embedded operating system of nucleus splus is currently the most popular operating system. nucleus splus is a preemptive multi-task operating system kernel designed for real-time embedded applications, 95% of its code is written in ansi c, so it is easy to transplant and supports most types of processors.
From the implementation point of view, nucleus is a group of C function libraries. The application code is connected with the core function library to generate a target code, download to the target board RAM or directly burn it to the target board ROM for execution. In a typical target environment, the size of the core code area is generally no more than 20 kb. Nucleus splus uses software components. Each component has a single and clear purpose. Generally, it consists of several C and assembly language modules. It provides clear external interfaces through which components are referenced. Except for a few special cases, global access to components from the outside is not allowed. As software components are used, each component of the nucleus splus is easy to replace and reuse. The components of nucleus splus include task control, memory management, inter-task communication, synchronization and mutex of tasks, interrupt management, timer and I/O driver.
Nucleus has the following features:
1. Provide the source code "NucleusPLUS" and provide the C-source code with strict comments to each user. In this way, you can thoroughly describe how the underlying kernel works, and delete or modify system software according to your special requirements, this is of great help to software standardization management and system software testing. In addition, because the RTOS source code is provided, users can not only learn and study RTOS, but also do not have to pay License for the product during mass production, which saves a lot of costs. For the military, because the source code is provided, users can completely control the kernel without worrying about the possibility of abnormal tasks in the operating system causing system crash.
2. High Cost-effectiveness due to the adoption of advanced micro-kernel technology, synusplus has considerable advantages in priority arrangement, task scheduling, task switching, and other aspects. In addition, the comprehensive support for the c ++ language makes the kernel of the Nucleus a Real-Time object-oriented operating system kernel. However, the price is reasonable. Therefore, it is easy to be accepted by a large number of R & D units.
3. It is easy to learn and use. With the ability to combine paradigm, SDS, and Ati's multi-task debugger into a powerful integrated development environment, it works with the appropriate compiler, dynamic connection library, and various underlying driver software, you can easily develop and debug RTOS. In addition, because these integrated development environments (IDES) are familiar to all development engineers, they are easy to learn and use.
4. Rich functional modules: In addition to powerful Kernel Operating Systems, nucleus splus also provides a wide range of functional modules. For example, the local area and wide area network modules used for communication systems support real-time windows modules for graphics applications, Web product modules for Internet networks, and real-time BIOS modules for industrial computer, graphical User interfaces and application software performance analysis modules. You can select different application modules based on your applications.

The following types of CPU supported by nucleus splus:
The RTOS kernel of nucleus splus supports the following types of CPUs: x86, 68xxx, 68 HCxx, NECV25, ColdFire, 29 K, i960, MIPS, SPARClite, TIDSP, ARM6/7, StrongARM, h8/300 H, SH1/2/3, PowerPC, V8xx, Tricore, Mcore, PanasonicMN10200, Tricore, Mcore, etc. It can be said that NUCLEUS + is a real-time multi-task operating system that supports the most abundant CPU types. For a variety of embedded applications, NucleusPLUS also provides corresponding network protocols (such as TCP/IP and SNMP) to meet users' development requirements for communication systems. In addition, reusable file systems, reusable C-function libraries, and graphical interfaces Also provide convenience for developers. For different CPU types, Nucleus also provides compiler, dynamic Connection Library, multi-task debugger and other tools to configure your development environment. It is worth noting that ATI also recently published the embedded integrated development environment-nucleus. It is the first to combine embedded development tools with Microsoft's powerful development environment and provide engineers with powerful development methods.

Iii. advantages brought by source code: As we all know, the real-time multi-task operating system of nucleus provides source code to users. In addition to providing users with great commercial benefits (without paying off the royal balance), this also provides users with great technical convenience, that is, no need to write or debug BSP, so as to achieve the goal of being easy to learn and easy to use, acceleration product is available. Engineers who have specific knowledge about RTOS must be clear that the biggest obstacle to using RTOS is writing and debugging BSP. As you know, you must connect the target to the host and establish communication before debugging the software of the target system. For this purpose, we can write a Monitoring Program (MONITOR ). However, to debug a program based on the RTOS kernel, the debugger on the host (debugger) must not only establish communication with the target, but also identify the RTOS task, in this way, you can perform task-level debugging (Task-awaredebugger ). Therefore, only monitor is not enough. If the selected RTOS does not provide source code, the debugger on the host (debugger) only the user-compiled BSP can be used to understand how the kernel schedules tasks on the existing hardware platform. Obviously, writing BSP must have a comprehensive and in-depth understanding of the hardware and application software of the CPU target system. Generally, it takes about two months for an engineer with certain hardware development experience to write a new BSP. This is difficult for a newbie. Another major challenge for BSP writing engineers is how to debug the BSP, that is, how to verify that the compiled BSP is correct. Generally, there are many faults (bugs) in hardware or software in the PCB just installed. Even more often, the CPU does not work properly. Sometimes timing errors and bus Errors still exist. When you try to establish a connection between the target and the host by burning the BSP into the EPROM (or flash), you will find that there is no communication at all, and the front is dark, I don't know whether the software is wrong or the hardware is not running. Is BSP running normally? Unknown. You may find that it has been a few months away. BSP is the only choice for early real-time operating systems. However, the new generation of RTOs-nucleus usplus avoids the pain of BSP. Because the debugging of nucleus is based on the new dynamic connection library (DLL ). The user only needs to establish the communication between the target system (target) and the host (host) through the Monitoring Program (MONITOR), BDM debugging port (or JTAG debugging port, add the dynamic Connection Library (DLLs) of the nucleus to the debugger initialization feature on the host. Then, the debugger can automatically identify the nucleus kernel and various application tasks running in the target system, to complete task-level debugging. The above dynamic Connection Library (DLLs) is completed by the cooperation between the RTOS vendor and the debugger vendor, and you do not need to write it yourself. Therefore, you only need to focus on the programming based on nucleus. For a newbie, after one or two days of learning and training, you can invest in application programming without having to spend a lot of time researching the CPU, specific hardware. In addition, with the source program, you can use the stepinto command to debug the program and track it to the inner layer of RTOS to view and learn the task management and scheduling mechanism of the kernel. It is extremely convenient for engineers who want to study RTOS deep technology. For javasla68k and PowerPC, you can use Greenhill's mutil debugger or TRACE-ICD to debug the nucleus splus; for ARM and Strongarm, you can use the sdt251 debugger or TRACE-ICD of arm to debug the nucleus. For the intelx86 real-mode, you can use the debugger and Its DLL of paradigm for task-level debugging; for the intelx86 protection mode, you can use the SSI softprobe debugger and ssidll for debugging. For i960, SH3/4, arm6/7, MIPS and other chips, you can debug the task Using ATI's own UDB debugger. Conclusion: dynamic connection library (DLL) is a new application trend in RTOs tools. In this way, you can save the trouble caused by BSP and perform flexible and convenient development and debugging, greatly accelerate the development progress. The nucleus real-time operating system provides source code, supports a wide range of CPU types, and works with various DLL dynamic connection libraries, bringing great benefits to the use and research of RTOS Technology Engineering. The development of the ARM Series requires a large amount of device investment. In addition, if a large system is to be used, the operating system is required. The cost of purchasing a good operating system is also RMB 100,000. Arm's application layer R & D can be built on C, C ++ and most of its development languages, which is very convenient for software companies, as long as hardware and operating systems are ready, other jobs can be divided into modules for N people. For the underlying layer, arm companies can also have strong support. Therefore, if you need to use the ARM Series to develop high-end products, the feasibility is relatively high and the development cycle will not be long. Of course, there are still some restrictions on the ARM chip. For example, there is no division command. In this way, division should be avoided as much as possible during programming. Otherwise, the increase of program code and the decrease of execution speed will occur. Generally, Division can still be replaced by shift and multiplication.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.