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

📄 vxw_pt2.html

📁 vxworks及tornado常见问题解答
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"><html><head>   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">   <meta name="GENERATOR" content="VIM on Unix and Win95">   <meta name="Author" content="Johan Borkhuis">   <meta name="description" content="VxWorks / Tornado II information / FAQ">   <meta name="keywords" content="VxWorks,Tornado,FAQ">   <meta name="version" content="$Id: vxw_pt2.html,v 1.30 2002/03/20 14:00:51 borkhuis Exp $">   <title>VxWorks and Tornado II FAQ</title></head><body><center><h1><strong><font size="+4">VxWorks / Tornado II FAQ</font></strong></h1></center><p><hr WIDTH="80%"><h2><a href="#2">2. Changes/additions to be made to BSP's</a></h2><blockquote><h3><a href="#2.1">2.1 Different BSP's</a></h3></blockquote><blockquote><h3><a href="#2.2">2.2 Processor specific issues</a></h3><blockquote><h4><a href="vxw_pt2_ppc.html#2.2.1">2.2.1 Power PC</a></h4></blockquote><blockquote><h4><a href="#2.2.2">2.2.2 I960</a></h4></blockquote><blockquote><h4><a href="#2.2.3">2.2.3 MIPS</a></h4></blockquote><blockquote><h4><a href="#2.2.4">2.2.4 ARM</a></h4></blockquote></blockquote><blockquote><h3><a href="#2.3">2.3 Bootstrap</a></h3></blockquote><blockquote><h3><a href="#2.4">2.4 Adding component to your VxWorks configuration</a></h3></blockquote><blockquote><h3><a href="#2.5">2.5 VME problems</a></h3></blockquote><blockquote><h3><a href="#2.6">2.6 VxWorks environment</a></h3><blockquote><h4><a href="#2.6.1">2.6.1 usrSerial.c</a></h4></blockquote><blockquote><h4><a href="#2.6.2">2.6.2 prj_vxworks.tcl</a></h4></blockquote></blockquote><blockquote><h3><a href="#2.7">2.7 PCI problems</a></h3></blockquote><blockquote><h3><a href="#index">Index</a></h3></blockquote><hr WIDTH="80%"><p><h2><a NAME="2"><center>2. Changes/additions to be made to BSP's</center></a></h2><a NAME="2.1-A"></a>Q: Where can I find documentation on how to build a BSP?<p>A: More information on device drivers is available in the Tornado BSPdevelopers kit(only available for Tornado 1.x). It covers several typesat a high level, such as serial, network, scsi etc. <br>The Vxworks Network programmers guide also does a little coverage of BSDstyle device drivers. <br>The Network Protocol Toolkit Users Guide is also a pretty good source ofinformation about network drivers. It is available online at the wrswebsite.<br>A really good source if information is the souce code that comes withBSPs that you purchase from WRS. I have used their examples inconjunction with the available docs and this forum to create a couple ofdrivers for chips that were unsupported. <br>(From: John Beauford, qjb005@email.mot.com)<p><hr WIDTH="60%"><p><h3><a NAME="2.1"><center>2.1 Different BSP's</center></a></h3>If you have made changes to a BSP please send them to <a href="mailto:borkhuis@agere.com">me (Johan Borkhuis)</a>, so I canadd them to this page.<ul><li><a href="mbx860.html">Motorola MBX860</a></li><li><a href="mcp750.html">Motorola MCP750 board</a></li><li><a href="mv23xx.html">Motorola MV23xx/MVME27xx board</a></li><li><a href="sim-nt.html">Simulator (Sim-NT)</a></li><li><a href="pc-bsp.html">PC-type systems</a></li></ul><hr WIDTH="60%"><p><h3><a NAME="2.2"><center>2.2 Processor specific issues</center></a></h3><p><hr WIDTH="60%"><p><h4><a NAME="2.2.1"><center>2.2.1 Power PC</center></a></h4>See <A HREF="vxw_pt2_ppc.html">vxw_pt2_ppc.html</a>.<p><hr WIDTH="50%"><p><h4><a NAME="2.2.2"><center>2.2.2 I960</center></a></h4><a NAME="2.2.2-A"></a>Q: Is there a compiler option or other method to compile under GNU for i960byte aligned structures (PACKED)?  I have try the -mno-code-align,-mno-strict-align, i960 compiler options. They did not help.<p>A: Fred Roeber wrote the following in the newsgroup:<br>I had similar problems with an i960 device driver. I spent some timegoing through the compiler code and manuals. This<a href="i960struct.html">document</a> is something I put together back thenthat I think might help.<br>(From: Fred Roeber, froeber@bbn.com)<p><hr WIDTH="50%"><p><h4><a NAME="2.2.3"><center>2.2.3 MIPS</center></a></h4><a NAME="2.2.3-A"></a>Q: When I compile I get a lot of "... uses different e_flags ..." messages.What do these messages mean?<p>A: Just received from Windriver support the following noteregarding e_flags and MIPS.<br>(From: Xjasartist@yahoo.com)<hr WIDTH="20%">The message "uses different e_flags ... fields than previous modules ..."can occur for MIPS and PowerPC architectures.  It should not cause anyproblems for MIPS processors most of the time.  If you look in the releasenotes for your MIPS BSP, you may find a comment something like:<blockquote>There are several types of warnings generated by compiler.  These areharmless.<br>During compilation of vxWorks image:<pre>uses different e_flags (0x0) fields than previous modules(0x10000001)</pre></blockquote>For the case of MIPS, what's happening is that each ELF object modulekeeps track of which OMF affecting flags were used orspecified anywhere in the original source file.  Inside the linker,there is a function which copies the appropriate flags from theoriginal object module to the one which is being created.  For MIPS, thefunction is mips_elf_merge_private_bfd_data().  If twodifferent files have different sets of flags, this might be a sign of aproblem, so when the compiler finds this condition it printsthe warning message above.<p>Usually when this error message comes up with MIPS, it is from one oftwo different flags.<p>First is 0x1, which specifies that somewhere in the code a .noreorderdirective was given.  For MIPS, the name of this flag isEF_MIPS_NOREORDER.  There should not be any problems related to thisflag differing between the original object modules and the   final module.<p>Second is 0x10000000, which is E_MIPS_ARCH_2.  What this means is thatsome modules were compiled to use the ARCH 2 functionality.When you are using an ARCH 2 or ARCH 3 processor, this should also notbe a problem.<p>The MIPS specific flags are:<pre>/* Processor specific flags for the ELF header e_flags field.  *//* At least one .noreorder directive appears in the source.  */#define EF_MIPS_NOREORDER       0x00000001/* File contains position independent code.  */#define EF_MIPS_PIC             0x00000002/* Code in file uses the standard calling sequence for calling position independent code.  */#define EF_MIPS_CPIC            0x00000004/* Four bit MIPS architecture field.  */#define EF_MIPS_ARCH            0xf0000000/* -mips1 code.  */#define E_MIPS_ARCH_1           0x00000000/* -mips2 code.  */#define E_MIPS_ARCH_2           0x10000000/* -mips3 code.  */#define E_MIPS_ARCH_3           0x20000000</pre>In case you have the GNU source and want to find out more about thisfrom there, this can be found in the file .../include/elf/mips.hbelow the top level GNU source directory.<p>For PowerPC, the same error message may come up from the functionppc_elf_merge_private_bfd_data().  If this happens then the basiccause of the problem is the same as for MIPS, namely that the ELF outpute_flags are different from the input flags.  However, atthis time our records do not contain indications about the differencesin e_flags which actually occur, or even indicationsthat this condition has ever occurred for PowerPC at all.  Also,  thePPC processor specific flags do not give any indication ofsimilar conditions to the NOREORDER condition mentioned for MIPSabove.  If you find this error message when using PowerPC, pleasecontact Wind River support.<p><hr WIDTH="50%"><p><h4><a NAME="2.2.4"><center>2.2.4 ARM</center></a></h4><a NAME="2.2.4-A"></a>Q: I am getting the following error: "unresolved symbol ___fixunsdfsi". But I never declare and use this symbol.<p>A: ___fixunsdfsi converts double to unsigned int.  For some (unkown) reason both___fixunsdfsi and ___fixunssfsi (single to uint) are absent from the vxworksimage.<br>The following (untested) arm assembler probably does the job!<pre>#define SGN_BIT 0x80000000      /* sign bit */#define MNT_SZ          20      /* mantissa bits in first word */___fixunsdfsi:        movs    r12,r0,asr #MNT_SZ      /* get sign and exponent */        movmi   r12,#0                  /* convert -ve to zero */        /* extract top 32 bits of mantissa */        mov     r0,r0,lsl #31 - MNT_SZ        mov     r1,r1,lsr #MNT_SZ + 1        orr     r0,r0,r1        orr     r0,r0,#SGN_BIT          /* add hidden bit */        sub     r12,r12,#0x400        rsbs    r12,r12,#0x1e           /* unbiassed and negated */        bmi     10$        mov     r0,r0,lsr r12        mov     pc,lr10$:    /* overflow */        mvn     r0,#0        mov     pc,lr</pre>I wrote the above as part of a full set of fp routines in order to getacceptable performance on a strongArm system.  This routine isn't used, sohasn't been built.<br>It is probably several orders of magnitude shorter than the one that getsgenerated from the gnu C FP library sources used for the ARM fp routines.<br>(From: David Laight, dsl@tadpole.co.uk)<p><hr WIDTH="50%"><a NAME="2.2.4-B"></a><p>Q: Information on implementing PCMCIA on StrongARM.<p>A: Implementing the pcmcia on the SA1110/SA1111 is painful to saythe least.  We have that hardware combination with 2 pcmcia sockets.<br>PCIC.C/TCIC.c  are the driver files, you need to write a similar file forthe SA-1111.  This is the hardware specific file.  I found the pcic andtcic to be much more complicated than the SA-1111, so my driver filewas simpler.<br>Once the driver is implemented and working then  you define an pcmciaadapter for the card, which references the functions in your driver.<br>pcmciaLib.c, cisLib.c, pccardLib.c these are the higher level functionsfor the pcmcia, they had to be modified in various places to accomodatethe hardware.  I ended up making a local copy of all the files to workon.<br>Here are some of the issues encountered.  I don't know if you'll havethe same problems or not. BTW, this is just a high level pass at theinformation, the devil is in the details.<ol><li>VXWORKS implementation assumes a PC architecture.  They assume bothpcmcia slots used the same address space.  I had to modify cislib.c (andproblaby another file). So that it would reference the right address spacefor the socket. </li><li>Interrupts.  The SA1111 uses edge interrupts therefore it detects inserts(rising edge) or removals (falling edge or vice versa).  I had to add a pollingrouting to reliably detect the card insert.</li><li>SA1111 bug.  We're using ATA cards.  We found a problem where the Card doesnot handle 8 bit reads at odd addresses.  I had to use a 16 bit read and maskoff the appropriate bit.  This causes a problem because the ATA spec. hasdata that is only valid with an 8-bit odd read.</li></ol><br>This is just the tip of the iceberg but I hope it gets you started.I'm still struggling with getting it to work smoothly and reliable.  Ifound the book "PCMCIA Developer's guide" to be useful.<br>(From: Ann Davis, adavis@lightchip.com)<p><hr WIDTH="60%"><p><h3><a NAME="2.3"><center>2.3 Bootstrap</center></a></h3><a NAME="2.3-A"></a>Q: How do I change the value of the counter during boot?<p>A: Change the value of the define TIMEOUT in bootConfig.c to the rightvalue, recompile the bootstrap and load this bootstrap in your target.<p><hr WIDTH="50%"><a NAME="2.3-B"></a><p>Q: How can I change the boot parameters without a physcial serial to my target to change these at boot time?<p>A: Use the command "bootChange" from the target shell or host shell usingTelnet or Rlogin.<br>(From: Pete Kockritz (petekz@my-deja.com)<p><hr WIDTH="50%"><a NAME="2.3-C"></a><p>Q: I get the message "Error in boot line:". Why is this message generatedand how can I get rid of it?<p>A: The message is generated when bootStringToStruct() doesn't return apointer to EOS. That happens when something in the bootline is notunderstood correctly and the processing terminates before the whole linehas been read. What follows the message should be the bootline stringwith a ^ symbol under the part that was misunderstood... If you aregetting garbage then that is probably the cause of the error ;-)<br>(From: john_94501@my-deja.com)<p><hr WIDTH="50%"><a NAME="2.3-D"></a><p>Q: When I try to boot my PC target using vxload I boot DOS without anyconfig.sys or autoexec.bat. But still I get the error"Not enough memory to load". How can I get more memory available?<p>A: The line<pre>shell=a:\vxworks\vxload.com a:\vxworks\bootrom</pre>in "config.sys" saves free memory because "command.com" will not be loaded.

⌨️ 快捷键说明

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