Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

System Initialization
[Nut/OS API]

Nut/OS initialization. More...

Functions

void NutInit (void)
 Nut/OS Initialization.

u_long NutVersion (void)
 Return Nut/OS version.

CONST char * NutVersionString (void)
 Return Nut/OS version string.


Detailed Description

Nut/OS initialization.

Todo:
Automatically determine available extension RAM.

Function Documentation

void NutInit void   
 

Nut/OS Initialization.

Initializes the memory management and the thread system and starts an idle thread, which in turn initializes the timer management. Finally the application's main() function is called.

Depending on the compiler, different methods are used to execute this function before main() is called.

For ICCAVR the default crtatmega.o startup file is replaced by crtnut.o, which calls NutInit instead of main(). This is done by adding the following compiler options in the project:

 -ucrtnut.o nutinit.o 

For AVRGCC this function is located in section .init8, which is called immediately before jumping to main(). NutInit is defined as:

 void NutInit(void) __attribute__ ((naked)) __attribute__ ((section (".init8")));
 

u_long NutVersion void   
 

Return Nut/OS version.

Returns:
Version coded into an unsigned long. Most significant byte is the major version number, followed by the minor version number, again followed by the release number and finally the build number in the least significant byte.

CONST char* NutVersionString void   
 

Return Nut/OS version string.

Returns:
Pointer to a printable string containing the version number. The string contains 4 numbers separated by dots. The first is the major version number, followed by the minor version number, again followed by the release number and finally followed by the build number. In non-official releases this may be optionally followed by a space and an additional release state.
Examples:
httpd/httpserv.c, playmp3/playmp3.c, and tcps/tcps.c.


© 2000-2003 by egnite Software GmbH - visit http://www.ethernut.de/