Blackfin-Options.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  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): Blackfin Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): Blackfin Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): Blackfin 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="C6X-Options.html#C6X-Options" rel="next" title="C6X Options">
  31. <link href="AVR-Options.html#AVR-Options" rel="prev" title="AVR 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="Blackfin-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="C6X-Options.html#C6X-Options" accesskey="n" rel="next">C6X Options</a>, Previous: <a href="AVR-Options.html#AVR-Options" accesskey="p" rel="prev">AVR 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="Blackfin-Options-1"></a>
  69. <h4 class="subsection">3.18.6 Blackfin Options</h4>
  70. <a name="index-Blackfin-Options"></a>
  71. <dl compact="compact">
  72. <dt><code>-mcpu=<var>cpu</var><span class="roman">[</span>-<var>sirevision</var><span class="roman">]</span></code></dt>
  73. <dd><a name="index-mcpu_003d"></a>
  74. <p>Specifies the name of the target Blackfin processor. Currently, <var>cpu</var>
  75. can be one of &lsquo;<samp>bf512</samp>&rsquo;, &lsquo;<samp>bf514</samp>&rsquo;, &lsquo;<samp>bf516</samp>&rsquo;, &lsquo;<samp>bf518</samp>&rsquo;,
  76. &lsquo;<samp>bf522</samp>&rsquo;, &lsquo;<samp>bf523</samp>&rsquo;, &lsquo;<samp>bf524</samp>&rsquo;, &lsquo;<samp>bf525</samp>&rsquo;, &lsquo;<samp>bf526</samp>&rsquo;,
  77. &lsquo;<samp>bf527</samp>&rsquo;, &lsquo;<samp>bf531</samp>&rsquo;, &lsquo;<samp>bf532</samp>&rsquo;, &lsquo;<samp>bf533</samp>&rsquo;,
  78. &lsquo;<samp>bf534</samp>&rsquo;, &lsquo;<samp>bf536</samp>&rsquo;, &lsquo;<samp>bf537</samp>&rsquo;, &lsquo;<samp>bf538</samp>&rsquo;, &lsquo;<samp>bf539</samp>&rsquo;,
  79. &lsquo;<samp>bf542</samp>&rsquo;, &lsquo;<samp>bf544</samp>&rsquo;, &lsquo;<samp>bf547</samp>&rsquo;, &lsquo;<samp>bf548</samp>&rsquo;, &lsquo;<samp>bf549</samp>&rsquo;,
  80. &lsquo;<samp>bf542m</samp>&rsquo;, &lsquo;<samp>bf544m</samp>&rsquo;, &lsquo;<samp>bf547m</samp>&rsquo;, &lsquo;<samp>bf548m</samp>&rsquo;, &lsquo;<samp>bf549m</samp>&rsquo;,
  81. &lsquo;<samp>bf561</samp>&rsquo;, &lsquo;<samp>bf592</samp>&rsquo;.
  82. </p>
  83. <p>The optional <var>sirevision</var> specifies the silicon revision of the target
  84. Blackfin processor. Any workarounds available for the targeted silicon revision
  85. are enabled. If <var>sirevision</var> is &lsquo;<samp>none</samp>&rsquo;, no workarounds are enabled.
  86. If <var>sirevision</var> is &lsquo;<samp>any</samp>&rsquo;, all workarounds for the targeted processor
  87. are enabled. The <code>__SILICON_REVISION__</code> macro is defined to two
  88. hexadecimal digits representing the major and minor numbers in the silicon
  89. revision. If <var>sirevision</var> is &lsquo;<samp>none</samp>&rsquo;, the <code>__SILICON_REVISION__</code>
  90. is not defined. If <var>sirevision</var> is &lsquo;<samp>any</samp>&rsquo;, the
  91. <code>__SILICON_REVISION__</code> is defined to be <code>0xffff</code>.
  92. If this optional <var>sirevision</var> is not used, GCC assumes the latest known
  93. silicon revision of the targeted Blackfin processor.
  94. </p>
  95. <p>GCC defines a preprocessor macro for the specified <var>cpu</var>.
  96. For the &lsquo;<samp>bfin-elf</samp>&rsquo; toolchain, this option causes the hardware BSP
  97. provided by libgloss to be linked in if <samp>-msim</samp> is not given.
  98. </p>
  99. <p>Without this option, &lsquo;<samp>bf532</samp>&rsquo; is used as the processor by default.
  100. </p>
  101. <p>Note that support for &lsquo;<samp>bf561</samp>&rsquo; is incomplete. For &lsquo;<samp>bf561</samp>&rsquo;,
  102. only the preprocessor macro is defined.
  103. </p>
  104. </dd>
  105. <dt><code>-msim</code></dt>
  106. <dd><a name="index-msim"></a>
  107. <p>Specifies that the program will be run on the simulator. This causes
  108. the simulator BSP provided by libgloss to be linked in. This option
  109. has effect only for &lsquo;<samp>bfin-elf</samp>&rsquo; toolchain.
  110. Certain other options, such as <samp>-mid-shared-library</samp> and
  111. <samp>-mfdpic</samp>, imply <samp>-msim</samp>.
  112. </p>
  113. </dd>
  114. <dt><code>-momit-leaf-frame-pointer</code></dt>
  115. <dd><a name="index-momit_002dleaf_002dframe_002dpointer-1"></a>
  116. <p>Don&rsquo;t keep the frame pointer in a register for leaf functions. This
  117. avoids the instructions to save, set up and restore frame pointers and
  118. makes an extra register available in leaf functions. The option
  119. <samp>-fomit-frame-pointer</samp> removes the frame pointer for all functions,
  120. which might make debugging harder.
  121. </p>
  122. </dd>
  123. <dt><code>-mspecld-anomaly</code></dt>
  124. <dd><a name="index-mspecld_002danomaly"></a>
  125. <p>When enabled, the compiler ensures that the generated code does not
  126. contain speculative loads after jump instructions. If this option is used,
  127. <code>__WORKAROUND_SPECULATIVE_LOADS</code> is defined.
  128. </p>
  129. </dd>
  130. <dt><code>-mno-specld-anomaly</code></dt>
  131. <dd><a name="index-mno_002dspecld_002danomaly"></a>
  132. <p>Don&rsquo;t generate extra code to prevent speculative loads from occurring.
  133. </p>
  134. </dd>
  135. <dt><code>-mcsync-anomaly</code></dt>
  136. <dd><a name="index-mcsync_002danomaly"></a>
  137. <p>When enabled, the compiler ensures that the generated code does not
  138. contain CSYNC or SSYNC instructions too soon after conditional branches.
  139. If this option is used, <code>__WORKAROUND_SPECULATIVE_SYNCS</code> is defined.
  140. </p>
  141. </dd>
  142. <dt><code>-mno-csync-anomaly</code></dt>
  143. <dd><a name="index-mno_002dcsync_002danomaly"></a>
  144. <p>Don&rsquo;t generate extra code to prevent CSYNC or SSYNC instructions from
  145. occurring too soon after a conditional branch.
  146. </p>
  147. </dd>
  148. <dt><code>-mlow-64k</code></dt>
  149. <dd><a name="index-mlow_002d64k"></a>
  150. <p>When enabled, the compiler is free to take advantage of the knowledge that
  151. the entire program fits into the low 64k of memory.
  152. </p>
  153. </dd>
  154. <dt><code>-mno-low-64k</code></dt>
  155. <dd><a name="index-mno_002dlow_002d64k"></a>
  156. <p>Assume that the program is arbitrarily large. This is the default.
  157. </p>
  158. </dd>
  159. <dt><code>-mstack-check-l1</code></dt>
  160. <dd><a name="index-mstack_002dcheck_002dl1"></a>
  161. <p>Do stack checking using information placed into L1 scratchpad memory by the
  162. uClinux kernel.
  163. </p>
  164. </dd>
  165. <dt><code>-mid-shared-library</code></dt>
  166. <dd><a name="index-mid_002dshared_002dlibrary"></a>
  167. <p>Generate code that supports shared libraries via the library ID method.
  168. This allows for execute in place and shared libraries in an environment
  169. without virtual memory management. This option implies <samp>-fPIC</samp>.
  170. With a &lsquo;<samp>bfin-elf</samp>&rsquo; target, this option implies <samp>-msim</samp>.
  171. </p>
  172. </dd>
  173. <dt><code>-mno-id-shared-library</code></dt>
  174. <dd><a name="index-mno_002did_002dshared_002dlibrary"></a>
  175. <p>Generate code that doesn&rsquo;t assume ID-based shared libraries are being used.
  176. This is the default.
  177. </p>
  178. </dd>
  179. <dt><code>-mleaf-id-shared-library</code></dt>
  180. <dd><a name="index-mleaf_002did_002dshared_002dlibrary"></a>
  181. <p>Generate code that supports shared libraries via the library ID method,
  182. but assumes that this library or executable won&rsquo;t link against any other
  183. ID shared libraries. That allows the compiler to use faster code for jumps
  184. and calls.
  185. </p>
  186. </dd>
  187. <dt><code>-mno-leaf-id-shared-library</code></dt>
  188. <dd><a name="index-mno_002dleaf_002did_002dshared_002dlibrary"></a>
  189. <p>Do not assume that the code being compiled won&rsquo;t link against any ID shared
  190. libraries. Slower code is generated for jump and call insns.
  191. </p>
  192. </dd>
  193. <dt><code>-mshared-library-id=n</code></dt>
  194. <dd><a name="index-mshared_002dlibrary_002did"></a>
  195. <p>Specifies the identification number of the ID-based shared library being
  196. compiled. Specifying a value of 0 generates more compact code; specifying
  197. other values forces the allocation of that number to the current
  198. library but is no more space- or time-efficient than omitting this option.
  199. </p>
  200. </dd>
  201. <dt><code>-msep-data</code></dt>
  202. <dd><a name="index-msep_002ddata"></a>
  203. <p>Generate code that allows the data segment to be located in a different
  204. area of memory from the text segment. This allows for execute in place in
  205. an environment without virtual memory management by eliminating relocations
  206. against the text section.
  207. </p>
  208. </dd>
  209. <dt><code>-mno-sep-data</code></dt>
  210. <dd><a name="index-mno_002dsep_002ddata"></a>
  211. <p>Generate code that assumes that the data segment follows the text segment.
  212. This is the default.
  213. </p>
  214. </dd>
  215. <dt><code>-mlong-calls</code></dt>
  216. <dt><code>-mno-long-calls</code></dt>
  217. <dd><a name="index-mlong_002dcalls-3"></a>
  218. <a name="index-mno_002dlong_002dcalls-1"></a>
  219. <p>Tells the compiler to perform function calls by first loading the
  220. address of the function into a register and then performing a subroutine
  221. call on this register. This switch is needed if the target function
  222. lies outside of the 24-bit addressing range of the offset-based
  223. version of subroutine call instruction.
  224. </p>
  225. <p>This feature is not enabled by default. Specifying
  226. <samp>-mno-long-calls</samp> restores the default behavior. Note these
  227. switches have no effect on how the compiler generates code to handle
  228. function calls via function pointers.
  229. </p>
  230. </dd>
  231. <dt><code>-mfast-fp</code></dt>
  232. <dd><a name="index-mfast_002dfp"></a>
  233. <p>Link with the fast floating-point library. This library relaxes some of
  234. the IEEE floating-point standard&rsquo;s rules for checking inputs against
  235. Not-a-Number (NAN), in the interest of performance.
  236. </p>
  237. </dd>
  238. <dt><code>-minline-plt</code></dt>
  239. <dd><a name="index-minline_002dplt"></a>
  240. <p>Enable inlining of PLT entries in function calls to functions that are
  241. not known to bind locally. It has no effect without <samp>-mfdpic</samp>.
  242. </p>
  243. </dd>
  244. <dt><code>-mmulticore</code></dt>
  245. <dd><a name="index-mmulticore"></a>
  246. <p>Build a standalone application for multicore Blackfin processors.
  247. This option causes proper start files and link scripts supporting
  248. multicore to be used, and defines the macro <code>__BFIN_MULTICORE</code>.
  249. It can only be used with <samp>-mcpu=bf561<span class="roman">[</span>-<var>sirevision</var><span class="roman">]</span></samp>.
  250. </p>
  251. <p>This option can be used with <samp>-mcorea</samp> or <samp>-mcoreb</samp>, which
  252. selects the one-application-per-core programming model. Without
  253. <samp>-mcorea</samp> or <samp>-mcoreb</samp>, the single-application/dual-core
  254. programming model is used. In this model, the main function of Core B
  255. should be named as <code>coreb_main</code>.
  256. </p>
  257. <p>If this option is not used, the single-core application programming
  258. model is used.
  259. </p>
  260. </dd>
  261. <dt><code>-mcorea</code></dt>
  262. <dd><a name="index-mcorea"></a>
  263. <p>Build a standalone application for Core A of BF561 when using
  264. the one-application-per-core programming model. Proper start files
  265. and link scripts are used to support Core A, and the macro
  266. <code>__BFIN_COREA</code> is defined.
  267. This option can only be used in conjunction with <samp>-mmulticore</samp>.
  268. </p>
  269. </dd>
  270. <dt><code>-mcoreb</code></dt>
  271. <dd><a name="index-mcoreb"></a>
  272. <p>Build a standalone application for Core B of BF561 when using
  273. the one-application-per-core programming model. Proper start files
  274. and link scripts are used to support Core B, and the macro
  275. <code>__BFIN_COREB</code> is defined. When this option is used, <code>coreb_main</code>
  276. should be used instead of <code>main</code>.
  277. This option can only be used in conjunction with <samp>-mmulticore</samp>.
  278. </p>
  279. </dd>
  280. <dt><code>-msdram</code></dt>
  281. <dd><a name="index-msdram"></a>
  282. <p>Build a standalone application for SDRAM. Proper start files and
  283. link scripts are used to put the application into SDRAM, and the macro
  284. <code>__BFIN_SDRAM</code> is defined.
  285. The loader should initialize SDRAM before loading the application.
  286. </p>
  287. </dd>
  288. <dt><code>-micplb</code></dt>
  289. <dd><a name="index-micplb"></a>
  290. <p>Assume that ICPLBs are enabled at run time. This has an effect on certain
  291. anomaly workarounds. For Linux targets, the default is to assume ICPLBs
  292. are enabled; for standalone applications the default is off.
  293. </p></dd>
  294. </dl>
  295. <hr>
  296. <div class="header">
  297. <p>
  298. Next: <a href="C6X-Options.html#C6X-Options" accesskey="n" rel="next">C6X Options</a>, Previous: <a href="AVR-Options.html#AVR-Options" accesskey="p" rel="prev">AVR 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>
  299. </div>
  300. </body>
  301. </html>