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

📄 vxw_pt1.html

📁 vxworks及tornado常见问题解答
💻 HTML
📖 第 1 页 / 共 5 页
字号:
from <code>#include &lt;xxx.h&gt;</code> to <code>#include "xxx.h"</code> may be a good idea.<br>Problem with source search path for included files may be related to double quotes vs. pointed brackets.<br>This should work as follows: source file that includes header file which happens to be in multiple locations, if included with quotes, should look in same directory as the main source file, then start using -I included paths.</li><li>Specify VPATH for as described in the next document,<a href="dependencies.txt">How to generate external dependencies in Tornado 2.0.</a>VPATH is for all file dependencies, -i is for header files only.</li></ul>(From: DrDiags, drdiags@covad.net)<p><hr WIDTH="60%"><p><h3><a NAME="1.8"><center>1.8 Target Server</center></a></h3><a NAME="1.8-A"></a>Q: How do I start a target server outside of Tornado?<p>A: First create a shortcut that starts a DOS box. Then, inTornado, configure your target server so it starts upnicely. Select and copy the text down at the bottom ofthe target server configuration dialog. Then, back in thedos box "properties", paste the target server command.Drag the shortcut into your startup folder and you'redone.<br>(From: John Finley, john@kivala.com)<p><hr WIDTH="50%"><a NAME="1.8-B"></a><p>Q: Normally my code takes a couple of seconds to load. But now I addeda small application and it takes ages before my application is loaded. Howcan I speed-up the download again?<p>A: Increase the Memory Cache Size in your target server configuration.The default size is 1 Mbyte. Increasing this will reduce the loading timeto normal values again.<br>(From: Wade Oram, oram_w_t@ifrinternational.co.uk)<p><hr WIDTH="50%"><a NAME="1.8-C"></a><p>Q: When I start the Targetserver I get an WTX error. It also sayssynchronisation stopped. How can I fix this?<p>A: One solution to this problem is to use the remote registry, even if youare using a target server on your local machine. This can be done by setting the remote registry and using the real IP address of the host as the IP addressfor the remote registry.<p>Basically, "localhost" gets stored in the Windows registry for the nameof the machine running the Tornado registry.  The WTX tools on the hostresolve localhost to the ip address 127.0.0.1 and pass this down to thetarget.  The target then tries to communicate with 127.0.0.1 to enablethe symbol table synchronization but ends up talking to itself andnot the Windows host.  Neat "feature".<p>If your Windows machines has multiple ethernet interfaces and the targetis located on a non-primary interface, this still won't be enough. The machinename will get resolved to an ip address that the target doesn't know about.You will need to execute a routeNetAdd on the target before connectingthe target server in order to get symbol table synchronizationto work.<br>(From: Markus Mitterer, markus.mitterer@sbu1.storkgroup.com andlori@rti.com)<p><hr WIDTH="50%"><a NAME="1.8-D"></a><p>Q: When I enter a command in the shell I get the message "<code>The target system is not initialized yet. Can't proceed.</code>"<p>A: The "target not initialized message" in the host shell goes away whenyou specify the "vxWorks" file (an intermediate file in building of the romimage) as the core file under the "Core Files" drop-down options in thetarget server configuration. I had been specifying the "vxWorks_rom" file.I also have "synchronize host/target symbol table" selected in the targetserver configuration and in the vxWorks image options and that works finenow.<br>(From: Luciana Messina, lucianam@ricochet.net)<p><hr WIDTH="60%"><p><h3><a NAME="1.9"><center>1.9 Target Shell</center></a></h3><a NAME="1.9-A"></a>Q: When I exclude the shell from my project I get an error executingdosFsDevInit. How can I include DOS FS without the shell?<p>A: This looked mightly wierd at first, but a few thoughts later I hadremembered that old dosFsLib (as opposed to DosFs 2.0) uses a in-RAMdatabase of file names, using the hasLib(1) hash table. Hence if youexclude any kind of symbl tables, it may just occur that hashLib getsincluded in the link, but does get initialized. <p>One probable reason noone has come accross this is because it is verycommon to have INCLUDE_STAT_SYM_TBL turned on and that is a kind of asymbol table too. So you should either have the above, or simply add acall to hashLibInit() someplace before dosFsInit.<br>(From: Leonid Rosenboim, leonid@bitband.com)<p><hr WIDTH="50%"><a NAME="1.9-B"></a><p>Q: On startup WindShell is supposed to start the file windsh.tcl. I createdthis file in the directory .wind, but it is not executed. What am I doingwrong?<p>A: Nothing. There seems to be a bug in WindShell, so it is not looking inthe directory in main Tornado directory, but on the C-disk. So if you moveyour windsh.tcl file to the directory C:\.wind this file will be executed.<p><hr WIDTH="50%"><a NAME="1.9-C"></a><p>Q: When I execute <code>ping "myHost"</code> there seems to be memory lostin the target shell. Why is the shell losing memory?<p>A: The shell has to allocate memory in the target for the text string(remember it has to pass the address of the string to the function). The shellcan not determine when/if it is safe to free this allocated memory, so it isbetter to leave it. It can not reuse the string next time either,because the string might have changed, so it will allocate some morememory next time you call ping. You could try to use a variable:<pre>pingaddress = "myHost"memShowping pingaddressmemShow</pre>(From: Urban Lindberg, urbanl@my-deja.com)<p><hr WIDTH="50%"><a NAME="1.9-D"></a><p>Q: How can I repeat a command with an increasing parameter?<p>A: You can write an extended repeat command and use that.The source for repeat lives in <em>/target/src/usr/usrLib.c</em><br>Should be quite an easy task...<br>(From: Werner Schiendl,ws-news@gmx.at)<p><hr WIDTH="50%"><a NAME="1.9-E"></a><p>Q: How can I list all known 2 letter symbols using lkup?<p>A: If you want to list all the two letter symbols known to `lkup`, you canindeed enter:<pre>lkup "^[a-z][a-z]$"</pre>Notice the trailing "$" - that is key.  Here this command shows me onlythe symbol "fd" ... unless I go create more two letter symbols.  Trying:<pre>lkup "^[a-z][a-z][a-z]$"</pre>shows me all of div, tan, pow, cin, end, exp, sin, cos, log, abs.<br>(From: p_lavarre@my-deja.com)<p><hr WIDTH="50%"><a NAME="1.9-F"></a><p>Q: How do I increase the maximim linelength of the target shell from 128characters?<p>A: I'm not sure what you need to do exactly but I've had a similarproblem.  I put some of the longer paths into a string and then passedthe string as the variable on the command line.  This allowed us to getby the 128 character limit.  Also consider setting environmentvariables.  The first is easier.<br>(From: Don Small, dmsmall@sandia.gov)<p><hr WIDTH="50%"><a NAME="1.9-G"></a><p>Q: How can I get my application to read data on the port the shell is using?<p>A: Finally I found a way to scan user input without theinterference of shell :) ... the only way that worked for me is todelete shell task just before reading input and respawn shell afterreading ... it works ...<pre>/*******************************************************/        shelltid = taskNameToId("tShell");        taskDelete(shelltid);        for( ; ; )        {                // read        }        shellInit(0,TRUE);/*******************************************************/</pre>(From: Mridul Gupta, mridulgupta1@yahoo.com)<p><hr WIDTH="50%"><a NAME="1.9-H"></a><p>Q: When I execute a command from the shell with a string in it, I experiencea memory leak. Why does this happen?<p>A: When  you use literal strings from the shell (such as filenames that can be passed toopen()), the shell allocates some memory to store the string in.<br>Such it doesn't know when you've finished with the string, it cannotfree the memory. To prove this to yourself, try allocating the stringto a variable before the initial memShow() call:<pre>-&gt; filename="myFileName"-&gt; memShow-&gt; open filename, 2</pre>(From: john_94501@yahoo.com)<p><hr WIDTH="50%"><a NAME="1.9-I"></a><p>Q: Are there any alternatives for the target shell?<p>A: One alternative can be found at <a href="http://www.xmission.com/~bgeer/bgsh.html">http://www.xmission.com/~bgeer/bgsh.html</a>:BGSH: A VxWorks Shell With Command Line Editing.<br>(From: Pekka Taipale, pjt@iki.fi)<p><hr WIDTH="60%"><p><h3><a NAME="1.10"><center>1.10 Telnet</center></a></h3>Telnet related questions have been moved to<a href="vxw_pt4.html#4.7">part 4.7</a>.<p><hr WIDTH="60%"><p><h3><a NAME="1.11"><center>1.11 Tornado</center></a></h3><p><h4><a NAME="1.11.1"><center>1.11.1 Tornado (General)</center></a></h4><a NAME="1.11.1-A"></a>Q: How do I redirect the virtual console output to a file?<p>A: The follwing has been written in the newsgroup by Dave Gurak<a href="mailto:dmgd@eci-esyst.com">dmgd@eci-esyst.com</a>:<blockquote>I have successfully redirected IO to the virtual consoleusing ioGlobalStdSet.<br>However, since my NT console window which containsthe tgtsvr has no method of redirecting this info to a file,(ala Unix xterm) ...<br>Once I realized that the windsh is a tcl interpretter and /vio/1 is echoedto the windsh, I found a solution.<br>All I did was override the windsh's definition ofVIO_WRITE_Handler {event} to write to a file by changing"memBlockWriteFile $mblk -" to "memBlockWriteFile -append $mblk log.txt".<br>Included is my <a href="windsh.tcl">windsh.tcl</a> file. Hope it's useful.</blockquote>See also the remark <a href="#1.9-B">here</a>.<p><hr WIDTH="50%"><a NAME="1.11.1-B"></a><p>Q: How do I redirect standard I/O to another device?<p>A: Aaron Kunze made the code in this file (<a href="stdio_rd.c">stdio_rd.c</a>)available in the newsgroup. This file contains a number of examples on howto redirect I/O to a device. Other device can be included.<p><hr WIDTH="50%"><a NAME="1.11.1-C"></a><p>Q: How can I repeat a command from the host shell with increasing parameters?<p>A: You can use the built in Tcl interpreter for looping.  From theshell, enter ? to get into Tcl mode.<br>To execute the command dumpBlock with an increasing parameter use thefollowing commands:<pre>-&gt; ?tcl&gt; for {set x 0} {$x<100} {incr x} {tcl>   shParse "dumpBlock $x"tcl&gt; }tcl&gt; ?-&gt; ...</pre>The "?" toggles between Tcl and C mode.<br>(From: Markku Kotiaho kotiaho@m_a_i_l.com)See also question <A HREF="#1.9-D">1.9-D</A>.<p><hr WIDTH="60%"><p><h4><a NAME="1.11.2"><center>1.11.2 Tornado (Windows)</center></a></h4><a NAME="1.11.2-A"></a>Q: The TSR tool crashes when I try to report a TSR and attach a file.<p>A: There is a problem in the MAPI implementation of the attachment functionin the Support Request tool. If possible use the SMTP interface to send TSR's.<p><hr WIDTH="50%"><a NAME="1.11.2-B"></a><p>Q: One of the windows of the debugger has disapeared. When I press the button in the toolbar or select the window using the Debug menu nothinghappens.<p>A: The window is probably off-screen. The way to get it back on-screen isby using a program to give a 'Move Window' command to the window. A crudeway to do that is the following program (this is an example I used to get thevariable window back on screen again):<pre>/* (C) Johan Borkhuis, 1999 */#include &lt;wtypes.h&gt;#include &lt;winuser.h&gt;voidmain(void){    MoveWindow((HWND)0x194, 10,10, 94, 88, TRUE);}</pre>The parameters to MoveWindow are:<ul><li>Window Handle: Fill in the right window handle. This can be obtained by(for example) Spy++, which is shipped with Microsoft Visual C++.</li><li>X and Y coordinate where the window has to be moved to.</li><li>X and Y size of the window. These should be the same as the size of theoriginal window. These parameters can also be obtained from Spy++.</li><li>Boolean indicating that the window should be redrawn.</li></ul><p><hr WIDTH="50%"><a NAME="1.11.2-C"></a><p>Q: When I am building the build process hangs somewhere during the build(for example on a the command vxrm.

⌨️ 快捷键说明

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