11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Getting startedLINKINGThe <strong>IAR</strong> XLINK Linker is used for building the final application. Normally, XLINKrequires the following information as input:●A number of object files and possibly certain libraries● The standard library containing the runtime environment and the standard languagefunctions● A program start label● A linker command file that describes the placement of code and data into thememory of the target system● Information about the output format.On the command line, the following line can be used for starting XLINK:xlink myfile.r43 myfile2.r43 -s __program_start -f lnk430.xclcl430f.r43 -o aout.a430 -rIn this example, myfile.r43 and myfile2.r43 are object files, lnk430.xcl is thelinker command file, and cl430f.r43 is the runtime library. The option -s specifiesthe label where the application starts. The option -o specifies the name of the output file,and the option -r is used for specifying the output format UBROF, which can be usedfor debugging in C-SPY®.The <strong>IAR</strong> XLINK Linker produces output according to your specifications. Choose theoutput format that suits your purpose. You might want to load the output to adebugger—which means that you need output with debug information. Alternatively,you might want to load the output to a flash loader or a PROM programmer—in whichcase you need output without debug information, such as Intel-hex or MotorolaS-records. The option -F can be used for specifying the output format. (The defaultoutput format is msp430-txt.)Basic settings for project configurationThis section gives an overview of the basic settings for the project setup that are neededto make the compiler generate the best code for the <strong>MSP430</strong> device you are using. Youcan specify the options either from the command line interface or in the <strong>IAR</strong> EmbeddedWorkbench IDE.The basic settings are:●●●Processor configuration, that includes to select core for either the <strong>MSP430</strong> or the<strong>MSP430</strong>X architecture, and whether there is a hardware multiplier or notNormal or position-independent codeData modelPart 1. Using the compiler5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!