跳至主要内容

【转】VxWorks BSP config.h文件注解

target/all/
config.h

/*
This file contains the configuration parameters for the CPU evaluation board.
*/

#ifndef INCconfigh
#define INCconfigh

/* BSP version/revision identification, before configAll.h */
#define BSP_VER_1_2 1
#define BSP_VER_1_1 1
#define BSP_VERSION "1.2" /* A Tornado 2.0 BSP */
#define BSP_REV "/3" /* 0 for first revision */

#include "configAll.h"        /* 这个文件定义了VxWorks所有的缺省设置 */


/*
* Define ONE of the following to specify the revision of the PPC405GP chip
* you are using. Undefine all others. sysModel() will return
* "Unknown processor" if the correct selection is not made.
*/

/*
* Default boot line
*/

/*

解释: 这一行对配置网络,连通Target Server及下载调试程序非常重要

DEFAULT_BOOT_LINE 的原意是为没有NVRAM的target设计的,这样用户就不需要在每次系统启动是手工输入这些参数了.

系统启动网络时xxxEndLoad()会解释这一行并按这一行的定义进行加载.

Emac(0,0) : 启动设备,可是是软盘,硬盘,PCMCIA卡等 其他的设备名称如:

fd为软盘,(0,0)表示第一个软驱,3.5寸盘.
dc则表示从DEC 21x4x 芯片启动,即系统有NVRAM存在,这种方式现在已不采用.
elpci表示启动设备为3COM EtherLink XL PCI网卡.
fei:Intel 82559 EtherExpress网卡.
ene: NE2000网卡
ELT: 3COM以太网卡
EEX: Intel网卡
ata: ATA/IDE 硬盘 ............

405GP: 主机名
vXworks 从主机加载的VxWorks文件
h=172.16.1.159   主机的IP地址    

e=172.16.254.52 目标机的IP地址,若网络启动Target Server时,这个IP必须和主机上Target Server配置的Target IP地址一致,且设置Back End选项为wdbrpc
u=xxx  用户名,pw=xxx  密码: 若通过网络加载调试时,主机的Ftp服务器和目标机的用户名和密码必须相同
tn=vxTarget 目标机名称

*/

#define DEFAULT_BOOT_LINE \
        "Emac(0,0)405GP:vxWorks h=172.16.1.159 e=172.16.254.52 \
                u=xxx pw=xxx tn=vxTarget"

/*
* 内存设置.
* 如果定义了LOCAL_MEM_AUTOSIZE则SDRAM的大小会在Boot时指定
*/

#undef LOCAL_MEM_AUTOSIZE                    /* 运行时内存大小 */
#define LOCAL_MEM_SIZE 0x02000000            /* 32MB 内存缺省 */
#define LOCAL_MEM_LOCAL_ADRS 0x00000000     /* 内存基地址为 0 */
#define USER_RESERVED_MEM 0                  /* see sysMemTop() */

/*
* Define SDRAM_ECC_ENABLE to enable ECC if an ECC SDRAM DIMM is detected
* during SDRAM auto-configuration. If not defined, ECC will not be enabled
* if an ECC SDRAM DIMM is detected, and the DIMM will be used as a normal DIMM.
*/

#undef SDRAM_ECC_ENABLE

/* 解释: 这里主要设置系统的内存分配定义,若分配不当,则系统不能正常加载和运行.

ROM_TEXT_ADRS, ROM_SIZE, RAM_HIGH_ADRS, 和RAM_LOW_ADRS 在config.h和Makefile文件中都要定义,且必须要保持一致,这些地址的定义一定要参照VxWorks 加载执行过程,硬件手册,MMU和VxWorks的大小进行.主要原则是保证VxWorks image 在ROM和RAM中都要有一定的运行空间且高效运行,可参见 VxWorks BSP和启动过程.

*/
#define ROM_BASE_ADRS 0xfff80000                  /* ROM的基地址 */
#define ROM_TEXT_ADRS (ROM_BASE_ADRS + 0x100)    /* 程序指针和堆栈指针 */
#define ROM_WARM_ADRS (ROM_TEXT_ADRS+0x0004)     /* 热启动入口地址 */
#define ROM_SIZE 0x0007f000                       /* ROM大小 512KB */
#define RAM_LOW_ADRS 0x00010000                   /* RAM 低地址运行 vxWorks */
#define RAM_HIGH_ADRS 0x00C00000                  /* RAM 高地址存储 bootrom */
#define USER_RESERVED_MEM 0                       /* 用户保留地址 */

/*
* Cache options    定义缓存
*/

#define INCLUDE_CACHE_SUPPORT

#define USER_D_CACHE_ENABLE
#define USER_I_CACHE_ENABLE
#undef USER_D_CACHE_MODE
#define USER_D_CACHE_MODE (CACHE_COPYBACK)


/*
* 405 timers (PIT, FIT, WDT) 可由外部时钟驱动或者CPU驱动
*/

#define TIMER_CLOCK_EXTERNAL

/*
* Optional timestamp support
*/

#undef INCLUDE_TIMESTAMP

/*
* Auxilliary Timer rates    定义辅助计时器频率
*/

#ifdef TIMER_CLOCK_EXTERNAL
#define AUX_CLK_RATE_MIN (EXT_TIMER_CLK_FREQ / (1 << 21) )
#define AUX_CLK_RATE_MAX (EXT_TIMER_CLK_FREQ / (1 << 9) )
#define AUX_CLK_RATE_DEFAULT (EXT_TIMER_CLK_FREQ / (1 << 17) )
#else

/* ZZZZZZZZZZZ todo put rates in for system clock derived timer clock */

评论

此博客中的热门博文

【转】smb协议栈使用示例

/*  * * uncdownload.c  * *  * * Utility for downloading files from SMB shares using libsmbclient  * *  * * Copyright(C) 2006 Sophos Plc, Oxford, England.  * *  * * This program is free software; you can redistribute it and/or modify it under the terms of the  * * GNU General Public License Version 2 as published by the Free Software Foundation.  * *  * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  * * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  * * See the GNU General Public License for more details.  * *  * * You should have received a copy of the GNU General Public License along with this program; if not,  * * write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  * *  * */ # include < sys / types . h > # include < sys / time . h > # include ...

【转】Ether Types

Ether Types (last updated 2008-09-09) NOTE: Please see [RFC5342] for current information and registration procedures. This registry will be revised soon and will be replaced with up-to-date information. Many of the networks of all classes are Ethernets (10Mb) or Experimental Ethernets (3Mb). These systems use a message "type" field in much the same way the ARPANET uses the "link" field. If you need an Ether Type, contact: IEEE Registration Authority IEEE Standards Department 445 Hoes Lane Piscataway, NJ 08854 Phone +1 732 562 3813 Fax: +1 732 562 1571 Email: <ieee-registration-authority& ieee.org > http://standards.ieee.org/regauth/index.html The following list of EtherTypes is contributed unverified information from various sources. Another list of EtherTypes is maintained by Michael A. Patton and is accessible at: <URL: http://www.cavebear.com/CaveBear/Ethernet/ > <URL: ftp://ftp.cavebear.com/pub/Ethernet-codes > Assign...

【转帖】berkeleyDB安装

我们以redhat9为例开始介绍其安装过程: 从其sleepycat公司官网的下载页 http://dev.sleepycat.com/downloads/releasehistorybdb.html 获得其安装包,现在已经更新到4.4.20.   #tar zxfv db-4.x.tgz   #cd db-4.x/build_unix   1. 如果以gcc编译的话,进行以下操作:   #vi /dist/configure 在最前面添加:CC gcc   #../dist/configure   #make   #make install   默认状态,berkeleyDB的lib和include将被安装到/usr/local/BerkeleyDB/下,需要更改这个路径的话,可以将 #../dist/configure一步加上选项--prefix,例如:#../dist/configure --prefix=/opt/BerkeleyDB.   #vi /etc/ld.so.conf 并将berkeleyDB的lib路径加到该文件的最后一行,这样才能找到并加载它的库文件.ld.so.conf是什么东西?它就是系统动态链接库的配置文件。此文件内,存放着可被LINUX共享的动态链接库所在目录的名字(系统目录/lib,/usr/lib除外),各个目录名间以空白字符(空格,换行等)或冒号或逗号分隔。   #ldconfig   2. 如果以armgcc编译的话,进行以下操作:   先安装armgcc,对我说就是在/mnt/setup/program/FFT/FFT-2410光盘-V3.0/linux开发/linux交叉编译器/tool或者在gmail中附件里armgcc目录下(除了cross-armv4l-qtE-custom-1.5-3mz.i386.rpm,其他都装)   #cp /mnt/setup/program/FFT/FFT-2410光盘-V3.0/linux开发/linux交叉编译器/tool /usr/tmp/   #cd /usr/tmp/tool   #rpm -ivh *   #ldc...