1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- This file documents the GNU Assembler "as".
4
5Copyright (C) 1991-2021 Free Software Foundation, Inc.
6
7Permission is granted to copy, distribute and/or modify this document
8under the terms of the GNU Free Documentation License, Version 1.3
9or any later version published by the Free Software Foundation;
10with no Invariant Sections, with no Front-Cover Texts, and with no
11Back-Cover Texts.  A copy of the license is included in the
12section entitled "GNU Free Documentation License".
13 -->
14<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
15<head>
16<title>Using as: MSP430 Options</title>
17
18<meta name="description" content="Using as: MSP430 Options">
19<meta name="keywords" content="Using as: MSP430 Options">
20<meta name="resource-type" content="document">
21<meta name="distribution" content="global">
22<meta name="Generator" content="makeinfo">
23<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24<link href="index.html#Top" rel="start" title="Top">
25<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
26<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
27<link href="MSP430_002dDependent.html#MSP430_002dDependent" rel="up" title="MSP430-Dependent">
28<link href="MSP430-Syntax.html#MSP430-Syntax" rel="next" title="MSP430 Syntax">
29<link href="MSP430_002dDependent.html#MSP430_002dDependent" rel="previous" title="MSP430-Dependent">
30<style type="text/css">
31<!--
32a.summary-letter {text-decoration: none}
33blockquote.smallquotation {font-size: smaller}
34div.display {margin-left: 3.2em}
35div.example {margin-left: 3.2em}
36div.indentedblock {margin-left: 3.2em}
37div.lisp {margin-left: 3.2em}
38div.smalldisplay {margin-left: 3.2em}
39div.smallexample {margin-left: 3.2em}
40div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
41div.smalllisp {margin-left: 3.2em}
42kbd {font-style:oblique}
43pre.display {font-family: inherit}
44pre.format {font-family: inherit}
45pre.menu-comment {font-family: serif}
46pre.menu-preformatted {font-family: serif}
47pre.smalldisplay {font-family: inherit; font-size: smaller}
48pre.smallexample {font-size: smaller}
49pre.smallformat {font-family: inherit; font-size: smaller}
50pre.smalllisp {font-size: smaller}
51span.nocodebreak {white-space:nowrap}
52span.nolinebreak {white-space:nowrap}
53span.roman {font-family:serif; font-weight:normal}
54span.sansserif {font-family:sans-serif; font-weight:normal}
55ul.no-bullet {list-style: none}
56-->
57</style>
58
59
60</head>
61
62<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
63<a name="MSP430-Options"></a>
64<div class="header">
65<p>
66Next: <a href="MSP430-Syntax.html#MSP430-Syntax" accesskey="n" rel="next">MSP430 Syntax</a>, Up: <a href="MSP430_002dDependent.html#MSP430_002dDependent" accesskey="u" rel="up">MSP430-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
67</div>
68<hr>
69<a name="Options-15"></a>
70<h4 class="subsection">9.29.1 Options</h4>
71<a name="index-MSP-430-options-_0028none_0029"></a>
72<a name="index-options-for-MSP430-_0028none_0029"></a>
73<dl compact="compact">
74<dt><code>-mmcu</code></dt>
75<dd><p>selects the mcu architecture.  If the architecture is 430Xv2 then this
76also enables NOP generation unless the <samp>-mN</samp> is also specified.
77</p>
78</dd>
79<dt><code>-mcpu</code></dt>
80<dd><p>selects the cpu architecture.  If the architecture is 430Xv2 then this
81also enables NOP generation unless the <samp>-mN</samp> is also specified.
82</p>
83</dd>
84<dt><code>-msilicon-errata=<var>name</var>[,<var>name</var>&hellip;]</code></dt>
85<dd><p>Implements a fixup for named silicon errata.  Multiple silicon errata
86can be specified by multiple uses of the <samp>-msilicon-errata</samp>
87option and/or by including the errata names, separated by commas, on
88an individual <samp>-msilicon-errata</samp> option.  Errata names
89currently recognised by the assembler are:
90</p>
91<dl compact="compact">
92<dt><code>cpu4</code></dt>
93<dd><p><code>PUSH #4</code> and <samp>PUSH #8</samp> need longer encodings on the
94MSP430.  This option is enabled by default, and cannot be disabled.
95</p></dd>
96<dt><code>cpu8</code></dt>
97<dd><p>Do not set the <code>SP</code> to an odd value.
98</p></dd>
99<dt><code>cpu11</code></dt>
100<dd><p>Do not update the <code>SR</code> and the <code>PC</code> in the same instruction.
101</p></dd>
102<dt><code>cpu12</code></dt>
103<dd><p>Do not use the <code>PC</code> in a <code>CMP</code> or <code>BIT</code> instruction.
104</p></dd>
105<dt><code>cpu13</code></dt>
106<dd><p>Do not use an arithmetic instruction to modify the <code>SR</code>.
107</p></dd>
108<dt><code>cpu19</code></dt>
109<dd><p>Insert <code>NOP</code> after <code>CPUOFF</code>.
110</p></dd>
111</dl>
112
113</dd>
114<dt><code>-msilicon-errata-warn=<var>name</var>[,<var>name</var>&hellip;]</code></dt>
115<dd><p>Like the <samp>-msilicon-errata</samp> option except that instead of
116fixing the specified errata, a warning message is issued instead.
117This option can be used alongside <samp>-msilicon-errata</samp> to
118generate messages whenever a problem is fixed, or on its own in order
119to inspect code for potential problems.
120</p>
121</dd>
122<dt><code>-mP</code></dt>
123<dd><p>enables polymorph instructions handler.
124</p>
125</dd>
126<dt><code>-mQ</code></dt>
127<dd><p>enables relaxation at assembly time. DANGEROUS!
128</p>
129</dd>
130<dt><code>-ml</code></dt>
131<dd><p>indicates that the input uses the large code model.
132</p>
133</dd>
134<dt><code>-mn</code></dt>
135<dd><p>enables the generation of a NOP instruction following any instruction
136that might change the interrupts enabled/disabled state.  The
137pipelined nature of the MSP430 core means that any instruction that
138changes the interrupt state (<code>EINT</code>, <code>DINT</code>, <code>BIC #8,
139SR</code>, <code>BIS #8, SR</code> or <code>MOV.W &lt;&gt;, SR</code>) must be
140followed by a NOP instruction in order to ensure the correct
141processing of interrupts.  By default it is up to the programmer to
142supply these NOP instructions, but this command-line option enables
143the automatic insertion by the assembler, if they are missing.
144</p>
145</dd>
146<dt><code>-mN</code></dt>
147<dd><p>disables the generation of a NOP instruction following any instruction
148that might change the interrupts enabled/disabled state.  This is the
149default behaviour.
150</p>
151</dd>
152<dt><code>-my</code></dt>
153<dd><p>tells the assembler to generate a warning message if a NOP does not
154immediately follow an instruction that enables or disables
155interrupts.  This is the default.
156</p>
157<p>Note that this option can be stacked with the <samp>-mn</samp> option so
158that the assembler will both warn about missing NOP instructions and
159then insert them automatically.
160</p>
161</dd>
162<dt><code>-mY</code></dt>
163<dd><p>disables warnings about missing NOP instructions.
164</p>
165</dd>
166<dt><code>-md</code></dt>
167<dd><p>mark the object file as one that requires data to copied from ROM to
168RAM at execution startup.  Disabled by default.
169</p>
170</dd>
171<dt><code>-mdata-region=<var>region</var></code></dt>
172<dd><p>Select the region data will be placed in.
173Region placement is performed by the compiler and linker.  The only effect this
174option will have on the assembler is that if <var>upper</var> or <var>either</var> is
175selected, then the symbols to initialise high data and bss will be defined.
176Valid <var>region</var> values are:
177</p><dl compact="compact">
178<dt><code>none</code></dt>
179<dt><code>lower</code></dt>
180<dt><code>upper</code></dt>
181<dt><code>either</code></dt>
182</dl>
183
184</dd>
185</dl>
186
187<hr>
188<div class="header">
189<p>
190Next: <a href="MSP430-Syntax.html#MSP430-Syntax" accesskey="n" rel="next">MSP430 Syntax</a>, Up: <a href="MSP430_002dDependent.html#MSP430_002dDependent" accesskey="u" rel="up">MSP430-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
191</div>
192
193
194
195</body>
196</html>
197