Collaboration diagram for Initialization:
![]() |
Defines | |
#define | NUTMEM_END |
Last memory address without using external SRAM. | |
Functions | |
void | main (void *) |
NutIdle (void *arg) | |
AVR Idle thread. | |
void | NutInitHeap () |
void | NutCustomInit (void) |
void | NutInit (void) |
Nut/OS Initialization. |
|
Last memory address without using external SRAM.
|
|
NutCustomInit is a container function for hardware specific init code. The hardware is selected with a PLATFORM macro definition. Typically this function configures CPLDs, enables chips, overwrites NutInitXRAM's default wait state settings, sets the default baudrate for NUDEBUG as they depend on the crystal frequency used, etc. |
|
AVR Idle thread. Running at priority 254 in an endless loop. |
|
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 crtnut.o should be replaced by crtnutram.o, if the application's variable space exceeds 4kB. For boards with RTL8019AS and EEPROM emulation (like Ethernut 1.3 Rev-G) use crtenut.o or crtenutram.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")));
|