⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 程序示例-bsp配置文件及生成下载.htm

📁 bsp基本概念
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0047)http://drew.nease.net/mypage/example/config.htm -->
<HTML><HEAD><TITLE>程序示例-BSP配置文件及生成下载</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY background=程序示例-BSP配置文件及生成下载.files/background.gif>
<P>&gt;&gt;<BIG><BIG><A name=returntop></A></BIG><A 
href="http://drew.nease.net/">Drew的主页</A></BIG>----&gt;<BIG><BIG><A 
name=returntop></A></BIG><A 
href="http://drew.nease.net/mypage/sourcecode.htm">程序示例</A></BIG>----&gt;BSP配置文件</P>
<DIV align=center>
<CENTER>
<TABLE borderColor=#88deea height=23 cellSpacing=1 borderColorDark=#88deea 
width=754 bgColor=#ffffff borderColorLight=#88deea 
background=程序示例-BSP配置文件及生成下载.files/bg1.gif border=1>
  <TBODY>
  <TR>
    <TD align=middle width=83 height=1>
      <P align=center><A href="http://drew.nease.net/"><BIG>主页</BIG></A></P></TD>
    <TD align=middle width=83 height=1>
      <P align=center><A href="http://drew.nease.net/mypage/VxWorks.htm"><FONT 
      lang=ZH-CN face=System>VxWorks</FONT></A></P></TD>
    <TD align=middle width=84 height=1>
      <P align=center><A href="http://drew.nease.net/processor/arm.htm"><FONT 
      lang=ZH-CN face=System>ARM</FONT></A></P></TD>
    <TD align=middle width=84 height=1>
      <P align=center><A href="http://drew.nease.net/processor/mpc860.htm"><FONT 
      lang=ZH-CN face=System>PowerPC</FONT></A></P></TD>
    <TD align=middle width=84 height=1>
      <P align=center><A href="http://drew.nease.net/mypage/driver.htm"><FONT 
      lang=ZH-CN face=System>硬件驱动</FONT></A></P></TD>
    <TD align=middle width=84 height=1>
      <P align=center><A href="http://drew.nease.net/mypage/network.htm"><FONT 
      lang=ZH-CN face=System>网络协议</FONT></A></P></TD>
    <TD align=middle width=84 height=1>
      <P align=center><A 
      href="http://drew.nease.net/mypage/sourcecode.htm"><FONT lang=ZH-CN 
      face=System>程序示例</FONT></A></P></TD>
    <TD align=middle width=84 height=1><A href="http://www.embhelp.com/bbs" 
      target=_blank><FONT face=System color=#8000ff>技术论坛</FONT></A></TD>
    <TD align=middle width=84 height=1>
      <P align=center><A href="http://www.embhelp.com/download"><FONT lang=ZH-CN 
      face=System>下载</FONT></A></P></TD></TR></TBODY></TABLE></CENTER></DIV>
