BSP and Device Driver Development Guide
The method bsp_pretasking_hook()
is the BSP specific routine
invoked once RTEMS API initialization is complete but before interrupts
and tasking are enabled. No tasks -- not even the IDLE task -- have
been created when this hook is invoked. The pretasking hook is optional
and the user may use the shared version.
The bsp_pretasking_hook()
routine is the appropriate place to
initialize any support components which depend on the RTEMS APIs.
Older BSPs that do not take full advantage of boot_card()
may initialize the RTEMS C Library in their implementation of
bsp_pretasking_hook()
. This initialization includes the
application heap used by the malloc
family of routines as well
as the reentrancy support for the C Library.
The routine bsp_libc_init
routine invoked from the
either boot_card()
or (less preferable) the BSP specific
bsp_pretasking_hook()
routine is passed the starting address,
length, and growth amount passed to sbrk
. This "sbrk amount"
is only used if the heap runs out of memory. In this case, the RTEMS
malloc implementation will invoked sbrk
to obtain more memory.
See Miscellaneous Support Files sbrk() Implementation for more
details.
BSP and Device Driver Development Guide
Copyright © 1988-2008 OAR Corporation