cbuild.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <title>cbuild.sh: Build Invocation</title>
  7. <title>CMSIS-Build: cbuild.sh: Build Invocation</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <link href="cmsis.css" rel="stylesheet" type="text/css" />
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <script type="text/javascript" src="printComponentTabs.js"></script>
  13. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  14. <script type="text/javascript" src="resize.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(initResizable);
  18. $(window).load(resizeHeight);
  19. </script>
  20. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  21. <script type="text/javascript" src="search/search.js"></script>
  22. <script type="text/javascript">
  23. $(document).ready(function() { searchBox.OnSelectItem(0); });
  24. </script>
  25. </head>
  26. <body>
  27. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  28. <div id="titlearea">
  29. <table cellspacing="0" cellpadding="0">
  30. <tbody>
  31. <tr style="height: 46px;">
  32. <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  33. <td style="padding-left: 0.5em;">
  34. <div id="projectname">CMSIS-Build
  35. &#160;<span id="projectnumber">Version 0.9.0 (beta)</span>
  36. </div>
  37. <div id="projectbrief">Tools, software frameworks, and work flows for productivity with CMSIS based projects</div>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. <!-- end header part -->
  44. <div id="CMSISnav" class="tabs1">
  45. <ul class="tablist">
  46. <script type="text/javascript">
  47. <!--
  48. writeComponentTabs.call(this);
  49. //-->
  50. </script>
  51. </ul>
  52. </div>
  53. <!-- Generated by Doxygen 1.8.6 -->
  54. <script type="text/javascript">
  55. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  56. </script>
  57. <div id="navrow1" class="tabs">
  58. <ul class="tablist">
  59. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  60. <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
  61. <li>
  62. <div id="MSearchBox" class="MSearchBoxInactive">
  63. <span class="left">
  64. <img id="MSearchSelect" src="search/mag_sel.png"
  65. onmouseover="return searchBox.OnSearchSelectShow()"
  66. onmouseout="return searchBox.OnSearchSelectHide()"
  67. alt=""/>
  68. <input type="text" id="MSearchField" value="Search" accesskey="S"
  69. onfocus="searchBox.OnSearchFieldFocus(true)"
  70. onblur="searchBox.OnSearchFieldFocus(false)"
  71. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  72. </span><span class="right">
  73. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  74. </span>
  75. </div>
  76. </li>
  77. </ul>
  78. </div>
  79. </div><!-- top -->
  80. <div id="side-nav" class="ui-resizable side-nav-resizable">
  81. <div id="nav-tree">
  82. <div id="nav-tree-contents">
  83. <div id="nav-sync" class="sync"></div>
  84. </div>
  85. </div>
  86. <div id="splitbar" style="-moz-user-select:none;"
  87. class="ui-resizable-handle">
  88. </div>
  89. </div>
  90. <script type="text/javascript">
  91. $(document).ready(function(){initNavTree('cbuild.html','');});
  92. </script>
  93. <div id="doc-content">
  94. <!-- window showing the filter options -->
  95. <div id="MSearchSelectWindow"
  96. onmouseover="return searchBox.OnSearchSelectShow()"
  97. onmouseout="return searchBox.OnSearchSelectHide()"
  98. onkeydown="return searchBox.OnSearchSelectKey(event)">
  99. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  100. <!-- iframe showing the search results (closed by default) -->
  101. <div id="MSearchResultsWindow">
  102. <iframe src="javascript:void(0)" frameborder="0"
  103. name="MSearchResults" id="MSearchResults">
  104. </iframe>
  105. </div>
  106. <div class="header">
  107. <div class="headertitle">
  108. <div class="title">cbuild.sh: Build Invocation </div> </div>
  109. </div><!--header-->
  110. <div class="contents">
  111. <div class="textblock"><p>The <a class="el" href="cbuild.html">cbuild.sh</a> script starts the build process. It is called from the <b>Bash</b> command line with the following syntax:</p>
  112. <div class="fragment"><div class="line">$ cbuild.sh &lt;ProjectFile&gt;.cprj [--toolchain=&lt;Toolchain&gt; --output=&lt;OutputPath&gt; &lt;MakefileTarget&gt;]</div>
  113. </div><!-- fragment --><p><b>Where:</b> </p>
  114. <p><code>cbuild.sh</code> is the name of the script.</p>
  115. <p>&lt;<code>ProjectFile&gt;</code> specifies the project file in CMSIS project format.</p>
  116. <p>Optional:</p>
  117. <p>&lt;<code>Toolchain&gt;</code> specifies the selected toolchain for projects that support multiple compilers.</p>
  118. <p>&lt;<code>OutputPath&gt;</code> specifies the output directory.</p>
  119. <p>&lt;<code>MakefileTarget&gt;</code> specifies the &lt;<code>target&gt;</code> option for <a class="el" href="Make.html">make</a>.</p>
  120. <p>The <a class="el" href="cbuild.html">cbuild.sh: Build Invocation</a> script implements the build flow by chaining the utilities <a class="el" href="cbuildgen.html">cbuildgen</a>, <a class="el" href="ccmerge.html">ccmerge</a>, and <b>Make</b>. It replicates the build steps of CMSIS-Pack aware IDEs and also updates configuration files if necessary. The script can be adopted to project specific requirements.</p>
  121. <p>The build flow of the <a class="el" href="cbuild.html">cbuild.sh: Build Invocation</a> script is:</p>
  122. <ol type="1">
  123. <li>Call <a class="el" href="cbuildgen.html">cbuildgen: Build Process Manager</a> with command <b>packlist</b> to list the URLs of missing software packs.</li>
  124. <li>Call <a class="el" href="cp_install.html">cp_install.sh: Install Packs</a> to download and install missing software packs.</li>
  125. <li>Call <a class="el" href="cbuildgen.html">cbuildgen: Build Process Manager</a> with command <b>make</b> to generate Make files.</li>
  126. <li>Call <a class="el" href="Make.html">make: GNU Make</a> to update configuration files using <a class="el" href="ccmerge.html">ccmerge: Config File Updater</a>.</li>
  127. <li>Call <a class="el" href="Make.html">make: GNU Make</a> to compile the project source code into the binary image.</li>
  128. </ol>
  129. <h1><a class="anchor" id="cbuild_example"></a>
  130. Usage Example</h1>
  131. <pre class="fragment">$ cbuild.sh Simulation.cprj
  132. (cbuild.sh): Build Invocation 0.9.0 (C) 2020 ARM
  133. Simulation.cprj validates
  134. (cbuildgen): Build Process Manager 0.9.0 (C) 2020 ARM
  135. M650: Config command completed successfully.
  136. (cbuildgen): Build Process Manager 0.9.0 (C) 2020 ARM
  137. M651: Generated makefile for merging config files: 'Simulation_cfg.mak'
  138. M652: Generated makefile for project build:'Simulation.mak'
  139. mkdir -p "/c/Examples/Blinky/Objects/RTE/CMSIS/RTOS2/Keil RTX5/Library"
  140. mkdir -p "/c/Examples/Blinky/Objects/RTE/Compiler/IO/STDOUT/ITM"
  141. mkdir -p "/c/Examples/Blinky/Objects/RTE/Device/Startup/C Startup"
  142. mkdir -p "/c/Examples/Blinky/Objects/Source Files"
  143. "/C/Keil_v5/ARM/ARMCLANG/bin/armclang" @"/c/Examples/Blinky/Objects/RTE/CMSIS/RTOS2/Keil RTX5/Library/RTX_Config.o._cc"
  144. "/C/Keil_v5/ARM/ARMCLANG/bin/armclang" @"/c/Examples/Blinky/Objects/RTE/CMSIS/RTOS2/Keil RTX5/Library/rtx_lib.o._cc"
  145. "/C/Keil_v5/ARM/ARMCLANG/bin/armclang" @"/c/Examples/Blinky/Objects/RTE/Compiler/IO/STDOUT/ITM/retarget_io.o._cc"
  146. "/C/Keil_v5/ARM/ARMCLANG/bin/armclang" @"/c/Examples/Blinky/Objects/RTE/Device/Startup/C Startup/startup_ARMCM3.o._cc"
  147. "/C/Keil_v5/ARM/ARMCLANG/bin/armclang" @"/c/Examples/Blinky/Objects/RTE/Device/Startup/C Startup/system_ARMCM3.o._cc"
  148. "/C/Keil_v5/ARM/ARMCLANG/bin/armclang" @"/c/Examples/Blinky/Objects/Source Files/Blinky.o._cc"
  149. "/C/Keil_v5/ARM/ARMCLANG/bin/armlink" --via="/c/Examples/Blinky/Objects/Blinky.axf._ld"
  150. Program Size: Code=7516 RO-data=1264 RW-data=168 ZI-data=9084
  151. cbuild.sh finished successfully!
  152. </pre><h1><a class="anchor" id="cbuild_errors"></a>
  153. Error Messages</h1>
  154. <table class="cmtable" summary="cbuild messages">
  155. <tr>
  156. <th>Type </th><th>Message </th><th>Action </th></tr>
  157. <tr>
  158. <td>ERROR </td><td>error: missing required argument &lt;<code>project&gt;</code>.cprj </td><td>See usage and correct the argument. </td></tr>
  159. <tr>
  160. <td>ERROR </td><td>error: CMSIS_BUILD_ROOT environment variable not set </td><td>Set <a class="el" href="cbuild_install.html#cbuild_envsetup">Environment Variables</a>. </td></tr>
  161. <tr>
  162. <td>ERROR </td><td>make ${output}${project}_cfg.mak failed! </td><td>Check make error messages. </td></tr>
  163. <tr>
  164. <td>ERROR </td><td>make ${output}${project}.mak failed! </td><td>Check make error messages. </td></tr>
  165. <tr>
  166. <td>INFO </td><td>cbuild.sh finished successfully! </td><td>For information only. </td></tr>
  167. </table>
  168. </div></div><!-- contents -->
  169. </div><!-- doc-content -->
  170. <!-- start footer part -->
  171. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  172. <ul>
  173. <li class="navelem"><a class="el" href="CmdLineBuild.html">Command Line Build</a></li>
  174. <li class="footer">Generated on Thu Apr 9 2020 15:49:55 for CMSIS-Build Version 0.9.0 (beta) by Arm Ltd. All rights reserved.
  175. <!--
  176. <a href="http://www.doxygen.org/index.html">
  177. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
  178. -->
  179. </li>
  180. </ul>
  181. </div>
  182. </body>
  183. </html>