<P align=center> </P>
<P align=center><FONT 
color=#0000ff><BIG><BIG><BIG>BSP配置文件及生成下载</BIG></BIG></BIG></FONT></P>
<P><BIG><STRONG>VxWorks BSP主要配置文件 config.h 和 Makefile 注解</STRONG></BIG></P>
<BLOCKQUOTE>
  <P>相关内容可参考 <A href="http://drew.nease.net/mypage/bsp_boot.htm">VxWorks 
  BSP和启动过程</A></P>
  <P><STRONG><BIG><BIG>config.h</BIG></BIG></STRONG></P>
  <P>/*<BR>This file contains the configuration parameters for the CPU 
  evaluation board.<BR>*/<BR><BR>#ifndef INCconfigh<BR>#define 
  INCconfigh<BR><BR>/* BSP version/revision identification, before configAll.h 
  */<BR>#define BSP_VER_1_2 1<BR>#define BSP_VER_1_1 1<BR>#define BSP_VERSION 
  "1.2" /* A Tornado 2.0 BSP */<BR>#define BSP_REV "/3" /* 0 for first revision 
  */<BR><BR>#include "configAll.h"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <STRONG>/* 这个文件定义了VxWorks所有的缺省设置 */</STRONG><BR><BR><BR>/*<BR>* Define ONE of 
  the following to specify the revision of the PPC405GP chip<BR>* you are using. 
  Undefine all others. sysModel() will return<BR>* "Unknown processor" if the 
  correct selection is not made.<BR>*/<BR><BR>/*<BR>* Default boot 
line<BR>*/</P>
  <P>/*</P>
  <P><STRONG>解释: 这一行对配置网络,连通Target Server及下载调试程序非常重要</STRONG></P>
  <P><STRONG>DEFAULT_BOOT_LINE</STRONG> 
  的原意是为没有NVRAM的target设计的,这样用户就不需要在每次系统启动是手工输入这些参数了.</P>
  <P>系统启动网络时xxxEndLoad()会解释这一行并按这一行的定义进行加载.</P>
  <P>Emac(0,0) : 启动设备,可是是软盘,硬盘,PCMCIA卡等 其他的设备名称如:</P>
  <P>fd为软盘,(0,0)表示第一个软驱,3.5寸盘.<BR>dc则表示从DEC 21x4x 
  芯片启动,即系统有NVRAM存在,这种方式现在已不采用.<BR>elpci表示启动设备为3COM EtherLink XL 
  PCI网卡.<BR>fei:Intel 82559 EtherExpress网卡.<BR>ene: NE2000网卡<BR>ELT: 
  3COM以太网卡<BR>EEX: Intel网卡<BR>ata: ATA/IDE 硬盘 ............</P>
  <P>405GP: 主机名 <BR>vXworks 从主机加载的VxWorks文件 <BR>h=172.16.1.159&nbsp;&nbsp; 
  主机的IP地址&nbsp;&nbsp;&nbsp;&nbsp; </P>
  <P>e=172.16.254.52 目标机的IP地址,若网络启动Target Server时,这个IP必须和主机上Target 
  Server配置的Target IP地址一致,且设置Back End选项为wdbrpc<BR>u=xxx&nbsp; 用户名,pw=xxx&nbsp; 
  密码: 若通过网络加载调试时,主机的Ftp服务器和目标机的用户名和密码必须相同 <BR>tn=vxTarget 目标机名称</P>
  <P>*/</P>
  <P><STRONG>#define DEFAULT_BOOT_LINE 
  \<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Emac(0,0)405GP:vxWorks 
  h=172.16.1.159 e=172.16.254.52 
  \<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  u=xxx pw=xxx tn=vxTarget"</STRONG></P>
  <P>/*<BR>* 内存设置.<BR>* 
  如果定义了LOCAL_MEM_AUTOSIZE则SDRAM的大小会在Boot时指定<BR>*/<BR><BR>#undef 
  LOCAL_MEM_AUTOSIZE 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  /* 运行时内存大小 */<BR>#define LOCAL_MEM_SIZE 0x02000000 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 32MB 内存缺省 
  */<BR>#define LOCAL_MEM_LOCAL_ADRS 0x00000000&nbsp;&nbsp;&nbsp;&nbsp; /* 
  内存基地址为 0 */<BR>#define USER_RESERVED_MEM 0 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  /* see sysMemTop() */<BR><BR>/*<BR>* Define SDRAM_ECC_ENABLE to enable ECC if 
  an ECC SDRAM DIMM is detected<BR>* during SDRAM auto-configuration. If not 
  defined, ECC will not be enabled<BR>* if an ECC SDRAM DIMM is detected, and 
  the DIMM will be used as a normal DIMM.<BR>*/<BR><BR>#undef 
  SDRAM_ECC_ENABLE<BR><BR></P>
  <P><STRONG>/* 解释: 这里主要设置系统的内存分配定义,若分配不当,则系统不能正常加载和运行.</STRONG></P>
  <P>ROM_TEXT_ADRS, ROM_SIZE, RAM_HIGH_ADRS, 和RAM_LOW_ADRS 
  在config.h和Makefile文件中都要定义,且必须要保持一致,这些地址的定义一定要<STRONG>参照VxWorks 
  加载执行过程,硬件手册,MMU和VxWorks的大小</STRONG>进行.主要原则是保证VxWorks image 
  在ROM和RAM中都要有一定的运行空间且高效运行,可参见 <A 
  href="http://drew.nease.net/mypage/bsp_boot.htm">VxWorks BSP和启动过程</A>.</P>
  <P>*/<BR>#define ROM_BASE_ADRS 0xfff80000 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  /* ROM的基地址 */<BR>#define ROM_TEXT_ADRS (ROM_BASE_ADRS + 
  0x100)&nbsp;&nbsp;&nbsp; /* 程序指针和堆栈指针 */<BR>#define ROM_WARM_ADRS 
  (ROM_TEXT_ADRS+0x0004)&nbsp;&nbsp;&nbsp;&nbsp; /* 热启动入口地址 */<BR>#define 
  ROM_SIZE 0x0007f000 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  /* ROM大小 512KB */<BR>#define RAM_LOW_ADRS 0x00010000 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  /* RAM 低地址运行 <STRONG>vxWorks</STRONG> */<BR>#define RAM_HIGH_ADRS 0x00C00000 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  /* RAM 高地址存储 <STRONG>bootrom</STRONG> */<BR>#define USER_RESERVED_MEM 0 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  /* 用户保留地址 */<BR></P>
  <P>/*<BR>* Cache options&nbsp;&nbsp;&nbsp; 
  <STRONG>定义缓存</STRONG><BR>*/<BR><BR>#define 
  INCLUDE_CACHE_SUPPORT<BR><BR>#define USER_D_CACHE_ENABLE<BR>#define 
  USER_I_CACHE_ENABLE<BR>#undef USER_D_CACHE_MODE<BR>#define USER_D_CACHE_MODE 
  (CACHE_COPYBACK)<BR><BR><BR>/*<BR>* 405 timers (PIT, FIT, WDT) 
  可由外部时钟驱动或者CPU驱动<BR>*/<BR><BR>#define TIMER_CLOCK_EXTERNAL<BR><BR>/*<BR>* 
  Optional timestamp support<BR>*/<BR><BR>#undef 
  INCLUDE_TIMESTAMP<BR><BR>/*<BR>* Auxilliary Timer rates&nbsp;&nbsp;&nbsp; 
  定义辅助计时器频率<BR>*/<BR><BR>#ifdef TIMER_CLOCK_EXTERNAL<BR>#define AUX_CLK_RATE_MIN 
  (EXT_TIMER_CLK_FREQ / (1 &lt;&lt; 21) )<BR>#define AUX_CLK_RATE_MAX 
  (EXT_TIMER_CLK_FREQ / (1 &lt;&lt; 9) )<BR>#define AUX_CLK_RATE_DEFAULT 
  (EXT_TIMER_CLK_FREQ / (1 &lt;&lt; 17) )<BR>#else<BR><BR>/* ZZZZZZZZZZZ todo 
  put rates in for system clock derived timer clock 
  */<BR><BR>#endif<BR><BR>/*<BR>* Watchdog Timer rates&nbsp;&nbsp;&nbsp; 
  <BR>*/<BR><BR>#define WDT_RATE_MIN 1 /* minimum watchdog timer rate 
  */<BR>#define WDT_RATE_MAX 5000 /* maximum watchdog timer rate 
  */<BR><BR><STRONG>/* 实时时钟设置 */<BR></STRONG><BR>#define 
  INCLUDE_RTC<BR><BR><STRONG>/* 去除不需要的网络驱动 */<BR></STRONG><BR>#undef 
  INCLUDE_EI<BR>#undef INCLUDE_EX<BR>#undef INCLUDE_ENP<BR>#undef 
  INCLUDE_LN<BR>#undef INCLUDE_SM_NET<BR>#undef 
  INCLUDE_SM_SEQ_ADDR<BR><BR><BR>/* #define for software floating point support 
  */<BR><BR>#undef INCLUDE_SW_FP<BR><BR><STRONG>/* 定义串口 Serial port 
  configuration */<BR></STRONG><BR>#define INCLUDE_SERIAL<BR><BR><BR><STRONG>/* 
  PCI 设置,PCI configuration */<BR></STRONG><BR>#define INCLUDE_PCI<BR><BR>#ifdef 
  INCLUDE_PCI<BR>/*<BR>* Three programmable processor local memory address to 
  PCI memory address<BR>* mappings. If a region is enabled, PMMx_LOCAL_ADRS must 
  be between<BR>* PCI_MEMORY_START and PCI_MEMORY_END. If PMMx_PCI_HIGH_ADRS is 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -