📄 cmpscriptlib.html
字号:
<html><head><!-- /vobs/wpwr/docs/tornado-api/project/cmpScriptLib.html - generated by refgen from /vobs/wpwr/host/resource/tcl/app-config/Project/cmpScriptLib.tcl --> <title> cmpScriptLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>Tornado API Reference : Project Scripting Library</i></a></p></blockquote><h1>cmpScriptLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpScriptLib</strong> - TCL scripting commands for project manipulation</p></blockquote><h4>TCL PROCEDURES</h4><blockquote><p><p><b><a href="./cmpScriptLib.html#cmpProjOpen">cmpProjOpen</a></b> - open a project<br><b><a href="./cmpScriptLib.html#cmpProjClose">cmpProjClose</a></b> - close the currently open project<br><b><a href="./cmpScriptLib.html#cmpProjCreate">cmpProjCreate</a></b> - create a project and open it<br><b><a href="./cmpScriptLib.html#cmpProjCopy">cmpProjCopy</a></b> - create a copy of an existing project and open it<br><b><a href="./cmpScriptLib.html#cmpProjDelete">cmpProjDelete</a></b> - delete the currently open project<br><b><a href="./cmpScriptLib.html#cmpProjHandleGet">cmpProjHandleGet</a></b> - get the handle to the currently open project<br><b><a href="./cmpScriptLib.html#cmpBuild">cmpBuild</a></b> - build the project<br><b><a href="./cmpScriptLib.html#cmpBuildRuleSet">cmpBuildRuleSet</a></b> - set the build rule for the project<br><b><a href="./cmpScriptLib.html#cmpBuildSpecSet">cmpBuildSpecSet</a></b> - set the active buildSpec<br><b><a href="./cmpScriptLib.html#cmpBuildSpecCreate">cmpBuildSpecCreate</a></b> - create a new buildSpec<br><b><a href="./cmpScriptLib.html#cmpBuildMacroSet">cmpBuildMacroSet</a></b> - set a build macro<br><b><a href="./cmpScriptLib.html#cmpBuildMacroGet">cmpBuildMacroGet</a></b> - get a build macro<br><b><a href="./cmpScriptLib.html#cmpBuildFlagsAdd">cmpBuildFlagsAdd</a></b> - add flags to the build<br><b><a href="./cmpScriptLib.html#cmpAdd">cmpAdd</a></b> - add components to vxWorks<br><b><a href="./cmpScriptLib.html#cmpRemove">cmpRemove</a></b> - remove components from vxWorks<br><b><a href="./cmpScriptLib.html#cmpListGet">cmpListGet</a></b> - get a list of components in vxWorks<br><b><a href="./cmpScriptLib.html#cmpParamSet">cmpParamSet</a></b> - set a parameter in the current project<br><b><a href="./cmpScriptLib.html#cmpParamGet">cmpParamGet</a></b> - get a parameter<br><b><a href="./cmpScriptLib.html#cmpFileListGet">cmpFileListGet</a></b> - get a list of files in the project<br><b><a href="./cmpScriptLib.html#cmpFileAdd">cmpFileAdd</a></b> - add a file to the project<br><b><a href="./cmpScriptLib.html#cmpFileRemove">cmpFileRemove</a></b> - remove a file from the project<br><b><a href="./cmpScriptLib.html#cmpLoad">cmpLoad</a></b> - dynamically load components<br><b><a href="./cmpScriptLib.html#autoscale">autoscale</a></b> - automatically scale vxWorks<br><b><a href="./cmpScriptLib.html#cmpUnavailListGet">cmpUnavailListGet</a></b> - list unavailable components<br><b><a href="./cmpScriptLib.html#cmpValidate">cmpValidate</a></b> - validate the component configuration<br><b><a href="./cmpScriptLib.html#cmpTest">cmpTest</a></b> - test the component descriptor files for errors<br><b><a href="./cmpScriptLib.html#cmpInfo">cmpInfo</a></b> - get info about a set of components<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Tornado comes with a project facility that allows one to graphicallyorganize source files into projects, change the build rules, andconfigure the operating system. See the Tornado Users Guide fordetails on what facilities the project facility offers.This library provides a way to perform these tasks in a script.To use this library, one must first source this library fromwtxtcl. As an example, suppose you wanted to do a clean build ofyour project every night. One could write a script as follows:<p><b>example.tcl</b>:<pre>source [wtxPath host resource app-config Project cmpScriptLib.tcl]cmpProjOpen myProjectFile.wpjcmpBuild cleancmpBuild</pre>One can execute the script from a UNIX or Windows command shell bytyping "wtxtcl <b>example.tcl</b>."Alternatively, one can type the scripting commands directly into thewtxtcl shell.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b>, <b><a href="./dataDocLib.html#top">dataDocLib</a></b><hr><a name="cmpProjOpen"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpProjOpen</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpProjOpen</strong> - open a project</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine opens a project file and sets it as the active projectfor all subsequent scripting commands. This first closesany project that was previously opened.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b>prjFile</b> </td><td align=left> - </td><td align=left> project file to open </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpProjClose"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpProjClose</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpProjClose</strong> - close the currently open project</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Close and save the currently open project.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpProjCreate"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpProjCreate</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpProjCreate</strong> - create a project and open it</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates a project and opens it. If the project alreadyexists, it just opens it.The last argument to this routine is <i>prjType</i>, which can be eithervxWorks (a system image project), or vxApp (a downloadable application).The default is vxWorks.The project file to be created must live in a directory which does notalready exists, and by convension should end in a .wpj extension.<p>For vxWorks projects, arg should be the name of a BSP directory intarget/config (e.g., pc386)If no project file name is specified, a default project name of$(<b>WIND_BASE</b>)/target/proj/<i>bsp</i>_vx/<i>bsp</i>_vx.wpj is used, where <i>bsp</i>is the name of the BSP directory.<p>For vxApp projects, arg should be the name of a toolchain, in theform ::tc_<i>CPUTOOL</i> (e.g., ::tc_PPC604gnu).<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b>arg</b> </td><td align=left> - </td><td align=left> prjType-specific argument</tr><tr valign=top><td align=left><b>prjFile</b> </td><td align=left> - </td><td align=left> name of the project file to be created</tr><tr valign=top><td align=left><b>prjType</b> </td><td align=left> - </td><td align=left> type of project (vxWorks or vxApp) </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpProjCopy"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpProjCopy</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpProjCopy</strong> - create a copy of an existing project and open it</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Make a copy of an existing project, and open the copy. This is usefulif you want to make configuration changes but not disturb theoriginal project.The project file being created has the same restrictions as describedin cmpProjCreate.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b>newPrjFile</b> </td><td align=left> - </td><td align=left> project file to create</tr><tr valign=top><td align=left><b>oldPrjFile</b> </td><td align=left> - </td><td align=left> existing project file </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b>, cmpProjCreate<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<hr><a name="cmpProjDelete"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpProjDelete</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpProjDelete</strong> - delete the currently open project</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Delete the currently open project.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpProjHandleGet"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpProjHandleGet</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpProjHandleGet</strong> - get the handle to the currently open project</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the "project handle" to the currently openproject. Since this library supports only one open projectat a time, one does not need to use this routine in order touse this library.However this library is built on top of lower-level libraries thatmust be passed a project handle. These libraries are currentlynot documented<p></blockquote><h4>RETURNS</h4><blockquote><p>a project handle</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpBuild"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpBuild</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpBuild</strong> - build the project</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine builds the project using the currently active buildSpec.The build output goes to stdout and stderr.If no rule is specified, it builds the default rule for thecurrently active buildSpec.The "clean" rule removes all binaries.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b>rule</b> </td><td align=left> - </td><td align=left> (optional) build rule to invoke </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpBuildRuleSet"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpBuildRuleSet</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpBuildRuleSet</strong> - set the build rule for the project</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the default build rule for the active buildSpecwithin the currently open project. Available build rules dependon the project type. For example, vxWorks projects support clean,vxWorks, vxWorks_rom, vxWorks_romResident, and vxWorks_romCompress.vxApp projects support linkedObjs, archive, and objects.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b>rule</b> </td><td align=left> - </td><td align=left> build rule to set </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpBuildSpecSet"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpBuildSpecSet</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpBuildSpecSet</strong> - set the active buildSpec</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>A project can contain one or more buildSpecs. This routineis used to set the active buildSpec.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b><a href="../guitcl-unix/build.html#top" >build</a></b> </td><td align=left> - </td><td align=left> name of the buildSpec to set as active </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpBuildSpecCreate"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpBuildSpecCreate</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpBuildSpecCreate</strong> - create a new buildSpec</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Create a new buildSpec for the project, and set it asthe active buildSpec.One can create a buildSpec by copying an existing buildSpec,or create a new one for a different toolchain. If <i>arg</i>is of the form ::tc_<i>CPUTOOL</i> (e.g., ::tc_PPC604gnu), thena build is created for that toolchain. Otherwise <i>arg</i> isinterpreted to be the name of an existing build.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b><a href="../guitcl-unix/build.html#top" >build</a></b> </td><td align=left> - </td><td align=left> name of the buildSpec to create</tr><tr valign=top><td align=left><b>arg</b> </td><td align=left> - </td><td align=left> name of a toolchain or existing build </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpBuildMacroSet"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpBuildMacroSet</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpBuildMacroSet</strong> - set a build macro</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Set the value of a build macro for the active buildSpec.Build macros include <b>RAM_LOW_ADRS</b>, CFLAGS, etc.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b>macro</b> </td><td align=left> - </td><td align=left> name of the build macro to set</tr><tr valign=top><td align=left><b>value</b> </td><td align=left> - </td><td align=left> value to assign the macro </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./cmpScriptLib.html#top">cmpScriptLib</a></b><hr><a name="cmpBuildMacroGet"></a><p align=right><a href="rtnIndex.html"><i>Project Scripting Library : Tcl Procedures</i></a></p></blockquote><h1>cmpBuildMacroGet</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>cmpBuildMacroGet</strong> - get a build macro</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Get the value of a build macro for the active buildSpec.Build macros include <b>RAM_LOW_ADRS</b>, CFLAGS, etc.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b>macro</b> </td><td align=left> - </td><td align=left> name of the build macro to set</tr><tr valign=top><td align=left><b>value</b> </td><td align=left> - </td><td align=left> value to assign the macro </tr><tr valign=top><td align=left></tr></tr></table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -