224 lines
9.9 KiB
HTML
224 lines
9.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- Copyright (C) 1988-2016 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 5.2, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<title>Using the GNU Compiler Collection (GCC): MSP430 Options</title>
|
|
|
|
<meta name="description" content="Using the GNU Compiler Collection (GCC): MSP430 Options">
|
|
<meta name="keywords" content="Using the GNU Compiler Collection (GCC): MSP430 Options">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<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.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.indentedblock {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
|
|
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.nocodebreak {white-space:nowrap}
|
|
span.nolinebreak {white-space:nowrap}
|
|
span.roman {font-family:serif; font-weight:normal}
|
|
span.sansserif {font-family:sans-serif; font-weight:normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
|
<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.18.30 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>This option is also passed on to the assembler.
|
|
</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-3"></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>-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>
|
|
</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>
|