1、外文文献阅读与翻译 Nucleus PLUS Nucleus PLUS is a real-time, preemptive, multitasking kernel designed for time-critical embedded applications. Approximately 95% of Nucleus PLUS is written in ANSI C.Because of this, Nucleus PLUS is extremely portable and is currently available for use with most microprocessor
2、 families. Nucleus PLUS is typically implemented as a C library. Real-time Nucleus PLUS applications are linked with the Nucleus PLUS library. The resulting object may be downloaded to the target or placed in ROM. In a typical target environment, the binary image of the Nucleus PLUS instruction area
3、, assuming all services are used, requires roughly 20 Kbytes of memory. Accelerated Technology.s software development practices facilitate clarity, modularity, reliability, reusability, and ease of maintenance. Nucleus PLUS is comprised of multiple software components. Each software component has a
4、unique purpose and a specific external interface to other components. The composition of each Nucleus PLUS software component is discussed in greater detail in subsequent chapters. Accelerated Technology (ATI) uses a software component methodology. A software component has a single, clear purpose. S
5、oftware components are typically comprised of several C and/or assembly language files. Each software component provides a well defined external interface. Utilization of a component is accomplished through use of its this external interface. With few exceptions, access to global data structures wit
6、hin a component is not allowed outside of the component. Because of this component methodology, Nucleus PLUS software components are both easy to replace and easy to re-use. Nucleus PLUS is typically implemented as a C library. Real-time Nucleus PLUS applications are linked with the Nucleus PLUS lib
7、rary. The resulting object may then be downloaded to the target or placed in ROM. NUCLEUS.LI is typically the file name of the Nucleus PLUS library. This is built with the batch file BUILD_LI.BAT. The contents of BUILD_LI.BAT are specific to the development tool being used. In processor architecture
8、s that have both supervisor and user modes of operation, Nucleus PLUS application tasks typically run in supervisor mode. This is because application tasks make direct calls to operating system services that utilize privileged instructions. This method reduces service call overhead and is also much
9、easier to implement. Of course, this method allows the tasks to access anything and everything. The user is responsible for providing its own initialization routine, which is called Application Initialize. This routine should create the tasks, queues, and other system objects that are required when
10、the system starts. If the application does not utilize dynamic creation/deletion of system objects during run-time, all of the required system objects may be created in Application_Initialize.Multitasking begins immediately after the users Application Initialize routine returns. In some target envir
11、onments, the low-level system initialization files, INT.S, INT.ASM, or INT.SRC may require modification. These files initialize the system timer interrupt, available memory, and other entities that are inherently processor or board specific. All user code that references Nucleus PLUS services and/or
12、 data types must include the file NUCLEUS.H. This file contains data type definitions, constant definitions, and function prototypes for all of the Nucleus PLUS services. This file is specific to each port of Nucleus PLUS. The main Nucleus PLUS include file, NUCLEUS.H, contains function prototypes t
13、hat match those defined in the Nucleus PLUS reference manual. However, the NU_* functions do not really exist. For most Nucleus PLUS services, there exists a function that really does the work and a .shell. Function that checks for errors in the users request before calling the real function. Depend
14、ing on the error checking conditional define,NU_NO_ERROR_CHECKING, the Nucleus PLUS service call is mapped, through macro substitution, to the appropriate underlying function. This facilitates complete elimination of error checking when it is not required. There are several conditional flags availab
15、le when compiling application programs, Nucleus PLUS application elements may disable error checking on parameters supplied to Nucleus PLUS services by defining NU_NO_ERROR_CHECKING with a compiler command line option. This results in a substantial increase in run-time performance, and also reduces
16、code size. Application data structures defined in NUCLEUS.H may be mapped directly to the internal Nucleus PLUS data structures by defining the NU_DEBUG option during compilation. This allows the user to directly examine the internals of each Nucleus PLUS data structure within a source-level debuggi
17、ng environment. If the NU_DEBUG option is used, it is often a good idea to re-build all of the Nucleus PLUS source code with the same NU_DEBUG option. Processor and development tool dependencies in Nucleus PLUS have been isolated to four files. Three of the files (INT.?, TCT.?, and TMT.?) are writte
18、n in assembly language. These files provide the low-level, run-time environment for the underlying target environment. The third file (NUCLEUS.H) is included, either directly or indirectly, by all of the files in the system. This file defines various data types and other processor and development tool specific information.