📄 config.h
字号:
/* config.h - SBC8260 configuration header file *//* Copyright 1984-2002 Wind River Systems, Inc. *//*modification history--------------------01l,17feb02,g_h Add the NO_NETWORK option to BOOT_DEVICE type01j,29jan02,g_h Add #undef NV_RAM_SIZE before re-defining01i,25jan02,g_h Add EEPROM_DELAY macro01h,18jan02,g_h Remove MAC_ADRS_IN_NVRAM macro01g,26oct01,g_h Cleaning for T2.201f,24sep01,g_h change rev number01e,07may01,g_h add support for visionWARE 2.0001d,27oct99,elk included both Ethernet drivers.01c,19aug99,elk added defines for local bus SDRAM and 4Mb/2Mb flash.01b,18aug99,elk increased LOCAL_MEM_SIZE to 16Mb.01a,05mar99,elk adopted from estMDP8xx config.h (ver 01a).*//*This file contains the configuration parameters for the BSP.*/#ifndef __INCconfigh#define __INCconfigh#ifdef __cplusplusextern "C" {#endif/* *//* BSP version/revision identification, should be placed before the *//* the #include "configAll.h" */#define BSP_VER_1_1 1#define BSP_VERSION "1.2"#define BSP_REV "/40" /* Now include the global configuration information. */#include "configAll.h"/* Memory configuration *//* SDRAM Size */#undef INCLUDE_16MEG_SDRAM #define INCLUDE_64MEG_SDRAM /* (requires hardware modification) */#if (defined(INCLUDE_16MEG_SDRAM) && defined(INCLUDE_64MEG_SDRAM))#error "You can't have 16MB SDRAM and 64MB SDRAM, undef one macro"#endif/* * 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) */#ifdef INCLUDE_16MEG_SDRAM#define ROM_SIZE 0x00100000 /* 1M ROM space */#define ROM_BASE_ADRS 0xfff00000 /* base address of ROM */#define ROM_TEXT_ADRS ROM_BASE_ADRS + 0x100#define LOCAL_MEM_LOCAL_ADRS 0x00000000 /* Base of RAM */#define LOCAL_MEM_SIZE 0x01000000 /* 16 Mbyte memory */#define RAM_LOW_ADRS 0x00100000 /* RAM address for sys image */#define RAM_HIGH_ADRS 0x00E00000 /* RAM address for ROM boot */#define USER_RESERVED_MEM 0x00000000 /* user reserved memory size */#endif /* INCLUDE_16MEG_SDRAM */#ifdef INCLUDE_64MEG_SDRAM#define ROM_SIZE 0x00100000 /* 1M ROM space */#define ROM_BASE_ADRS 0xfff00000 /* base address of ROM */#define ROM_TEXT_ADRS ROM_BASE_ADRS + 0x100#define LOCAL_MEM_LOCAL_ADRS 0x00000000 /* Base of RAM */#define LOCAL_MEM_SIZE 0x04000000 /* 64 Mbyte memory */#define RAM_LOW_ADRS 0x00100000 /* RAM address for sys image */#define RAM_HIGH_ADRS 0x01E00000 /* RAM address for ROM boot */#define USER_RESERVED_MEM 0x02000000 /* user reserved memory size */#endif /* INCLUDE_64MEG_SDRAM */#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 /* RAM_DST_ADRS *//* Boot FLASH types */#define ON_BOARD_FLASH 1 #define SIMM_FLASH 2/* Boot FLASH configuration */#define BOOT_FLASH ON_BOARD_FLASH /* Specify CS0 connection: ON_BOARD_FLASH, SIMM_FLASH */#define FLASH_SIZE_2MB 0x00200000#define FLASH_SIZE_4MB 0x00400000#define CS0_FLASH_ADRS 0xFE000000#define CS6_FLASH_ADRS 0xE0000000#if (BOOT_FLASH == ON_BOARD_FLASH)#define LOCAL_FLASH_CS0#define CS0_FLASH_SIZE FLASH_SIZE_2MB /* 2MB */#define CS6_FLASH_SIZE FLASH_SIZE_4MB /* 4MB */#elif (BOOT_FLASH == SIMM_FLASH)#define SIMM_FLASH_CS0#define CS0_FLASH_SIZE FLASH_SIZE_4MB /* 4MB */#define CS6_FLASH_SIZE FLASH_SIZE_2MB /* 2MB */#else#define LOCAL_FLASH_CS0#define CS0_FLASH_SIZE FLASH_SIZE_2MB /* 2MB */#define CS6_FLASH_SIZE FLASH_SIZE_4MB /* 4MB */#endif/* Serial port configuration */#define INCLUDE_TTY_DEV /* Include TTY Dev for those that use command line building */#undef NUM_TTY#define NUM_TTY N_SIO_CHANNELS /* Timer configuration */#define INCLUDE_AUX_CLK#define INCLUDE_TIMESTAMP/* Cache configuration */#define INCLUDE_CACHE_SUPPORT#define USER_I_CACHE_ENABLE #undef USER_I_CACHE_MODE#define USER_I_CACHE_MODE CACHE_COPYBACK /* select COPYBACK or WRITETHROUGH */#define USER_D_CACHE_ENABLE #undef USER_D_CACHE_MODE#define USER_D_CACHE_MODE CACHE_COPYBACK /* select COPYBACK or WRITETHROUGH *//* MMU configuration */#define INCLUDE_MMU_BASIC#undef INCLUDE_MMU_FULL#define USER_I_MMU_ENABLE#define USER_D_MMU_ENABLE/* TFFS configuration */#undef INCLUDE_TFFS#ifdef INCLUDE_TFFS#define INCLUDE_SHOW_ROUTINES#define INCLUDE_DOSFS#endif /* INCLUDE_TFFS *//* LED configuration */#define INCLUDE_SYSLED/* Local Bus SDRAM configuration */#define INCLUDE_LOCAL_BUS_SDRAM/* Frequency configuration */#undef HARDCODED_FREQ_PARMS /* undef to use User Dip Switchs see target.nr */#ifdef HARDCODED_FREQ_PARMS#define INPUT_FREQUENCY FREQ_66MHZ /* see target.nr for details */#define CPM_FREQUENCY FREQ_133MHZ#define CORE_FREQUENCY FREQ_200MHZ#endif /* HARDCODED_FREQ_PARMS */#define DEC_CLOCK_FREQ sysInputFreqGet()#define SYS_CPU_FREQ sysInputFreqGet()/* MAC Address configuration */#define MAC_ADRS_LEN 6 /* 6 bytes in MAC address */#define WR_ENET0 0x00 /* WR specific portion of MAC (MSB->LSB) */#define WR_ENET1 0xa0#define WR_ENET2 0x1e #define CUST_ENET3 0x01 /* Customer portion of MAC address */#define CUST_ENET4 0x02#define CUST_ENET5 0x03#define ENET_DEFAULT 0xa01e0000#define ETHERNET_MAC_ADRS {WR_ENET0, WR_ENET1, WR_ENET2, CUST_ENET3, CUST_ENET4, CUST_ENET5} /* NvRAM storage configuration */#define SMART_EEPROM_WRITE /* skip EEPROM write if already the value */#define INCLUDE_EEPROM_LOCKING /* lock eeprom via software protection */#define ETHERNET_ADR_SET /* (bootConfig.c to enable 'N' command) */#define EEPROM_DELAY 50/* NvRAM configuration */ #define NV_RAM_SIZE EEPROM_SIZE /* 8K bytes non-volatile RAM */#define NV_RAM_ADRS EEPROM_ADRS#define NV_RAM_INTRVL 1#define RETRY_NVWRITE_COUNT 1000 /* abort loop after interations */#define NVRAM_INITIALIZED "MAC_ADRS=" /* Initialization Indicator */#define NV_INIT_SIZE (sizeof(NVRAM_INITIALIZED)-1)#undef NV_BOOT_OFFSET /* room for init indicator (and possibly MAC address) */#if (NV_RAM_SIZE != NONE) #define NV_BOOT_OFFSET (NV_INIT_SIZE + MAC_ADRS_LEN) #define NV_MAC_ADRS_OFFSET -MAC_ADRS_LEN#else#define NV_BOOT_OFFSET NV_INIT_SIZE #endif /* (NV_RAM_SIZE != NONE) *//* Network driver configuration */#define INCLUDE_NETWORK#define INCLUDE_NET_INIT#undef INCLUDE_BP#undef INCLUDE_EX#undef INCLUDE_ENP#undef INCLUDE_SM_NET#undef INCLUDE_SM_SEQ_ADD/* Only if using network */#ifdef INCLUDE_NETWORK/* Enhanced Network Driver (END) support */#define INCLUDE_END /* Enhanced Network Driver (see configNet.h) */#undef INCLUDE_BSD /* BSD 4.4 drivers (not supported) *//* Network Driver Types */#define NO_NETWORK 0#define SCC_FCC_END 1#define SCC_END 2#define FCC_END 3#define BOOT_DEVICE SCC_FCC_END /* Specify Boot Device: SCC_END or FCC_END SCC_FCC_END */#endif /* INCLUDE_NETWORK */ /* Boot device */ #if (BOOT_DEVICE == FCC_END)#define INCLUDE_MOTFCCEND /* Include Motorola FCC Fast Ethernet controller */#undef INCLUDE_MOTSCCEND /* Exclude Motorola SCC Ethernet controller */#define BOOT_DEV_NAME "motfcc"#undef WDB_COMM_TYPE#define WDB_COMM_TYPE WDB_COMM_END#elif (BOOT_DEVICE == SCC_END)#undef INCLUDE_MOTFCCEND /* Exclude Motorola FCC Fast Ethernet controller */#define INCLUDE_MOTSCCEND /* Include Motorola SCC Ethernet controller */#define BOOT_DEV_NAME "motscc"#undef WDB_COMM_TYPE#define WDB_COMM_TYPE WDB_COMM_END#elif (BOOT_DEVICE == SCC_FCC_END)#define BOOT_DEV_NAME "motfcc"#define INCLUDE_MOTFCCEND /* Include Motorola FCC Fast Ethernet controller */#define INCLUDE_MOTSCCEND /* Include Motorola SCC Ethernet controller */#undef WDB_COMM_TYPE#define WDB_COMM_TYPE WDB_COMM_END#elif (BOOT_DEVICE == NO_NETWORK)#define BOOT_DEV_NAME "none"#undef INCLUDE_MOTFCCEND#undef INCLUDE_MOTSCCEND#else#define BOOT_DEV_NAME "none"#endif/* Debuging configuration *//* * If the FORCE_DEFAULT_BOOT_LINE is defined then the DEFAULT_BOOT_LINE * parameters are always used regardless of NVRAM values specified at * bootrom time. See target.nr for details. This is usually used to debug * WR downloaded images with out a bootrom present. */#undef FORCE_DEFAULT_BOOT_LINE#ifdef INCLUDE_WDB_COMM_VTMD#define FORCE_DEFAULT_BOOT_LINE /* When using TMD this macro should be undefined */#endif /* INCLUDE_WDB_COMM_VTMD *//* visionWARE configuration */#define INCLUDE_VWARE_LAUNCH/* Stuff to be excluded if FORCE_DEFAULT_BOOT_LINE defined */#ifdef FORCE_DEFAULT_BOOT_LINE#undef INCLUDE_VWARE_LAUNCH#undef NV_RAM_SIZE#define NV_RAM_SIZE NONE#endif /* FORCE_DEFAULT_BOOT_LINE *//* Boot line configuration */#ifdef BOOT_DEV_NAME #define DEFAULT_BOOT_LINE BOOT_DEV_NAME \ "(0,0)wrSbc8260:vxworks " \ "e=192.168.100.51 " \ "h=192.168.100.155 " \ "g=0.0.0.0 " \ "u=anonymous pw=user " \ "f=0x00 tn=wrSbc8260"#ifdef INCLUDE_VWARE_LAUNCH#define VWARE_BOOT_LINE BOOT_DEV_NAME \ "(0,0)wrSbc8260:vxworks " \ "%s " \ "%s " \ "%s " \ "u=anonymous pw=user " \ "f=0x00 tn=wrSbc8260" #endif /* INCLUDE_VWARE_LAUNCH */#endif /* BOOT_DEV_NAME *//* * 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 \ { \ IMPORT int myAppInit(); \ taskSpawn ("myApp", 30, 0, 5120, \ myAppInit, 0x1, 0x2, 0x3, 0,0,0,0,0,0,0); \ }/* Include hardware header file */#include "wrSbc8260.h"#ifdef __cplusplus}#endif#endif /* __INCconfigh */#if defined(PRJ_BUILD)#include "prjParams.h"#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -