Nucleus PLUS kernel technology

Source: Internet
Author: User
Tags microsoft c
Application of Nucleus Plus in Embedded Systems

Nucleus Plus is a new generation embedded operating system launched by ATI, a source code operating system provider in the United States. It is a preemptive real-time multi-task operating system kernel and 95% of the Code is written in ansi c, it is very easy to transplant to various processor families. From the implementation perspective, unlike traditional embedded development, Nucleus Plus is linked to the target application in the form of a function library to form executable target code, download to the target board or burn to ROM/flash rom for execution. The core of the Nucleus Plus occupies about 20 K space in a typical CISC architecture, and about 40 K space in a typical RISC architecture. The core data structure occupies K bytes of space. With its real-time response, preemptive, multi-tasking, and open source code features, Nucleus Plus is available in communications, defense, industrial control, aviation/aerospace, railway, network, POS, automated control, smart home appliances, and other fields. is widely used.

Nucleus Plus kernel technology

ATI uses a method called software components. A software component is a non-independent application that executes one or more C/Assembly source files for a specific purpose or purpose. Each component provides a defined external interface, components must be used through external interfaces. Accessing the global data structure in a component is forbidden. With the component method, software components are easy to update and reuse. The Nucleus Plus Software Component is usually composed of INCLUDE header files defining data types, constants, and external interfaces, and one or more C/Assembly source files. The following 16 components are provided: task control management, memory management, timer management, interrupt, system diagnosis, and I/O Driver Management,

Nucleus Plus Kernel:

Common Service Component (CS)

Initialization Component (IN)

Tread Control Component (TC)

Timer Component (TI)

Mailbox Component (MB)

Pipe Component (PI)

Semaphore Component (SM)

Event Flag Component (EV)

Partition Component (PM)

Queue Component (QM)

Dynamic Memory Component (DM)

I/O Component (I/O)

History Component (HI)

Error Component (ER)

License Component (LI)

Release Component (RL)

In addition to its powerful kernel, Nucleus Plus also provides software packages for INTERNET, TCP/IP, WEB browsers, graphics, and file systems. See figure 1.

Nucleus Plus Development

1. customized Nucleus Plus

The core plus can also be tailored and customized based on the needs of the target board to generate an operating system suitable for the target system, as little as possible to occupy the system memory. After the OS is customized, link it to the target application to become a part of the target application. On the target board of a typical CISC architecture, it occupies about 20 KB of space, while on the target board of the RISC architecture, it occupies about 40 kb of space. Generally, Nucleus PLUS is sufficient for most embedded applications. ATI provides a program named build_li.bat or plus. bat batch files. You can delete the modules, change related options or switches, and execute this file to generate the target-related operating system, that is, a customized operating system is generated according to system requirements. Note that the content of the batch processing file is related to the development tool.

2. Development Solution

Synus plus can be combined with paradigm, SDS, and ATI multi-task debugger to form a powerful integrated development environment, use the appropriate Compiler (Borland C/C ++ compiler, Turbo C/C ++ compiler, or Microsoft C/C ++ compiler) and dynamic link library and various underlying driver software can meet the needs of embedded application development.

3. Development Process

To develop an embedded application with Nucleus PLUS, follow these steps:

* If necessary, modify the low-level system initialization file. int to meet the needs of the target board. Such as interrupt vector, I/O address, and clock frequency.

* Define the application _ initialize () function. This function is executed before the system is started. Note that the header file of nucleus. H should be included in the target application to take advantage of the services of Nucleus PLUS.

* Define application tasks. If you call the service of Nucleus PLUS, You need to include nucleus. h.

* Compile/compile all application software and contain the system's low-level initialization file. INT.

* Link. INT and all application target files, the file of the Nucleus Plus library, and related development tool libraries.

* Download or burn the generated final target code to the target board for execution.

4. initialize Nucleus Plus

Nucleus Plus has three levels of initialization: System Low-Level Initialization Int-Initialize (), system advanced initialization Inc-Initialize (), and application initialization Application_Initialize (), after initialization, the task scheduling cycle of Nucleus Plus is entered. The initialization function tasks are shown in table 1.

Table 1: Nucleus Plus initialization table

Int_Initialize () Inc_Initialize () Application_Initialize ()
* Set necessary processor/system control registers
* Initialize the interrupt vector table
* Set the system stack register
* Calculate the HISR stack and priority of the timer.
* Computing system country-specific available memory
* Submit the control to the advanced initialization routine of the system.
* Initialize the Nucleus Plus component.
* Submit the control to the application initialization routine.
Task Scheduling

* Perform User-Defined initialization, such as creating a memory pool, creating tasks, creating semaphores, and creating queues.

5. Nucleus MNT

Nucleus us MNT is designed for software developers to build a Prototyping Environment for the embedded applications of Nucleus Plus under WIN95/NT. It is implemented through two libraries, that is, the database for the target environment and the database for the Win95/NT development environment. During development, the application procedure code remains unchanged. Instead, the MNT library is replaced. The cross-Development Toolkit is used to reconstruct the executable target code in the target environment. See figure 2.

6. Development considerations

Embedded Development has special features in terms of memory requirements and task management. Therefore, you should pay extra attention to the following aspects in development.

* Task famine

The assignment of task priorities should be reasonable. Otherwise, some tasks in the system will be constantly running, and other tasks will never be run, resulting in famine.

* Deadlock

The distribution of system resources should be reasonable. Otherwise, two or more tasks will be suspended infinitely to compete for a system resource.

* Memory

* Memory leakage

In the memory allocation process, try to avoid fragments and pay attention to timely collection.

* Memory saving

* By default, Nucleus Plus is in the advanced initialization function Inc_Initialize. When other functions are called to initialize the data structure of all features provided by the function, some feature user target applications may not be used. To this end, remove unnecessary function calls.

* Change the NU_MAX_LISRS size in Nucleus. H. It defines the maximum number of Interrupt vectors of the target processor.

* Change the size of TC_PRIORITIES in TC_DEFS.H. It defines the priority level of a task. Nucleus Plus supports 256 priorities.

* HISR stack sharing.

* The query table TCD_LOWEST_SET_BIT RAM copy is not allowed in the TCM. C.

* Use a smaller INT option.

Conclusion

Due to its modular, reliable, reusable, open, easy-to-use, and secure features, Nucleus Plus has become an ideal platform for embedded application development, especially in areas related to national economy and livelihood, such as aviation/aerospace, military, and national defense.

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.