📄 config.h
字号:
/* config.h -- V100R001CPE configuration header */
/* Copyright 2002-2004 Founder Communications,Inc. */
/*
modification history
--------------------
01a,11mar05,fhchen adapted from pb1500_mips32sf/config.h (ver 01c).
*/
/*
TODO
----
- correct flash config
*/
/*
DSCRIPTION
This file contains the configuration parameters for the
Founder Communications V100R001 CPE board.
*/
#ifndef __INCconfigh
#define __INCconfigh
#ifdef __cplusplus
extern "C" {
#endif
/* BSP version/revision identification, before configAll.h */
#define BSP_VER_1_1 1
#define BSP_VER_1_2 1
#define BSP_VERSION "1.2"
#define BSP_REV "/0" /* increment with each revision */
/* includes */
#include "configAll.h"
/* Clock */
#define CPU_MHZ (396) /* 396 MHz */
#define CPU_CLOCK_RATE (CPU_MHZ * 1000000)
#define CPU_PLL_DIVISOR (CPU_MHZ / 12)
#define CPU_MIN_PLL_DIVISOR (4)
#define SD_DIVISOR (2) /* not set, using default value */
#if (CPU_MHZ==396)
# define CPU_10NS_DELAY 12
#else
# error: 10 us delay must be recalculated for new system clock rate.
#endif
/* Cache */
#undef USER_D_CACHE_MODE
#define USER_D_CACHE_MODE CACHE_COPYBACK
#undef USER_I_CACHE_MODE
#define USER_I_CACHE_MODE CACHE_COPYBACK
#define ICACHE_SIZE 0x4000
#define ICACHE_LINE_SIZE 32
#define DCACHE_SIZE 0x4000
#define DCACHE_LINE_SIZE 32
/* No Hardware FP */
#undef INCLUDE_HW_FP
/* No MMU */
#undef INCLUDE_MMU_BASIC
#undef INCLUDE_MMU_FULL
/* Memory */
#define RCS0_IS_29LV040
/* #define RCS0_IS_28F128J3 */
#define RCS3_IS_28F128J3
/* #define RCS3_IS_NONE */
#define LOCAL_MEM_LOCAL_ADRS 0x80000000
#define LOCAL_MEM_SIZE 0x02000000 /* 32 MB */
#define USER_RESERVED_MEM 0x00040000 /* reserve 256KB */
/*
* The constants ROM_TEXT_ADRS, ROM_SIZE, RAM_LOW_ADRS and
* RAM_HIGH_ADRS are defined in config.h, and the Makefile.
* ALL DEFINITIONS FOR THESE CONSTANTS MUST BE IDENTICAL.
*/
#define ROM_TEXT_ADRS 0xBFC00000 /* base address of ROM */
#define ROM_BASE_ADRS ROM_TEXT_ADRS
#if defined(RCS0_IS_28F128J3) && !defined(RCS0_IS_29LV040)
# define ROM_SIZE 0x01000000 /* 16M ROM space */
#elif defined(RCS0_IS_29LV040) && !defined(RCS0_IS_28F128J3)
# define ROM_SIZE 0x00100000 /* 1M ROM space */
#else
# error "invalid RCS0 scheme"
#endif /* defined(RCS0_IS_28F128J3) && !defined(RCS0_IS_29LV040) */
#define RAM_LOW_ADRS 0x80100000 /* RAM text/data address */
#define RAM_HIGH_ADRS 0x80800000 /* RAM text/data address */
/* Timer */
#define INCLUDE_AUX_CLK
#define INCLUDE_TIMESTAMP
#undef SYS_CLK_RATE
#define SYS_CLK_RATE 100
#define AUX_CLK_RATE 1000
#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 10000 /* maximum auxiliary clock rate */
/* TTY */
#define INCLUDE_TTY_DEV
#undef NUM_TTY
#define NUM_TTY N_SIO_CHANNELS
#undef CONSOLE_TTY
#define CONSOLE_TTY 0
#undef CONSOLE_BAUD_RATE
#define CONSOLE_BAUD_RATE 115200
/* END */
#define INCLUDE_END
#define INCLUDE_AUEND
#define INCLUDE_NET_SHOW
/* Ethernet (MAC) address defines */
#define ETHERNET_ADR_SET /* enable 'N' command in bootConfig.c */
#define ENET_DEFAULT PSWAP(0x0000C250) /* default Ethernet address */
#define MAC_ADRS_LEN 6 /* 6 bytes in MAC address */
#define MAX_MAC_ADRS 4
#define CPE_ENET0 0x00
#define CPE_ENET1 0xC2
#define CPE_ENET2 0x50
#define CPE_ENET3_0 0xA0
#define CPE_ENET3_1 0xA1
#define CPE_ENET3_2 0xA2
#define CPE_ENET3_3 0xA3
#define CPE_ENET4 0xAA
#define CPE_ENET5 0xA0
/* WDB */
#define INCLUDE_WDB
#undef INCLUDE_WDB
#define INCLUDE_WDB
#ifdef INCLUDE_WDB
# undef WDB_MODE
# undef WDB_COMM_TYPE /* disable default path */
# define WDB_MODE WDB_MODE_TASK /* WDB_MODE_[DUAL|TASK|EXTERN] */
# define WDB_COMM_TYPE WDB_COMM_END /* set Path to END */
#endif /* INCLUDE_WDB */
/* EEPROM NvRAM */
#define INCLUDE_EEPROM
#undef INCLUDE_EEPROM
#define INCLUDE_EEPROM
#ifdef INCLUDE_EEPROM
# define NV_RAM_SIZE 2048 /* 2KB eeprom */
# define NVRAM_INITIALIZED "MAC_ADRS=" /* Initialization Indicator */
# define NV_RAM_INIT_SIZE (sizeof(NVRAM_INITIALIZED)-1)
# undef NV_BOOT_OFFSET
# define NV_BOOT_OFFSET (NV_RAM_INIT_SIZE + (MAC_ADRS_LEN * MAX_MAC_ADRS))
# define NV_MAC_ADRS_OFFSET -(MAC_ADRS_LEN * MAX_MAC_ADRS)
#else
# define NV_RAM_SIZE NONE
#endif
#if 0
/* flash defines */
#define FLASH_WIDTH 4
#define FLASH_CHIP_WIDTH 2
#define FLASH_ADRS 0xbc000000
#define FLASH_SIZE 0x04000000 /* 64 MB */
#define FLASH_WIDTH_SPECIAL_2
/* True Flash File System (TFFS) */
#define PB_TFFS_BASE_ADDR 0xbc000000
#define PB_TFFS_ERASE_BLK_SIZE 0x00040000
#define PB_TFFS_FLASH_SIZE 0x02000000
#define PB_TFFS_WINDOW_SPEED 150 /* 150 nsec. */
#endif /* To be finished */
/* Boot-line */
#define BOOT_VIA_TFFS 0
#define BOOT_VIA_AUMAC 1
#define BOOT_DEVICE BOOT_VIA_AUMAC
#if (BOOT_DEVICE == BOOT_VIA_AUMAC)
# define BOOT_DEV_NAME "aumac"
#elif (BOOT_DEVICE == BOOT_VIA_TFFS)
# define BOOT_DEV_NAME "/tffs"
#else
# define BOOT_DEV_NAME "none"
#endif
#define DEFAULT_BOOT_LINE BOOT_DEV_NAME \
"(0,0)test005:vxWorks " \
"h=192.168.80.126 " \
"e=192.168.80.175:fffffc00 " \
"u=cpe pw=cpe tn=CPE " \
"f=0x00 "
/*
* If the FORCE_DEFAULT_BOOT_LINE is defined then the DEFAULT_BOOT_LINE
* parameters are always used regardless of NVRAM values specified at
* bootrom prompt, which will be stored in NVRAM.
*
* When debugging, if you intend to change DEFAULT_BOOT_LINE frequently,
* then define FORCE_DEFAULT_BOOT_LINE. In final product image, undefine
* this macro to use boot parameters in NVRAM.
*/
#define FORCE_DEFAULT_BOOT_LINE
#undef FORCE_DEFAULT_BOOT_LINE
#ifdef FORCE_DEFAULT_BOOT_LINE
# undef NV_RAM_SIZE
# define NV_RAM_SIZE NONE /* disable boot parameters in NVRAM */
#endif /* FORCE_DEFAULT_BOOT_LINE */
/* Misc */
#define INCLUDE_SYSLED
#define INCLUDE_EXTERNAL_WATCHDOG
#undef INCLUDE_SM_NET /* backplane net interface */
#undef INCLUDE_SM_SEQ_ADDR /* shared memory network auto address setup */
/* Debug */
#define BSP_DEBUG
#define BSP_DEBUG_BOOT
#undef BSP_DEBUG_BOOT
#define INCLUDE_NET_INIT
#define INCLUDE_SHELL
/* use make vxWorks.st in cmd line to include the symbol table */
#if 0
# define INCLUDE_SYM_TBL
# define INCLUDE_SYM_TBL_INIT
# define INCLUDE_STANDALONE_SYM_TBL
# define INCLUDE_STAT_SYM_TBL
#endif
#undef INCLUDE_NET_REM_IO
#if 1 /* if system clock not working, turn off the following lines */
# define INCLUDE_LOGGING
# define INCLUDE_LOG_STARTUP
# define INCLUDE_NET_REM_IO
#endif
/* Include hardware header file */
#include "V100R001CPE.h"
#ifdef __cplusplus
}
#endif
#endif /* __INCconfigh */
#if defined(PRJ_BUILD)
#include "prjParams.h"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -