⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.h

📁 Embedded Planet公司的ep8260单板计算机的BSP包(VxWorks)
💻 H
字号:
/* rpx/config.h - Embedded Planet board configuration header */

/* Copyright 1984-1997 Wind River Systems, Inc. */

/*
modification history
--------------------
01a,12oct01,gev  created
*/

/*
This file contains the configuration parameters for the
Embedded Planet RPX boards
*/

#ifndef	INCconfigh
#define	INCconfigh

/* BSP version/revision identification, should be placed
 * before #include "configAll.h"
 */
 
#define CS2_ADRS     0xC0000000
#define CS2_SIZE     0x00010000       /* 1 meg */

#define BSP_VER_1_1     1
#define BSP_VER_1_2     1
#define BSP_VERSION     "1.2"
#define BSP_REV         "/0"		/* 0 for the first bsp revision */

#include "configAll.h"
/*dfine eprom*/
#define IP_USR_CONFIG
/*#undef  IP_USR_CONFIG*/
/*#undef  EPROM_EXIST*/
/*
 * Board Type definitions - used to select correct control and status register bits
 */

#define   RPX_UNKWN           0

/*
 * Board Revision definitions - used to select correct control and status register bits
 */

#define   RPX_REV_UNKWN       0

/* Include necessary drivers */
#define INCLUDE_NETWORK
#define INCLUDE_END		/* only END-style driver for FCC and SCC */

/* Include hardware header file */
#include "ep8260.h"

#define  HARDCODED_FREQ_PARMS

#define INPUT_FREQUENCY FREQ_66MHZ      /* see target.nr for details */
#define CPM_FREQUENCY   FREQ_133MHZ
#define CORE_FREQUENCY  FREQ_166MHZ

/* Enhanced Network Driver (see configNet.h) */

/* actual size of endDevTbl MUST be >= MAX_END_DEVS+1 */
#define MAX_END_DEVS 4
#define MAC_ADRS_LEN 6		/* 6 bytes in MAC address */

/* Supported Network Driver Types */
#define FCC_END 1	/* only build in the FCC driver */

/* Choose your Boot Device: FCC_END */
#define BOOT_DEVICE FCC_END

/* Network Options */
#if (BOOT_DEVICE == FCC_END)
  #define BOOT_DEV_NAME "motfcc"
  #define INCLUDE_MOT_FCC		/* Include Motorola FCC Fast Ethernet controller for FCC3 only*/
  #undef INCLUDE_MOT_FCC2		/* Include Motorola FCC Fast Ethernet controller for FCC2 */
  #undef  WDB_COMM_TYPE
  #define WDB_COMM_TYPE WDB_COMM_END	/* see target.nr for details: known problems 3 */
#endif

#if defined(BOOT_DEV_NAME)
  #define DEFAULT_BOOT_LINE	BOOT_DEV_NAME \
				"(0,0)ep8260:vxworks " \
				"e=10.70.6.34 " \
				"h=10.70.6.35 " \
				"g=0.0.0.0 " \
				"u=user pw=user " \
				"f=0x80 tn=ep8260"
#endif

/* DRAM type on the RPX board */

#undef INCLUDE_SDRAM		/* to define in case of SDRAM */

/* Data Caches/MMU */

#define INCLUDE_CACHE_SUPPORT
#define USER_I_CACHE_ENABLE
#define USER_D_CACHE_ENABLE

#define INCLUDE_MMU_BASIC
#define USER_I_MMU_ENABLE
#define USER_D_MMU_ENABLE

/* Number of TTY definition */

#undef	NUM_TTY
#define	NUM_TTY		1		/* defined in rpx.h */

/* Optional timestamp support */

#undef	INCLUDE_TIMESTAMP

/* optional TrueFFS support */

#undef  INCLUDE_TFFS

#ifdef  INCLUDE_TFFS
  #define INCLUDE_DOSFS		/* dosFs file system */
  #define INCLUDE_SHOW_ROUTINES	/* show routines for system facilities*/
#endif /* INCLUDE_DOSFS */

/* clock rates */

#define	SYS_CLK_RATE_MIN	1	/* minimum system clock rate */
#define	SYS_CLK_RATE_MAX	8000	/* maximum system clock rate */
#define	AUX_CLK_RATE_MIN	1	/* minimum auxiliary clock rate */
#define	AUX_CLK_RATE_MAX	8000	/* maximum auxiliary clock rate */

#ifndef INCLUDE_SDRAM
#   define DRAM_REFRESH_FREQ	64000			/* 64 kHz */
#else /* INCLUDE_SDRAM */
#   define DRAM_REFRESH_FREQ	SDRAM_REFRESH_FREQ	/* defined in rpx.h*/
#endif /* INCLUDE_SDRAM */

/*
 * Baud Rate Generator division factor - 0 for division by 1
 *					 1 for division by 4
 *					 2 for division by 16
 *					 3 for division by 64
 */

#define BRGCLK_DIV_FACTOR  0


/* Remove unnecessary drivers */
#undef INCLUDE_BP
#undef INCLUDE_EX
#undef INCLUDE_ENP
#undef INCLUDE_SM_NET
#undef INCLUDE_SM_SEQ_ADD

/* miscellaneous definitions */

