MSP430-Options.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>Using the GNU Compiler Collection (GCC): MSP430 Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): MSP430 Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): MSP430 Options">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Submodel-Options.html#Submodel-Options" rel="up" title="Submodel Options">
  30. <link href="NDS32-Options.html#NDS32-Options" rel="next" title="NDS32 Options">
  31. <link href="Moxie-Options.html#Moxie-Options" rel="prev" title="Moxie Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="MSP430-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="NDS32-Options.html#NDS32-Options" accesskey="n" rel="next">NDS32 Options</a>, Previous: <a href="Moxie-Options.html#Moxie-Options" accesskey="p" rel="prev">Moxie Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="MSP430-Options-1"></a>
  69. <h4 class="subsection">3.18.30 MSP430 Options</h4>
  70. <a name="index-MSP430-Options"></a>
  71. <p>These options are defined for the MSP430:
  72. </p>
  73. <dl compact="compact">
  74. <dt><code>-masm-hex</code></dt>
  75. <dd><a name="index-masm_002dhex"></a>
  76. <p>Force assembly output to always use hex constants. Normally such
  77. constants are signed decimals, but this option is available for
  78. testsuite and/or aesthetic purposes.
  79. </p>
  80. </dd>
  81. <dt><code>-mmcu=</code></dt>
  82. <dd><a name="index-mmcu_003d"></a>
  83. <p>Select the MCU to target. This is used to create a C preprocessor
  84. symbol based upon the MCU name, converted to upper case and pre- and
  85. post-fixed with &lsquo;<samp>__</samp>&rsquo;. This in turn is used by the
  86. <samp>msp430.h</samp> header file to select an MCU-specific supplementary
  87. header file.
  88. </p>
  89. <p>The option also sets the ISA to use. If the MCU name is one that is
  90. known to only support the 430 ISA then that is selected, otherwise the
  91. 430X ISA is selected. A generic MCU name of &lsquo;<samp>msp430</samp>&rsquo; can also be
  92. used to select the 430 ISA. Similarly the generic &lsquo;<samp>msp430x</samp>&rsquo; MCU
  93. name selects the 430X ISA.
  94. </p>
  95. <p>In addition an MCU-specific linker script is added to the linker
  96. command line. The script&rsquo;s name is the name of the MCU with
  97. <samp>.ld</samp> appended. Thus specifying <samp>-mmcu=xxx</samp> on the <code>gcc</code>
  98. command line defines the C preprocessor symbol <code>__XXX__</code> and
  99. cause the linker to search for a script called <samp>xxx.ld</samp>.
  100. </p>
  101. <p>This option is also passed on to the assembler.
  102. </p>
  103. </dd>
  104. <dt><code>-mwarn-mcu</code></dt>
  105. <dt><code>-mno-warn-mcu</code></dt>
  106. <dd><a name="index-mwarn_002dmcu"></a>
  107. <a name="index-mno_002dwarn_002dmcu"></a>
  108. <p>This option enables or disables warnings about conflicts between the
  109. MCU name specified by the <samp>-mmcu</samp> option and the ISA set by the
  110. <samp>-mcpu</samp> option and/or the hardware multiply support set by the
  111. <samp>-mhwmult</samp> option. It also toggles warnings about unrecognized
  112. MCU names. This option is on by default.
  113. </p>
  114. </dd>
  115. <dt><code>-mcpu=</code></dt>
  116. <dd><a name="index-mcpu_003d-3"></a>
  117. <p>Specifies the ISA to use. Accepted values are &lsquo;<samp>msp430</samp>&rsquo;,
  118. &lsquo;<samp>msp430x</samp>&rsquo; and &lsquo;<samp>msp430xv2</samp>&rsquo;. This option is deprecated. The
  119. <samp>-mmcu=</samp> option should be used to select the ISA.
  120. </p>
  121. </dd>
  122. <dt><code>-msim</code></dt>
  123. <dd><a name="index-msim-6"></a>
  124. <p>Link to the simulator runtime libraries and linker script. Overrides
  125. any scripts that would be selected by the <samp>-mmcu=</samp> option.
  126. </p>
  127. </dd>
  128. <dt><code>-mlarge</code></dt>
  129. <dd><a name="index-mlarge"></a>
  130. <p>Use large-model addressing (20-bit pointers, 32-bit <code>size_t</code>).
  131. </p>
  132. </dd>
  133. <dt><code>-msmall</code></dt>
  134. <dd><a name="index-msmall"></a>
  135. <p>Use small-model addressing (16-bit pointers, 16-bit <code>size_t</code>).
  136. </p>
  137. </dd>
  138. <dt><code>-mrelax</code></dt>
  139. <dd><a name="index-mrelax-3"></a>
  140. <p>This option is passed to the assembler and linker, and allows the
  141. linker to perform certain optimizations that cannot be done until
  142. the final link.
  143. </p>
  144. </dd>
  145. <dt><code>mhwmult=</code></dt>
  146. <dd><a name="index-mhwmult_003d"></a>
  147. <p>Describes the type of hardware multiply supported by the target.
  148. Accepted values are &lsquo;<samp>none</samp>&rsquo; for no hardware multiply, &lsquo;<samp>16bit</samp>&rsquo;
  149. for the original 16-bit-only multiply supported by early MCUs.
  150. &lsquo;<samp>32bit</samp>&rsquo; for the 16/32-bit multiply supported by later MCUs and
  151. &lsquo;<samp>f5series</samp>&rsquo; for the 16/32-bit multiply supported by F5-series MCUs.
  152. A value of &lsquo;<samp>auto</samp>&rsquo; can also be given. This tells GCC to deduce
  153. the hardware multiply support based upon the MCU name provided by the
  154. <samp>-mmcu</samp> option. If no <samp>-mmcu</samp> option is specified or if
  155. the MCU name is not recognized then no hardware multiply support is
  156. assumed. <code>auto</code> is the default setting.
  157. </p>
  158. <p>Hardware multiplies are normally performed by calling a library
  159. routine. This saves space in the generated code. When compiling at
  160. <samp>-O3</samp> or higher however the hardware multiplier is invoked
  161. inline. This makes for bigger, but faster code.
  162. </p>
  163. <p>The hardware multiply routines disable interrupts whilst running and
  164. restore the previous interrupt state when they finish. This makes
  165. them safe to use inside interrupt handlers as well as in normal code.
  166. </p>
  167. </dd>
  168. <dt><code>-minrt</code></dt>
  169. <dd><a name="index-minrt"></a>
  170. <p>Enable the use of a minimum runtime environment - no static
  171. initializers or constructors. This is intended for memory-constrained
  172. devices. The compiler includes special symbols in some objects
  173. that tell the linker and runtime which code fragments are required.
  174. </p>
  175. </dd>
  176. <dt><code>-mcode-region=</code></dt>
  177. <dt><code>-mdata-region=</code></dt>
  178. <dd><a name="index-mcode_002dregion"></a>
  179. <a name="index-mdata_002dregion"></a>
  180. <p>These options tell the compiler where to place functions and data that
  181. do not have one of the <code>lower</code>, <code>upper</code>, <code>either</code> or
  182. <code>section</code> attributes. Possible values are <code>lower</code>,
  183. <code>upper</code>, <code>either</code> or <code>any</code>. The first three behave
  184. like the corresponding attribute. The fourth possible value -
  185. <code>any</code> - is the default. It leaves placement entirely up to the
  186. linker script and how it assigns the standard sections
  187. (<code>.text</code>, <code>.data</code>, etc) to the memory regions.
  188. </p>
  189. </dd>
  190. <dt><code>-msilicon-errata=</code></dt>
  191. <dd><a name="index-msilicon_002derrata"></a>
  192. <p>This option passes on a request to assembler to enable the fixes for
  193. the named silicon errata.
  194. </p>
  195. </dd>
  196. <dt><code>-msilicon-errata-warn=</code></dt>
  197. <dd><a name="index-msilicon_002derrata_002dwarn"></a>
  198. <p>This option passes on a request to the assembler to enable warning
  199. messages when a silicon errata might need to be applied.
  200. </p>
  201. </dd>
  202. </dl>
  203. <hr>
  204. <div class="header">
  205. <p>
  206. Next: <a href="NDS32-Options.html#NDS32-Options" accesskey="n" rel="next">NDS32 Options</a>, Previous: <a href="Moxie-Options.html#Moxie-Options" accesskey="p" rel="prev">Moxie Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  207. </div>
  208. </body>
  209. </html>