RAM 6.0 BUX II Series Guía de usuario Pagina 43

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 189
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 42
2 Overview of a BSP
2.3 Components of a BSP
35
2
sysPhysMemTop( )
The sysPhysMemTop( ) routine in sysLib.c returns the address of the top of
physical memory. This routine is required for VxWorks 6.0 BSPs and, although it is
not strictly required for VxWorks 5.5 BSPs, it is included in most. This routine can
be enhanced to allow automatic memory sizing.
/***********************************************************************
*
* sysPhysMemTop - get the address of the top of physical memory
*
* This routine returns the address of the first missing byte of memory,
* which indicates the top of memory.
*
* Normally, the user specifies the amount of physical memory with the
* macro LOCAL_MEM_SIZE in config.h. BSPs that support run-time
* memory sizing do so only if the macro LOCAL_MEM_AUTOSIZE is defined.
* If not defined, then LOCAL_MEM_SIZE is assumed to be, and must be, the
* true size of physical memory.
*
* NOTE: Do not adjust LOCAL_MEM_SIZE to reserve memory for application
* use. See sysMemTop() for more information on reserving memory.
*
* RETURNS: The address of the top of physical memory.
*
* ERRNO
*
* SEE ALSO: sysMemTop()
*/
char * sysPhysMemTop (void)
{
LOCAL char * physTop = NULL;
if (physTop == NULL)
{
physTop = (char *)(LOCAL_MEM_LOCAL_ADRS + LOCAL_MEM_SIZE);
}
return (physTop) ;
}
sysModel( )
The sysModel( ) routine in sysLib.c returns a string pointing to the model number
of the board. For simple BSPs, this routine returns a constant string. If the BSP
supports multiple board models, sysModel( ) requires a method to distinguish
between boards to determine which of the related strings to use. The following is
a simple example:
Vista de pagina 42
1 2 ... 38 39 40 41 42 43 44 45 46 47 48 ... 188 189

Comentarios a estos manuales

Sin comentarios