#define NV_RAM_ADRS     0xFA080000   /* address of first non-volatile byte */
#define NV_RAM_INTRVL   0x01         /* address interval between bytes */
#define NV_RAM_SIZE     0x8000       /* assume 32k for start, adjusted in sysHwInit */

/* Memory addresses */

#define LOCAL_MEM_AUTOSIZE	/* use DPRAM values to set mem size */

/*
 * The constants ROM_TEXT_ADRS, ROM_SIZE, and RAM_HIGH_ADRS are defined
 * in config.h and Makefile. All definitions for these constants must be
 * identical.  (can be fine-tuned for various configurations)
 */

/* May have to adjust this to meet your board's configuration */
#define ROM_SIZE		0x00600000	/* ROM space */
#define ROM_BASE_ADRS		0xFFA00000	/* base address of ROM */
#define ROM_TEXT_ADRS		ROM_BASE_ADRS	/* + 0x100 */
#define RAM_LOW_ADRS		0x00010000	/* RAM address for sys image  */
#define RAM_HIGH_ADRS		0x01E00000	/* RAM address for ROM boot   */
#define LOCAL_MEM_LOCAL_ADRS	0x00000000	/* Base of RAM                */
#define LOCAL_MEM_SIZE		0x02000000	/* 32 Mbyte memory available */
	       					/* adjusted in sysHwInit */
#define USER_RESERVED_MEM	0x00000000	/* user reserved memory size */

#define ROM_WARM_ADRS		(ROM_TEXT_ADRS+8)  /* warm reboot entry */

#ifndef RAM_DST_ADRS				/* default uncompress dest. */
  #define RAM_DST_ADRS		RAM_HIGH_ADRS
#endif


/*
 * Default power management mode - selected via vxPowerModeSet() in
 * sysHwInit().
 */

#define DEFAULT_POWER_MGT_MODE  VX_POWER_MODE_DISABLE

#include "rpx.h"				/* include the rpx params */

 /*
 * User application initialization
 *
 * USER_APPL_INIT must be a valid C statement or block.  It is
 * included in the usrRoot() routine only if INCLUDE_USER_APPL is
 * defined.  The code for USER_APPL_INIT is only an example.  The
 * user is expected to change it as needed.  The use of taskSpawn
 * is recommended over direct execution of the user routine.
 */

#undef	INCLUDE_USER_APPL
#define	USER_APPL_INIT \
	{ \
					\
	volatile UCHAR Buf[256 + 16];	\
					\
		extern int i2cReadEEprom(UCHAR devI2CAdr, UCHAR Address, int len, UCHAR *data); \
		extern int i2cReadTemp(UCHAR devI2CAdr,UCHAR Address,UCHAR *pdata); \
					\
		i2cReadEEprom(0xa8,0,256,(UCHAR*)Buf);	\
		i2cReadTemp(0x90,0,(UCHAR*)Buf);	\
		i2cReadTemp(0x90,1,(UCHAR*)Buf);	\
		i2cReadTemp(0x90,2,(UCHAR*)Buf);	\
		i2cReadTemp(0x90,3,(UCHAR*)Buf);	\
					\
	}

/* Chuck (PTR Group) Added the following block */
#define INCLUDE_USER_APPL
#undef USER_APPL_INIT
#define USER_APPL_INIT \
        { \
          extern int  ptrGetBoardID(void); \
          extern void sysSerialSC28L198DrvInit(void); \
          extern void sysSerialSC28L198CreateDevs(int boardID); \
          \
          int boardID = ptrGetBoardID(); \
          \
          usrNetInit (BOOT_LINE_ADRS);	/* initialize network support */ \
          \
          if ((boardID == 2) || (boardID == 3)) \
          { \
            sysSerialSC28L198DrvInit(); \
            sysSerialSC28L198CreateDevs(boardID); \
          } \
          \
          if (boardID == 0) \
          { \
            ipAttach(1,"motfcc"); \
            /* Call ifAddrSet("motfcc1","Your.IP.Address.Here"); to */ \
            /* give the second network interface an IP address.     */ \
          } \
        }


/* Chuck (PTR Group) Added the following block */
#define CS3_ADRS     0xE0000000
#define CS3_SIZE     0x00100000       /* 1 meg */
#define CS5_ADRS     0xE0100000
#define CS5_SIZE     0x00100000       /* 1 meg */

/* Chuck (PTR Group) Added the following block */
#if 1
#define INCLUDE_SHELL           /* interactive c-expression interpreter */
#define INCLUDE_LOADER          /* object module loading */
#define INCLUDE_STANDALONE_SYM_TBL /* compiled-in symbol table */
#define INCLUDE_RLOGIN          /* remote login */
#define INCLUDE_SHELL           /* interactive c-expression interpreter */
#define INCLUDE_NET_SHOW
#define INCLUDE_SHOW_ROUTINES   /* show routines for system facilities*/
#define INCLUDE_STARTUP_SCRIPT  /* execute start-up script */
#define INCLUDE_STAT_SYM_TBL    /* create user-readable error status */
#define INCLUDE_SYM_TBL         /* symbol table package */
#define INCLUDE_TELNET          /* telnet-style remote login */
#define INCLUDE_UNLOADER        /* object module unloading */
#define INCLUDE_DEBUG           /* native debugging */
#define INCLUDE_WDB             /* tornado debug agent */
#endif


#endif	/* INCconfigh */

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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -