📄 config.h
字号:
/* config.h -ixdp2400 configuration header *//* Copyright 2001 Wind River Systems, Inc. *//*modification history--------------------01b,05nov03,scm add INCLUDE_NET_SHOW...01a,22oct02,scm replace LOCAL_MEM_RESERVED with USER_RESERVED_MEM01b,28aug02, vgd WR_PR5 plus update..01a,07nov01,scm written*//*This module contains the configuration parameters for ixdp2400*/#ifndef INCconfigh #define INCconfigh#ifdef __cplusplusextern "C" {#endif/** BSP version/revision identification, before configAll.h **/ #define BSP_VER_1_2 1 /* BSP Version */ #define BSP_VER_1_1 1 /* BSP Version */ #define BSP_VERSION "1.2" /* Version string */ #define BSP_REV "/9" /* 0 for first revision *//* #define VXWORKS_ROM *//* #define VXWORKS_ROM_SER *//* #define BOOTROM */#if defined(VXWORKS_ROM) || defined(VXWORKS_ROM_SER)#else#undef INCLUDE_BOOTP #define INCLUDE_DHCPC#define INCLUDE_NFS#endif#if defined(VXWORKS_ROM) || defined(VXWORKS_ROM_SER)#else/* You must define INCLUDE_SHELL or TELNETD_PARSER_CONTROL if you define INCLUDE_TELNET. */#define INCLUDE_TELNET#endif#define INCLUDE_DOSFS /* dosFs file system */#define INCLUDE_DOSFS_MAIN#define INCLUDE_DOSFS_FAT#define INCLUDE_CBIO#define INCLUDE_DOSFS_DIR_VFAT#define INCLUDE_DOSFS_FMT#define INCLUDE_DISK_UTIL#include "configAll.h" /* Include the default configurations */#define TELNETD_MAX_CLIENTS 4/* * STANDALONE_NET must be defined for network debug with * standalone vxWorks */ #undef STANDALONE_NET/* * bspVal testing ...start */#if defined(VXWORKS_ROM) || defined(VXWORKS_ROM_SER)#else #define INCLUDE_SHELL #define INCLUDE_NET_SYM_TBL #define INCLUDE_SHOW_ROUTINES #define INCLUDE_PING #define INCLUDE_RLOGIN #define INCLUDE_LOADER #define INCLUDE_NET_SHOW #define INCLUDE_UNLOADER#endif/* * bspVal testing ...end */#if defined(VXWORKS_ROM) || defined(VXWORKS_ROM_SER) #define SINGLE_BOOTROM 0#else #define SINGLE_BOOTROM 1#endif#define A0_REV 0/** Selection Macros, which might have affect later **/ #define INCLUDE_SYS_HW_INIT_0 #ifdef INCLUDE_SYS_HW_INIT_0 #ifndef _ASMLANGUAGE IMPORT void sysHwInit0 (void); #endif #define SYS_HW_INIT_0() sysHwInit0 () #endif#define INCLUDE_AUX_CLK #ifdef INCLUDE_AUX_CLK #define AUX_CLK_AVAIL TRUE #endif #define INCLUDE_TIMESTAMP #ifdef INCLUDE_TIMESTAMP #define INCLUDE_USER_TIMESTAMP #ifdef INCLUDE_USER_TIMESTAMP #define USER_TIMESTAMP sysTimestamp #define USER_TIMESTAMPLOCK sysTimestampLock #define USER_TIMEENABLE sysTimestampEnable #define USER_TIMEDISABLE sysTimestampDisable #define USER_TIMECONNECT sysTimestampConnect #define USER_TIMEPERIOD sysTimestampPeriod #define USER_TIMEFREQ sysTimestampFreq #endif /* INCLUDE_USER_TIMESTAMP */ #endif #define INCLUDE_EXC_HANDLING #define INCLUDE_EXC_TASK #define INCLUDE_RAM_PAGE_TABLE #define INCLUDE_SHOW_ROUTINES #undef INCLUDE_HSI_PROBE /* work with standalone image and probe */ /* PCI configuration */#define INCLUDE_PCI #ifdef INCLUDE_PCI #define INCLUDE_PING #define AUTO_PCI_CONFIG /* automatically scan PCI bus and assign addresses */ #define INCLUDE_AUTO_PCI_CONFIG_SHOW_ROUTINE #define INCLUDE_END #ifdef INCLUDE_END #define INCLUDE_FEI82557END /* include FEI END Ethernet driver */ /* The following defines page table entries for part of PCI Memory space */ #define INCLUDE_EXTRA_PCI_MAPPING #undef WDB_COMM_TYPE #define WDB_COMM_TYPE WDB_COMM_END#endif /*INCLUDE_END*/ #endif /* INCLUDE_PCI */#define DEFAULT_BOOT_LINE \ "fei(0,0)host:vxWorks " \ "h=10.10.10.10 e=10.10.10.2:FFFFFF00 u=target pw=target tn=ixdp2400"#define MASTER_BOOT_LINE \ "fei(0,0)host:vxWorks " \ "h=10.10.10.10 e=10.10.10.1:FFFFFF00 u=target pw=target tn=ixdp2400E" #define SLAVE_BOOT_LINE \ "fei(0,1)host:vxWorks " \ "h=10.10.10.10 e=10.10.10.2:FFFFFF00 u=target pw=target tn=ixdp2400I"/*!!! In most situations it is not necessary to change the following macros !!!*//*** UART ***//* Serial port configuration */ #define INCLUDE_SERIAL #ifdef INCLUDE_SERIAL/* * If there are two UARTs. The default UART defs like NUM_TTY, CONSOLE_TTY * and CONSOLE_BAUD_RATE in configAll.h should work fine. If you change any * defaults, it might affect the WDB defs also, so cross check with WDB defs. **/ #define N_UARTS 1 /* we have only 1 UART */ #undef SECOND_UART /* define if 2nd UART exists */ #undef NUM_TTY #define NUM_TTY N_UARTS #define IXDP2400_BAUD_RATE 57600 #define DEFAULT_BAUD IXDP2400_BAUD_RATE #define UART_DEFAULT_BAUD IXDP2400_BAUD_RATE #undef CONSOLE_TTY #define CONSOLE_TTY 0 #undef CONSOLE_BAUD_RATE #define CONSOLE_BAUD_RATE DEFAULT_BAUD/*** WDB ***//* * Define SERIAL_DEBUG to enable debugging * via the serial ports */#undef SERIAL_DEBUG#ifdef VXWORKS_ROM_SER#define SERIAL_DEBUG#endif #ifdef SERIAL_DEBUG #define WDB_NO_BAUD_AUTO_CONFIG #undef WDB_COMM_TYPE #undef WDB_TTY_BAUD #undef WDB_TTY_CHANNEL #undef WDB_TTY_DEV_NAME #define WDB_COMM_TYPE WDB_COMM_SERIAL /* WDB in Serial mode */#ifdef SECOND_UART #define WDB_TTY_BAUD DEFAULT_BAUD /* Baud rate for WDB Connection */ #define WDB_TTY_CHANNEL 1 /* COM PORT #2 */ #define WDB_TTY_DEV_NAME "/tyCo/1" /* default TYCODRV_5_2 device name */#else #define WDB_TTY_BAUD DEFAULT_BAUD /* Baud rate for WDB Connection */ #define WDB_TTY_CHANNEL 0 /* COM PORT #1 */ #define WDB_TTY_DEV_NAME "/tyCo/0" /* default TYCODRV_5_2 device name */#endif #endif /* SERIAL_DEBUG */ #endif /* INCLUDE_SERIAL *//* cache support */ #define INCLUDE_CACHE_SUPPORT #define USER_I_CACHE_ENABLE #define USER_D_CACHE_ENABLE/* StrongARM 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/* StrongARM has to be this, as it does not support writethrough */ #undef USER_D_CACHE_MODE #define USER_D_CACHE_MODE CACHE_COPYBACK/*** MMU ***//* * Initial MMU translation tabel location. Make sure it is 16K aligned. * ROM_TEXT_ADRS should also be recalculted, if this MMU_TRANSLATION_BASE is * changed. */#undef INCLUDE_MMU_FULL#define INCLUDE_MMU_BASIC #define MMU_TABLE_SIZE 0x4000 #define MMU_TRANSLATION_BASE 0x00004000 /* translation tabel location */ #define MMU_TABLE_END MMU_TRANSLATION_BASE+MMU_TABLE_SIZE #if defined(INCLUDE_MMU_BASIC) || defined(INCLUDE_MMU_FULL) #define INCLUDE_MMU #endif#undef VM_PAGE_SIZE #define VM_PAGE_SIZE 4096/* Memory configuration */ #undef LOCAL_MEM_AUTOSIZE /* run-time memory sizing */ #define LOCAL_MEM_LOCAL_ADRS 0x00000000 #define LOCAL_MEM_SIZE 0x02000000 /* 32 meg */ #define USER_RESERVED_MEM 0x0 /*** RAM Information ***//* RAM starting address, RAM Size */ #define RAM_LOW_ADRS 0x00010000 /* Link Address: To where the image will be decompressed */ #define RAM_HIGH_ADRS 0x01000000 /*** ROM Information ***//* * Boot ROM is an image written into Flash ROM and started * by the ixdp2400 Primary Boot Loader. * * 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 * ROM_TEXT_ADRS is the entry point of the VxWorks image * ROM_SIZE is the size of the part of the Flash ROM 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 * (uncompressed bootrom) * ROM_SIZE_TOTAL is the size of the entire Flash ROM (used in sysPhysMemDesc) * * The address of the Flash block being used is: * ROM_BASE_ADRS + (block << 18) (blocks are ROM_SIZE) * The boot ROM image is at an offset of 0xC0 into this block - 0x40 * bytes for a Flash header, 0x80 bytes for an AIF header * * 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_BASE_ADRS 0xC4000000 /* * Where the text starts in ROM, (address of _romInit)... */ #define ROM_TEXT_ADRS (ROM_BASE_ADRS + MMU_TABLE_END)/*This ROM_COPY_SIZE may have to be increased in case the application is also *built with the vxworks image.This info should go into target.nr */ #define ROM_COPY_SIZE 0x200000/* * The size must be big enough so that * (ROM_BASE_ADRS + ROM_SIZE - ROM_TEXT_ADRS) >= size of boot image * We allow up to an arbitrary 128K for the image. */ #define ROM_SIZE 0x01000000 /* 16MB size of flash ROM */ #if (ROM_BASE_ADRS + ROM_SIZE - ROM_TEXT_ADRS) < 0x20000 #error ROM_ values need checking in config.h/Makefile #endif/* * 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 0x1000 /* ISR Stack Size 4K */ #undef STACK_SAVE #define STACK_SAVE 512 /* maximum stack used to preserve *//* * make use of data cache for fast DRAM */ #undef INCLUDE_FAST_DRAM #ifdef INCLUDE_FAST_DRAM #define FD_CACHELINE 8 /* 8 UINT32's in a cache line (32-bytes) */ #define FD_LINESPERSET 28 /* 28 available cache lines per set */ #define FD_SETS 32 /* 32 sets in data cache */ #define FD_MAX_LINES (FD_LINESPERSET * FD_SETS) /* Max number of lines one can allocate (28 x 32) */ #define FD_ORIGIN 0xf9000000 /* location of virtual address */ #define FD_MAX_SIZE 0x7000 /* Max size for MMU table description, 28Kbytes *//* modify based on the number of cache lines you want to use as data ram... */ #define FD_NUMLINES FD_MAX_LINES /* set for max 28Kbytes */ #endif #include "ixdp2400.h" /* Board settings */ /* * Enable Flash as NvRam. Use the ast 512 bytes of flash bank 1 */#undef INCLUDE_FLASH#ifdef BOOTROM#define INCLUDE_FLASH#endif #ifdef INCLUDE_FLASH #define SYS_FLASH_TYPE FLASH_28F128J3A /* Specify 8 bit 28F part */ #undef FLASH_NO_OVERLAY #define SYS_FLASH_WRITE #define FLASH_WIDTH 1 #define FLASH_SEGMENT_SIZE (128 * 1024) /* sector size of 28F128j3a */ /* due to Boot Monitor dependencies we are not at standard offset... */ #define FLASH_ADRS 0xc413fe00 /* typically, (ROM_BASE_ADRS + ROM_SIZE - FLASH_SEGMENT_SIZE) => 0xc4fe0000 */ #define FLASH_SIZE FLASH_SEGMENT_SIZE #define NV_RAM_SIZE 0x200 #undef NV_BOOT_OFFSET #define NV_BOOT_OFFSET 0 #else #define NV_RAM_SIZE NONE #endif /* INCLUDE_FLASH *//*These are INCLUDES required by Application that runs on IXDP2400 development * platform. These is need not be defined for a generic BSP. */ #define INCLUDE_RPC #define INCLUDE_BSD #define IP_MAX_UNITS 20 #define INCLUDE_POSIX_SCHED /*These defines are added to fix the problem od unresolved symbols "__builtin_delete" and "__builtin_new" when Workbench backend is downloaded */ #define INCLUDE_CPLUS /*include C++ support*/ #define INCLUDE_CPLUS_IOSTREAMS /* include basic iostream classes*/ /*For the start up script to be executed only when shell is included*/ #define INCLUDE_STARTUP_SCRIPT/*End of application specific defines*/#undef INCLUDE_USER_APPL#ifdef INCLUDE_USER_APPL#define USER_APPL_INIT \ { \ extern int demoApp(void); \ \ demoApp(); \ }#endif#ifdef __cplusplus}#endif#endif /* INCconfigh */#if defined(PRJ_BUILD) #include "prjParams.h"#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -