www.pudn.com > at91rm9200vxworksbsp.rar > config.h


/* config.h - ARM Integrator configuration header */

/* Copyright 1999-2001 ARM Limited */
/* Copyright 1999-2001 Wind River Systems, Inc. */

/*
modification history
--------------------
01a,21nov06,yanyuan  copied from atmel BSP version 1.0.0.
*/

/*This module contains the configuration parameters for the ARM Integrator BSP.*/

#ifndef INCconfigh
#define INCconfigh

#ifdef __cplusplus
extern "C" {
#endif

/* Define or undef this MACOR according to your usage */

/* Define BOOTROM_START_FROM_RAM if AT91 use internal boot, that is BMS = 1; */
#define BOOTROM_START_FROM_RAM
#ifdef BOOTROM_START_FROM_RAM
#define BOOTCODE_IN_RAM
#endif

/* BSP version/revision identification, before configAll.h */
#define BSP_VERSION	"0.5"
#define BSP_REV		".6"	/* 0 for first revision */

#include "configAll.h"

#define DEFAULT_HOST_IP_ADDRESS 	"192.168.1.1"
#define DEFAULT_TARGET_IP_ADDRESS 	"192.168.1.2:ffffff00"
#define DEFAULT_TARGET_MAC_ADDRESS 	{0x00, 0x11, 0xB5, 0x00, 0x00, 0xf4}
#define ENET_DEFAULT                0x000011B5

#if 0
#define DEFAULT_BOOT_LINE \
    "eth(0,0) host:vxworks " \
    "h=" DEFAULT_HOST_IP_ADDRESS " e=" DEFAULT_TARGET_IP_ADDRESS " u=grentech pw=grentech tn=at91rm9200 o=eth"    
#else
#define DEFAULT_BOOT_LINE \
    "tffs=0,0(0,0)host:vxworks " \
    "h=" DEFAULT_HOST_IP_ADDRESS " e=" DEFAULT_TARGET_IP_ADDRESS " u=grentech pw=grentech tn=at91rm9200 o=eth"    
#endif

#define DEFAULT_BOOT_FILE "RruBoot.bin"

/*NODEB_RRU1.0_BOOTROM_0.53.BIN*/


/****************************************************************************************   

                       Hardareware Configuration
                       
              1 BSP configuration variants            
              2 buses
              3 MEMORY
              4 peripherals
              
*******************************************************************************************/

/************ 1 BSP configuration variants ************/

/************ 2 buses *********************************/

/************ 3 memory ********************************/

#undef	LOCAL_MEM_AUTOSIZE			/* run-time memory sizing */

#define LOCAL_MEM_LOCAL_ADRS	AT91_SDRAM_BASE	/* fixed at zero */
#define LOCAL_MEM_BUS_ADRS	    AT91_SDRAM_BASE	/* fixed at zero */
#define LOCAL_MEM_SIZE			0x02000000	/* 32 Mbytes */
#define RAM_LOW_ADRS			0x20001000	/* VxWorks image entry point */
#define RAM_HIGH_ADRS			0x20600000	/* RAM address for ROM boot */

#define LOCAL_MEM_END_ADRS	    (LOCAL_MEM_LOCAL_ADRS + LOCAL_MEM_SIZE)


#define USER_RESERVED_MEM	    0x200000  	/* see sysMemTop() */
#define SYS_MEM_TOP             (LOCAL_MEM_LOCAL_ADRS + LOCAL_MEM_SIZE - USER_RESERVED_MEM)

/*
 * Boot ROM is an image written into Flash. Part of the Flash can be
 * reserved for boot parameters etc. (see the Flash section below).
 *
 * The following parameters are defined here and in the Makefile.
 * They must be kept synchronized; effectively config.h depends on Makefile.
 * Any changes made here must be made in the Makefile and vice versa.
 *
 * ROM_BASE_ADRS is the base of the Flash ROM/EPROM.
 * ROM_TEXT_ADRS is the entry point of the VxWorks image
 * ROM_SIZE is the size of the part of the Flash ROM/EPROM allocated to
 *		the VxWorks image (block size - size of headers)
 *
 * Two other constants are used:
 * ROM_COPY_SIZE is the size of the part of the ROM to be copied into RAM
 * 		 (e.g. in uncompressed boot ROM)
 * ROM_SIZE_TOTAL is the size of the entire Flash ROM (used in sysPhysMemDesc)
 *
 * The values are given as literals here to make it easier to ensure
 * that they are the same as those in the Makefile.
 */
#define ROM_SIZE            0x00100000     /* size of pre-ROM holding bootrom : 1M bytes*/
#define ROM_COPY_SIZE       0x00100000     /* size of bootrom : < 1M bytes */
#define ROM_SIZE_TOTAL    	AT91_FLASH_SIZE	 /* total size of ROM */

#define ROM_BASE_ADRS       AT91_FLASH_BASE     /* 16 bit port */

#ifdef BOOTCODE_IN_RAM
#define ROM_TEXT_ADRS       RAM_HIGH_ADRS  /* code start addr in ROM */
#else
#define ROM_TEXT_ADRS       ROM_BASE_ADRS  /* code start addr in ROM */
#endif

/* * Cache/MMU configuration *
 * Note that when MMU is enabled, cache modes are controlled by
 * the MMU table entries in sysPhysMemDesc[], not the cache mode
 * macros defined here.
 * We use the generic architecture libraries, with caches/MMUs present. A
 * call to sysHwInit0() is needed from within usrInit before
 * cacheLibInit() is called.
 */
#define INCLUDE_MMU_BASIC
#define INCLUDE_CACHE_SUPPORT

/* 920T/940T/946ES I-cache mode is a bit of an inappropriate concept, but use this. */
#undef  USER_I_CACHE_MODE
#define USER_I_CACHE_MODE       CACHE_WRITETHROUGH

/* 920T/940T/946ES has to be this. */
#undef  USER_D_CACHE_MODE
#define USER_D_CACHE_MODE       CACHE_COPYBACK

#ifndef USER_D_CACHE_ENABLE
#define USER_D_CACHE_ENABLE
#endif
#ifndef USER_D_MMU_ENABLE
#define USER_D_MMU_ENABLE
#endif

/************ 4 peripherals ***************************/
/*----------- TrueFFS -----------------*/
#define INCLUDE_TFFS 
#ifdef  INCLUDE_TFFS
#define INCLUDE_DOSFS
#define DEFAULT_FS_BOOT_MOUNT_POINT "/boot/"
#define DEFAULT_FS_BOOT_CONFIG_FILE "boot.ini"
#define DEFAULT_FS_MAC_CONFIG_FILE  "mac.ini"
#define INCLUDE_TFFS_DOSFS
#define INCLUDE_TFFS_SHOW
#define INCLUDE_TL_SSFDC
#define TFFS_DRIVE_NUMBER 0
#define TFFS_MOUNT_POINT DEFAULT_FS_BOOT_MOUNT_POINT
#define TFFS_REMOVABLE 0
#endif /* INCLUDE_TFFS */

/*----------- Clock -----------------*/
#undef SYS_CLK_RATE
#define SYS_CLK_RATE                     60
#define INCLUDE_SYSCLK_INIT


#define INCLUDE_AUX_CLK
#ifdef INCLUDE_AUX_CLK
    /* Limits
    MIN : CLK = AT91C_TC_TIMER_DIV1_CLOCK; RC = (AT91C_MASTER_CLOCK/2)/50000; 20us
    MAX : CLK = AT91C_TC_TIMER_DIV4_CLOCK; RC = 0xFFFF; 140ms
    */
#define AUX_CLK_RATE_MIN                10                   /* minimum auxiliary clock rate */
#define AUX_CLK_RATE_MAX                500000             /* maximum auxiliary clock rate */
#endif /* INCLUDE_AUX_CLK */

#undef INCLUDE_TIMESTAMP

/*----------- Serial -----------------*/
/** Serial port configuration **/
#define INCLUDE_SIO
#ifdef INCLUDE_SIO
#undef	NUM_TTY
#define NUM_TTY			N_SIO_CHANNELS
#undef	CONSOLE_TTY
#define	CONSOLE_TTY		0	/* console channel */ 
#undef CONSOLE_BAUD_RATE
#define CONSOLE_BAUD_RATE	115200	/* console baud rate */
#endif /*INCLUDE_SIO*/

/****************************************************************************************   

                       Networks Component Configuration
                       
              1 basic network initialization            
              2 networks devices
              3 networking protocols              
              
*******************************************************************************************/

/************ 1 basic network initialization ************/
#define IP_MAX_UNITS 3     /* add pseudo net interface */

/************ 2 networks devices ************************/
#define INCLUDE_END        /* Enhanced Network Driver (END) Support */
#ifdef	INCLUDE_END
#define INCLUDE_SEC_END
#undef  WDB_COMM_TYPE		/* WDB agent communication path is END */
#define WDB_COMM_TYPE	WDB_COMM_END
#define INCLUDE_MIILIB
#endif  /* INCLUDE_END */

/************ 3 networking protocols ************************/
#define INCLUDE_RLOGIN
#define INCLUDE_TELNET
#undef INCLUDE_TFTP_CLIENT

#define INCLUDE_PING

/* Simple network time protocol  */
#ifndef INCLUDE_SNTPC
#undef INCLUDE_SNTPC
#endif

#ifndef INCLUDE_SNTPS
#undef INCLUDE_SNTPS
#endif

/* MIB2 */
#ifndef INCLUDE_MIB2_ALL
#undef INCLUDE_MIB2_ALL
#endif

#ifdef	INCLUDE_MIB2_ALL
#define	INCLUDE_MIB2_SYSTEM	/* the system group */
#define	INCLUDE_MIB2_TCP	/* the TCP group */
#define	INCLUDE_MIB2_ICMP	/* the ICMP group */
#define	INCLUDE_MIB2_UDP	/* the UDP group */
#define	INCLUDE_MIB2_IF		/* the interfaces group */
#define	INCLUDE_MIB2_AT		/* the AT group */
#define	INCLUDE_MIB2_IP		/* the IP group */
#endif	/* INCLUDE_MIB2_ALL */

#ifdef INCLUDE_RPC
#undef INCLUDE_RPC
#endif

/* FTP server (wurj) and client */
#ifndef INCLUDE_FTP_SERVER
#define INCLUDE_FTP_SERVER
#endif
#ifndef INCLUDE_FTP
#define INCLUDE_FTP
#endif
/* INCLUDE_PING (wurj)*/
#ifndef INCLUDE_PING
#define INCLUDE_PING
#endif
/****************************************************************************************   

                       Operating System Component Configuration
                       
              1 ANSI C components            
              2 IO system components
              3 POSIX components
              4 kernel components
              5 utility components
              
*******************************************************************************************/

/************ 1 ANSI C components ************/

/************ 2 IO system components ************/
#undef INCLUDE_PIPES
#define INCLUDE_DISK_UTIL

/************ 3 POSIX components ************/
#define INCLUDE_POSIX_TIMERS

/************ 4 kernel components ************/
/*
 * miscellaneous definitions
 * Note: ISR_STACK_SIZE is defined here rather than in ../all/configAll.h
 * (as is more usual) because the stack size depends on the interrupt
 * structure of the BSP.
 */
#define ISR_STACK_SIZE 	0x800	/* size of ISR stack, in bytes */


/************ 5 utility components ************/


/****************************************************************************************   

                       Cplus Components Configuration
                       
              
*******************************************************************************************/

#undef INCLUDE_CTORS_DTORS

/****************************************************************************************   

                       Development tools Configuration
                       
              1 spy
              2 timex
              3 triggering library
              4 compiler support routines
              5 wdb agent components
              6 windview component
              7 show routines
              8 symbol table component
              9 target shell components
              
*******************************************************************************************/
/************ 1 spy ************/
#define INCLUDE_SPY

#define SYSTEM_DEVELOPMENT

#ifdef SYSTEM_DEVELOPMENT


#define INCLUDE_WDB

/* target shell components */
#define INCLUDE_SHELL_BANNER
#define INCLUDE_DEBUG
#define INCLUDE_SHELL

/* symbol talbe component*/
#define INCLUDE_SYM_TBL_SYNC
#define INCLUDE_SYM_TBL         /* symbol table package */
#define INCLUDE_SYM_TBL_INIT
#define INCLUDE_STANDALONE_SYM_TBL

#if 0
/* windview talbe component*/
#undef INCLUDE_WINDVIEW	/* WindView target facilities */
#ifdef INCLUDE_WINDVIEW
#define INCLUDE_WVNET
#define INCLUDE_WINDVIEW_CLASS
#define INCLUDE_WINDVIEW
#define INCLUDE_SEQ_TIMESTAMP
#define INCLUDE_SYS_TIMESTAMP
#define INCLUDE_USER_TIMESTAMP
#define INCLUDE_WVUPLOAD_SOCK
#define INCLUDE_WVUPLOAD_TSFSSOCK
#define INCLUDE_WVUPLOAD_FILE
#define INCLUDE_RBUFF
#define INCLUDE_WV_BUFF_USER
#endif

/* spy component*/
#define INCLUDE_SPY

/* triggering library component*/
#define INCLUDE_TRIGGERING
#endif
#else
/* timex component*/
#undef INCLUDE_TIMEX 

/* spy component*/
#undef INCLUDE_SPY

/* triggering library component*/
#undef INCLUDE_TRIGGERING

/* compiler support routines */
#undef INCLUDE_DIAB_INTRINSICS
#undef INCLUDE_GNU_INTRINSICS

/* wdb agent components */
#undef INCLUDE_WDB

/* windview talbe component*/
#undef INCLUDE_WINDVIEW	/* WindView target facilities */
#undef INCLUDE_WVNET
#undef INCLUDE_WINDVIEW_CLASS
#undef INCLUDE_WINDVIEW
#undef INCLUDE_SEQ_TIMESTAMP
#undef INCLUDE_SYS_TIMESTAMP
#undef INCLUDE_USER_TIMESTAMP
#undef INCLUDE_WVUPLOAD_SOCK
#undef INCLUDE_WVUPLOAD_TSFSSOCK
#undef INCLUDE_WVUPLOAD_FILE
#undef INCLUDE_RBUFF
#undef INCLUDE_WV_BUFF_USER

/* show routines */
#undef INCLUDE_EXC_SHOW
#undef INCLUDE_MSG_Q_SHOW
#undef INCLUDE_SEM_SHOW

/* symbol table component*/
#undef INCLUDE_SYM_TBL_SYNC
#undef INCLUDE_SYM_TBL         /* symbol table package */
#undef INCLUDE_SYM_TBL_INIT
#undef INCLUDE_STANDALONE_SYM_TBL

/* target shell components */
#undef INCLUDE_SHELL_BANNER
#undef INCLUDE_DEBUG
#undef INCLUDE_SHELL

#endif

/******************************************************************************/
/*                                                                            */
/*                    BOARD Validation Test Suite CONFIGURATION                    */
/*                                                                            */
/******************************************************************************/
#define BSP_VTS

#ifdef BSP_VTS
#define INCLUDE_NET_SHOW
#endif /*BSP_VTS*/

#ifndef _ASMLANGUAGE
IMPORT void sysHwInit0 (void);
#endif

#define INCLUDE_SYS_HW_INIT_0
#define SYS_HW_INIT_0()         sysHwInit0 ()

#ifdef __cplusplus
}
#endif
#endif  /* INCconfigh */

#include "at91rm9200dk.h"

#if defined(PRJ_BUILD)
#include "prjParams.h"
#endif

#define INCLUDE_SDRAM_DETECT /*wurj*/
#ifdef INCLUDE_SDRAM_DETECT
/* Hardware configuration */
#define SDRAM_BASE_ADDRESS 0x20000000
#define SDRAM_SIZE         0x2000000
#define CLRSCREEN		"\033[2]"
#endif