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

📄 bsp配置文件及生成下载.htm

📁 Drew对于BSP的相关配置的一些经验和总结。压缩文件里包含了3个HTML文件:BSP配置文件及生成下载、VxWorks BSP和启动过程、PCI设备(网卡)初始化代码分析。希望对大家有所帮助。
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><title>程序示例-BSP配置文件及生成下载</title></head><body><p>&gt;&gt;<big><big><a NAME="returntop"></a></big><a href="http://drew.nease.net/">Drew的主页</a></big>----&gt;<big><big><aNAME="returntop"></a></big><a href="http://drew.nease.net/mypage/sourcecode.htm">程序示例</a></big>----&gt;BSP配置文件</p><div align="center"><center><table border="1" cellspacing="1" width="754" background="../../images/bg1.gif"bordercolor="#88DEEA" bordercolorlight="#88DEEA" bordercolordark="#88DEEA" height="23"bgcolor="#FFFFFF">  <tr>    <td height="1" width="75" align="center"><p align="center"><a href="http://drew.nease.net/"><big>主页</big></a></td>    <td height="1" width="75" align="center"><p align="center"><a href="http://drew.nease.net/mypage/VxWorks.htm"><font FACE="System" LANG="ZH-CN">VxWorks</font></a></td>    <td height="1" width="75" align="center"><p align="center"><a href="http://drew.nease.net/processor/arm.htm"><font FACE="System" LANG="ZH-CN">ARM</font></a></td>    <td height="1" width="75" align="center"><p align="center"><a href="http://drew.nease.net/processor/mpc860.htm"><font FACE="System" LANG="ZH-CN">PowerPC</font></a></td>    <td height="1" width="75" align="center"><p align="center"><a href="http://drew.nease.net/mypage/driver.htm"><font FACE="System" LANG="ZH-CN">硬件驱动</font></a></td>    <td height="1" width="75" align="center"><p align="center"><a href="http://drew.nease.net/mypage/network.htm"><font FACE="System" LANG="ZH-CN">网络协议</font></a></td>    <td height="1" width="75" align="center"><p align="center"><a href="http://drew.nease.net/mypage/sourcecode.htm"><font FACE="System" LANG="ZH-CN">程序示例</font></a></td>    <td height="1" width="75" align="center"><a href="http://www.embhelp.com/bbs" target="_blank"><font face="System"    color="#8000FF">技术论坛</font></a></td>    <td height="1" width="75" align="center"><p align="center"><a href="http://www.embhelp.com/download"><font FACE="System" LANG="ZH-CN">下载</font></a></td>    <td height="1" width="75" align="center"><a href="../interest.htm"><font face="System" lang="ZH-CN">个人兴趣</font></a></td>  </tr></table></center></div><p align="center"> </p><p align="center"><font color="#0000FF"><big><big><big>BSP配置文件及生成下载</big></big></big></font></p><p><strong><big>VxWorks BSP主要配置文件 config.h , Makefile 注解和 BSP生成下载实例。</big></strong></p>            <blockquote>      <p>相关内容可参考 <a href="http://drew.nease.net/mypage/bsp_boot.htm">VxWorks BSP和启动过程</a></p>             <p> </p>           <p><a href="#config">Config.h文件注解</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <a href="#makefile">Makefile 文件注解</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="#download">BSP生成下载过程实例</a></p>       <p> </p>      <p style="line-height: 150%"><strong><big><big><a name="config"></a>config.h</big></big></strong></p>      <p style="line-height: 150%">/*<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 &quot;1.2&quot; /* A Tornado 2.0 BSP */<br>          #define BSP_REV &quot;/3&quot; /* 0 for first revision */<br>          <br>   #include &quot;configAll.h&quot;&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>          * &quot;Unknown processor&quot; if the correct selection is not made.<br>          */<br>   <br>   /*<br>   * Default boot line<br>          */</p>      <p style="line-height: 150%">/*</p>      <p style="line-height: 150%"><strong>解释: 这一行对配置网络,连通Target Server及下载调试程序非常重要</strong></p>             <p style="line-height: 150%"><strong>DEFAULT_BOOT_LINE</strong> 的原意是为没有NVRAM的target设计的,这样用户就不需要在每次系统启动是手工输入这些参数了.</p>             <p style="line-height: 150%">系统启动网络时xxxEndLoad()会解释这一行并按这一行的定义进行加载.</p>      <p style="line-height: 150%">Emac(0,0) : 启动设备,可是是软盘,硬盘,PCMCIA卡等 其他的设备名称如:</p>        <p style="line-height: 150%">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 style="line-height: 150%">405GP: 主机名 <br>     vXworks 从主机加载的VxWorks文件 <br>     h=172.16.1.159&nbsp;&nbsp; 主机的IP地址&nbsp;&nbsp;&nbsp;&nbsp; </p>        <p style="line-height: 150%">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 style="line-height: 150%">*/</p>      <p style="line-height: 150%"><strong>#define DEFAULT_BOOT_LINE \<br>     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;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&quot;</strong></p>        <p style="line-height: 150%">/*<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 style="line-height: 150%"><strong>/* 解释: 这里主要设置系统的内存分配定义,若分配不当,则系统不能正常加载和运行.</strong></p>        <p style="line-height: 150%">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 style="line-height: 150%">*/<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 style="line-height: 150%">/*<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 non-zero in<br>     * an enabled region, 64 bit dual cycle addresses will be generated on the<br>     * PCI bus for this region.<br>     */</p>      <p style="line-height: 150%"><strong>//定义PCI设备的初始化地址 参见 </strong><a href="http://drew.nease.net/mypage/example/pci.htm">PCI设备(网卡)初始化代码分析</a></p>      <p style="line-height: 150%"><br>  # define PMM0_LOCAL_ADRS PCI_MEMORY_START&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>// 定义PCI空间起始地址</strong><br>    # define PMM0_PCI_LOW_ADRS 0x80000000     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>// 定义PCI空间低位地址</strong><br>    # define PMM0_PCI_HIGH_ADRS 0x00000000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>//     定义PCI空间高位地址</strong><br>  # define PMM0_PCI_MASK_ATTRIB (PMM_MASK_512MB | PMM_ENABLE)<br>    <br>  # define PMM1_LOCAL_ADRS PMM_UNUSED<br>    # define PMM1_PCI_LOW_ADRS PMM_UNUSED<br>    # define PMM1_PCI_HIGH_ADRS PMM_UNUSED<br>    # define PMM1_PCI_MASK_ATTRIB PMM_UNUSED<br>    <br>  # define PMM2_LOCAL_ADRS PMM_UNUSED<br>    

⌨️ 快捷键说明

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