-- 作者:wangxinxin
-- 发布时间:2010-11-17 10:45:28
-- VxWorks系统BSP配置文件及生成下载
ndif #define CONSOLE_BAUD_RATE 57600
#undef INCLUDE_ENV_VARS /* unix compatable environment variables */ #undef INCLUDE_TIMEX /* timexLib for exec timing */ #undef INCLUDE_HW_FP #undef INCLUDE_TFTP_CLIENT /* used by autoboot from ftp server*/
#define INCLUDE_SW_FP #define INCLUDE_ELF #define INCLUDE_NET_SHOW #define INCLUDE_PING #undef INCLUDE_DEMO /* only for vxWorks bsp test */ #define ETHERNET_ADR_SET /* only for bootrom used */ #define INCLUDE_USER_APPL /* Startup the user\'\'s application in dos makefile project */ #undef PCIDEBUG
#ifdef INCLUDE_USER_APPL #define USER_APPL_INIT _appEntry() #endif
#endif /* INCconfigh */ #if defined(PRJ_BUILD) #include "prjParams.h" #endif
Makefile文件配置
# Makefile - make rules for board # #*/
CPU = PPC40x TOOL = gnu
TGT_DIR=$(WIND_BASE)/target include $(TGT_DIR)/h/make/defs.bsp include $(TGT_DIR)/h/make/make.$(CPU)$(TOOL) include $(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE)
## Only redefine make definitions below this point, or your definitions will ## be overwritten by the makefile stubs above.
TARGET_DIR = xxx VENDOR = IBM BOARD = xxx
RELEASE = vxWorks vxWorks.st bootrom_uncmp.hex
USR_ENTRY = usrInit
# ROM_TEXT_ADRS, ROM_SIZE, RAM_HIGH_ADRS, 和RAM_LOW_ADRS 在config.h,Makefile和Makefile.*文件中 # 都要定义,且必须要保持一致,
ROM_TEXT_ADRS = fff80100 # ROM 起始地址 ROM_SIZE = 0007f000 # ROM 空间大小
RAM_LOW_ADRS = 00010000 # RAM 低地址 vxWorks */ RAM_HIGH_ADRS = 00C00000 # RAM 高地址存储 bootrom */
HEX_FLAGS = -a 100
#ADDED_CFLAGS = -gdwarf -O0 # for debug
MACH_EXTRA = appentry.o # 注意:这里加载用户的程序模块,程序调用在usrRoot()
BOOTCONFIG = bootconfig.c # bsp bootconfig.c for bootrom
## Only redefine make definitions above this point, or the expansion of ## makefile target dependencies may be incorrect.
include $(TGT_DIR)/h/make/rules.bsp include $(TGT_DIR)/h/make/rules.$(WIND_HOST_TYPE)
Tornado for x86下BSP的生成,下载和Target Server的配置实例,Pentium主机,3Com网卡,软盘引导,ftp下载VxWorks映像。
1.在C:\\Tornado\\target\\config\\pcPentium目录下修改BSP文件config.h。
#elif (CPU_VARIANT == PENTIUM) #define DEFAULT_BOOT_LINE "elt(0,0)HOST:c:\\\\Tornado\\\\target\\\\config\\\\pcPentium\\\\vxWorks h=90.0.0.3 e=90.0.0.50 u=target pw=target tn=target"
#define INCLUDE_ELT //3Com网卡 #define INCLUDE_END //END驱动
2.打开Tornado选择新建一个bootable vxworks image,选择建 A BSP,选择 pcPentium,建完后编译就可以在相应的目录下生成vxworks的映像文件。
3.制作bootrom;选择Build Boot Rom,选择pcPentium,再选择bootrom_uncmp, 生成 bootrom_uncmp。拷贝 bootrom_uncmp到host\\x86-win32\\bin下,插入空白 盘到软区,在dos界面进入目录host\\x86-win32\\bin下,用命令"mkboot a: bootrom_uncmp "生成引导盘
4. 在Start > Programs > Tornado2 > FTP Server,点开Security下的 user/rights菜单,新建用户User Name:target,Password:target,Home Directory为VxWorks映像所在目录如 C:\\Tornado\\target\\config\\pcPentium\\。 注意这些配置要和config.h中的一致。
5.将bootrom的启动盘插入目标机的软驱,启动目标机,系统从软驱启动,随后登 陆FTP,从主机下载vxworks文件,目标机提示7秒内按任意键选择Boot方式(手工 ,自动),手工方式可对FTP用户,口令,IP等参数进行修改。 通常是等待7秒后系统autoboot。
屏幕显示:
Attached TCP/IP interface to elt0. Attaching network interface lo0... done. //TCP/IP网络连接成功
Loading... 602128 //通过ftp下载VxWorks映像 Starting at 0x01080000 //下载成功,从RAM_LOW_ADRS 0x01080000 开始执行VxWorks系统
Attached TCP/IP interface to elt unit 0 Attaching interface lo0...done //TCP/IP网络连接成功 (注意这里网络初始化成功和上边的不同,上边是Bootrom映像网络初始化来下载VxWorks,这里VxWorks系统初始化网络。)
VxWorks
Copyright 1984-1998 Wind River Systems, Inc.
CPU: xxxx --- Intel x82 VxWorks: 5.4 BSP version: 1.2/4 Creation date: Jan xx 2001 WDB: Ready.
至此目标机系统启动完成。
6.配置Target Server下载应用程序.
打开Tornado,在Tools菜单下选择Target Sever再选择configure进行配置(Tools > Target Server > Configure > New)给出Target Server名字描述如net00.在 (Target Server Properties > Back End)选择WdbRpc. Target Name/IP Address 框内输入Target的IP: 90.0.0.50. Core File and Symbols选项(Target Server Properties > Core File and Symbols): C:\\Tornado\\target\\config\\pcPentium\\vxWorks等等。 配置的内容根据系统的具体情况定。点击Launch启动Target Sever,随后在主界 面下选择已启动的Target Sever就可以下载 *.o或*.out程序。
|