Next: , Previous: Moxie Options, Up: Submodel Options


3.17.31 MSP430 Options

These options are defined for the MSP430:

-masm-hex
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.
-mmcu=
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 __. This in turn will be used by the msp430.h header file to select an MCU specific supplimentary header file.

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 msp430 can also be used to select the 430 ISA. Similarly the generic msp430x MCU name will select the 430X ISA.

In addition an MCU specific linker script will be added to the linker command line. The script's name is the name of the MCU with .ld appended. Thus specifying -mmcu=xxx on the gcc command line will define the C preprocessor symbol __XXX__ and cause the linker to search for a script called xxx.ld.

This option is also passed on to the assembler.

-mcpu=
Specifies the ISA to use. Accepted values are msp430, msp430x and msp430xv2. This option is deprecated. The -mmcu= option should be used to select the ISA.
-msim
Link to the simulator runtime libraries and linker script. Overrides any scripts that would be selected by the -mmcu= option.
-mlarge
Use large-model addressing (20-bit pointers, 32-bit size_t).
-msmall
Use small-model addressing (16-bit pointers, 16-bit size_t).
-mrelax
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.