|
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
-
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with the
- Invariant Sections being "Funding Free Software", the Front-Cover
- Texts being (a) (see below), and with the Back-Cover Texts being (b)
- (see below). A copy of the license is included in the section entitled
- "GNU Free Documentation License".
-
- (a) The FSF's Front-Cover Text is:
-
- A GNU Manual
-
- (b) The FSF's Back-Cover Text is:
-
- You have freedom to copy and modify this GNU Manual, like GNU
- software. Copies published by the Free Software Foundation raise
- funds for GNU development. -->
- <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>MSP430 Options (Using the GNU Compiler Collection (GCC))</title>
-
- <meta name="description" content="MSP430 Options (Using the GNU Compiler Collection (GCC))">
- <meta name="keywords" content="MSP430 Options (Using the GNU Compiler Collection (GCC))">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <link href="index.html#Top" rel="start" title="Top">
- <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
- <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
- <link href="Submodel-Options.html#Submodel-Options" rel="up" title="Submodel Options">
- <link href="NDS32-Options.html#NDS32-Options" rel="next" title="NDS32 Options">
- <link href="Moxie-Options.html#Moxie-Options" rel="prev" title="Moxie Options">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.indentedblock {margin-right: 0em}
- blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- div.smalllisp {margin-left: 3.2em}
- kbd {font-style: oblique}
- pre.display {font-family: inherit}
- pre.format {font-family: inherit}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: inherit; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: inherit; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.nolinebreak {white-space: nowrap}
- span.roman {font-family: initial; font-weight: normal}
- span.sansserif {font-family: sans-serif; font-weight: normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
-
-
- </head>
-
- <body lang="en">
- <a name="MSP430-Options"></a>
- <div class="header">
- <p>
- 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> [<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>
- </div>
- <hr>
- <a name="MSP430-Options-1"></a>
- <h4 class="subsection">3.19.33 MSP430 Options</h4>
- <a name="index-MSP430-Options"></a>
-
- <p>These options are defined for the MSP430:
- </p>
- <dl compact="compact">
- <dt><code>-masm-hex</code></dt>
- <dd><a name="index-masm_002dhex"></a>
- <p>Force assembly output to always use hex constants. Normally such
- constants are signed decimals, but this option is available for
- testsuite and/or aesthetic purposes.
- </p>
- </dd>
- <dt><code>-mmcu=</code></dt>
- <dd><a name="index-mmcu_003d"></a>
- <p>Select the MCU to target. This is used to create a C preprocessor
- symbol based upon the MCU name, converted to upper case and pre- and
- post-fixed with ‘<samp>__</samp>’. This in turn is used by the
- <samp>msp430.h</samp> header file to select an MCU-specific supplementary
- header file.
- </p>
- <p>The option also sets the ISA to use. If the MCU name is one that is
- known to only support the 430 ISA then that is selected, otherwise the
- 430X ISA is selected. A generic MCU name of ‘<samp>msp430</samp>’ can also be
- used to select the 430 ISA. Similarly the generic ‘<samp>msp430x</samp>’ MCU
- name selects the 430X ISA.
- </p>
- <p>In addition an MCU-specific linker script is added to the linker
- command line. The script’s name is the name of the MCU with
- <samp>.ld</samp> appended. Thus specifying <samp>-mmcu=xxx</samp> on the <code>gcc</code>
- command line defines the C preprocessor symbol <code>__XXX__</code> and
- cause the linker to search for a script called <samp>xxx.ld</samp>.
- </p>
- <p>The ISA and hardware multiply supported for the different MCUs is hard-coded
- into GCC. However, an external ‘<samp>devices.csv</samp>’ file can be used to
- extend device support beyond those that have been hard-coded.
- </p>
- <p>GCC searches for the ‘<samp>devices.csv</samp>’ file using the following methods in the
- given precedence order, where the first method takes precendence over the
- second which takes precedence over the third.
- </p>
- <dl compact="compact">
- <dt>Include path specified with <code>-I</code> and <code>-L</code></dt>
- <dd><p>‘<samp>devices.csv</samp>’ will be searched for in each of the directories specified by
- include paths and linker library search paths.
- </p></dd>
- <dt>Path specified by the environment variable ‘<samp>MSP430_GCC_INCLUDE_DIR</samp>’</dt>
- <dd><p>Define the value of the global environment variable
- ‘<samp>MSP430_GCC_INCLUDE_DIR</samp>’
- to the full path to the directory containing devices.csv, and GCC will search
- this directory for devices.csv. If devices.csv is found, this directory will
- also be registered as an include path, and linker library path. Header files
- and linker scripts in this directory can therefore be used without manually
- specifying <code>-I</code> and <code>-L</code> on the command line.
- </p></dd>
- <dt>The ‘<samp>msp430-elf{,bare}/include/devices</samp>’ directory</dt>
- <dd><p>Finally, GCC will examine ‘<samp>msp430-elf{,bare}/include/devices</samp>’ from the
- toolchain root directory. This directory does not exist in a default
- installation, but if the user has created it and copied ‘<samp>devices.csv</samp>’
- there, then the MCU data will be read. As above, this directory will
- also be registered as an include path, and linker library path.
- </p>
- </dd>
- </dl>
- <p>If none of the above search methods find ‘<samp>devices.csv</samp>’, then the
- hard-coded MCU data is used.
- </p>
-
- </dd>
- <dt><code>-mwarn-mcu</code></dt>
- <dt><code>-mno-warn-mcu</code></dt>
- <dd><a name="index-mwarn_002dmcu"></a>
- <a name="index-mno_002dwarn_002dmcu"></a>
- <p>This option enables or disables warnings about conflicts between the
- MCU name specified by the <samp>-mmcu</samp> option and the ISA set by the
- <samp>-mcpu</samp> option and/or the hardware multiply support set by the
- <samp>-mhwmult</samp> option. It also toggles warnings about unrecognized
- MCU names. This option is on by default.
- </p>
- </dd>
- <dt><code>-mcpu=</code></dt>
- <dd><a name="index-mcpu_003d-4"></a>
- <p>Specifies the ISA to use. Accepted values are ‘<samp>msp430</samp>’,
- ‘<samp>msp430x</samp>’ and ‘<samp>msp430xv2</samp>’. This option is deprecated. The
- <samp>-mmcu=</samp> option should be used to select the ISA.
- </p>
- </dd>
- <dt><code>-msim</code></dt>
- <dd><a name="index-msim-6"></a>
- <p>Link to the simulator runtime libraries and linker script. Overrides
- any scripts that would be selected by the <samp>-mmcu=</samp> option.
- </p>
- </dd>
- <dt><code>-mlarge</code></dt>
- <dd><a name="index-mlarge"></a>
- <p>Use large-model addressing (20-bit pointers, 32-bit <code>size_t</code>).
- </p>
- </dd>
- <dt><code>-msmall</code></dt>
- <dd><a name="index-msmall"></a>
- <p>Use small-model addressing (16-bit pointers, 16-bit <code>size_t</code>).
- </p>
- </dd>
- <dt><code>-mrelax</code></dt>
- <dd><a name="index-mrelax-3"></a>
- <p>This option is passed to the assembler and linker, and allows the
- linker to perform certain optimizations that cannot be done until
- the final link.
- </p>
- </dd>
- <dt><code>mhwmult=</code></dt>
- <dd><a name="index-mhwmult_003d"></a>
- <p>Describes the type of hardware multiply supported by the target.
- Accepted values are ‘<samp>none</samp>’ for no hardware multiply, ‘<samp>16bit</samp>’
- for the original 16-bit-only multiply supported by early MCUs.
- ‘<samp>32bit</samp>’ for the 16/32-bit multiply supported by later MCUs and
- ‘<samp>f5series</samp>’ for the 16/32-bit multiply supported by F5-series MCUs.
- A value of ‘<samp>auto</samp>’ can also be given. This tells GCC to deduce
- the hardware multiply support based upon the MCU name provided by the
- <samp>-mmcu</samp> option. If no <samp>-mmcu</samp> option is specified or if
- the MCU name is not recognized then no hardware multiply support is
- assumed. <code>auto</code> is the default setting.
- </p>
- <p>Hardware multiplies are normally performed by calling a library
- routine. This saves space in the generated code. When compiling at
- <samp>-O3</samp> or higher however the hardware multiplier is invoked
- inline. This makes for bigger, but faster code.
- </p>
- <p>The hardware multiply routines disable interrupts whilst running and
- restore the previous interrupt state when they finish. This makes
- them safe to use inside interrupt handlers as well as in normal code.
- </p>
- </dd>
- <dt><code>-minrt</code></dt>
- <dd><a name="index-minrt"></a>
- <p>Enable the use of a minimum runtime environment - no static
- initializers or constructors. This is intended for memory-constrained
- devices. The compiler includes special symbols in some objects
- that tell the linker and runtime which code fragments are required.
- </p>
- </dd>
- <dt><code>-mtiny-printf</code></dt>
- <dd><a name="index-mtiny_002dprintf"></a>
- <p>Enable reduced code size <code>printf</code> and <code>puts</code> library functions.
- The ‘<samp>tiny</samp>’ implementations of these functions are not reentrant, so
- must be used with caution in multi-threaded applications.
- </p>
- <p>Support for streams has been removed and the string to be printed will
- always be sent to stdout via the <code>write</code> syscall. The string is not
- buffered before it is sent to write.
- </p>
- <p>This option requires Newlib Nano IO, so GCC must be configured with
- ‘<samp>--enable-newlib-nano-formatted-io</samp>’.
- </p>
- </dd>
- <dt><code>-mcode-region=</code></dt>
- <dt><code>-mdata-region=</code></dt>
- <dd><a name="index-mcode_002dregion"></a>
- <a name="index-mdata_002dregion"></a>
- <p>These options tell the compiler where to place functions and data that
- do not have one of the <code>lower</code>, <code>upper</code>, <code>either</code> or
- <code>section</code> attributes. Possible values are <code>lower</code>,
- <code>upper</code>, <code>either</code> or <code>any</code>. The first three behave
- like the corresponding attribute. The fourth possible value -
- <code>any</code> - is the default. It leaves placement entirely up to the
- linker script and how it assigns the standard sections
- (<code>.text</code>, <code>.data</code>, etc) to the memory regions.
- </p>
- </dd>
- <dt><code>-msilicon-errata=</code></dt>
- <dd><a name="index-msilicon_002derrata"></a>
- <p>This option passes on a request to assembler to enable the fixes for
- the named silicon errata.
- </p>
- </dd>
- <dt><code>-msilicon-errata-warn=</code></dt>
- <dd><a name="index-msilicon_002derrata_002dwarn"></a>
- <p>This option passes on a request to the assembler to enable warning
- messages when a silicon errata might need to be applied.
- </p>
- </dd>
- <dt><code>-mwarn-devices-csv</code></dt>
- <dt><code>-mno-warn-devices-csv</code></dt>
- <dd><a name="index-mwarn_002ddevices_002dcsv"></a>
- <a name="index-mno_002dwarn_002ddevices_002dcsv"></a>
- <p>Warn if ‘<samp>devices.csv</samp>’ is not found or there are problem parsing it
- (default: on).
- </p>
- </dd>
- </dl>
-
- <hr>
- <div class="header">
- <p>
- 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> [<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>
- </div>
-
-
-
- </body>
- </html>
|