📄 c-builder4.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title> Projects </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-builder.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-builder3.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-builder5.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="89245">4.4 Creating a Bootable Application</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89305"> </a>A bootable application is completely initialized and functional after a target has been booted, without requiring interaction with Tornado development tools. </p><dd><p class="Body"><a name="92346"> </a>Once you have created and tested a downloadable application and a customized version of VxWorks with which your application is designed to run, creating a bootable application is straightforward. To do so, you need to add application modules to a VxWorks project, and include application startup calls in the VxWorks system initialization routines. There are various ways to go about this, but if you have already created one or more projects for application code and a project for a custom VxWorks, you could simply: </p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="91420"> </a>Add the application project(s) to the VxWorks workspace (or vice versa).</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="89312"> </a>Edit the VxWorks initialization file <b class="file">usrAppInit.c</b>, adding calls to the application's initialization and startup routines.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="89475"> </a>Use the project facility to help scale VxWorks.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="93080"> </a>Build the bootable application.</li></ul></p></dl><dl class="margin"><dd><p class="Body"><a name="93112"> </a>For information about developing applications with the project facility, see <a href="c-builder2.html#88840"><i class="title">4.2 Creating a Downloadable Application</i></a>. For information about configuring and building VxWorks, see <a href="c-builder3.html#90407"><i class="title">4.3 Creating a Custom VxWorks Image</i></a>. For information about additional build options, see <a href="c-builder5.html#98349"><i class="title">4.5 Working With Build Specifications</i></a>. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="93058">4.4.1 Using Automated Scaling of VxWorks</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="93059"> </a>The auto scale feature of the project facility determines if your code, or your custom version of VxWorks, requires any components that are not included in your VxWorks project, and adds them as required. It also provides information about components that <i class="emphasis">may</i> not be required for your application. To automatically scale VxWorks, select <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Auto Scale</font></b> from the context menu in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">VxWorks</font></b> view of the workspace window to display the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Auto Scale</font></b> dialog box, and click <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">OK</font></b>.</p></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/note.gif"></td><td><hr><div class="CalloutCell"><a name="105716"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>The auto scale feature detects only statically calculable dependencies between the application code and VxWorks. Some components may be needed even if they are not called by your application. This is especially true for servers such as WDB, NFS, and so on. </div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="93139">4.4.2 Adding Application Initialization Routines</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="93087"> </a>When VxWorks boots, it initializes all operating system components (as needed), and then passes control to the user's application for initialization. To add application initialization calls to VxWorks, double-click on <b class="file">userAppInit.c</b> to open the file for editing, and add the call(s) to <b class="routine"><i class="routine">usrAppInit</i></b><b>( )</b>. <a href="c-builder4.html#93094">Figure 4-33</a>, for example, illustrates the addition of a call to <b class="routine"><i class="routine">runItAll</i></b><b>( )</b>, the main routine in the application file <b class="file">helloWorld.c</b>. <div class="frame"><h4 class="EntityTitle"><a name="93094"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 4-33: Adding Application Initialization Calls to VxWorks</font></a></h4><dl class="margin"><div class="CellBody"><a name="93100"> </a><img class="figure" border="0" src="images/c-builder25.gif"></div></dl></div> </p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-builder.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-builder3.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-builder5.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 4.0.11 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -