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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

External interface detailsThis chapter provides <strong>reference</strong> information about how the compiler interactswith its environment. The chapter briefly lists and describes the invocationsyntax, methods for passing options to the tools, environment variables, theinclude file search procedure, and finally the different types of compiler output.Invocation syntaxYou can use the compiler either from the <strong>IAR</strong> Embedded Workbench IDE or from thecommand line. Refer to the <strong>MSP430</strong> <strong>IAR</strong> Embedded Workbench® IDE User Guide forinformation about using the compiler from the <strong>IAR</strong> Embedded Workbench IDE.COMPILER INVOCATION SYNTAXThe invocation syntax for the compiler is:icc430 [options] [sourcefile] [options]For example, when compiling the source file prog.c, use the following command togenerate an object file with debug information:icc430 prog --debugThe source file can be a C or <strong>C++</strong> file, typically with the filename extension c or cpp,respectively. If no filename extension is specified, the file to be compiled must have theextension c.Generally, the order of options on the command line, both relative to each other and tothe source filename, is not significant. There is, however, one exception: when you usethe -I option, the directories are searched in the same order that they are specified on thecommand line.If you run the compiler from the command line without any arguments, the compilerversion number and all available options including brief descriptions are directed tostdout and displayed on the screen.PASSING OPTIONSThere are three different ways of passing options to the compiler:●Directly from the command lineSpecify the options on the command line after the icc430 command, either beforeor after the source filename; see Invocation syntax, page 133.Part 2. <strong>Compiler</strong> <strong>reference</strong> 133

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

Saved successfully!

Ooh no, something went wrong!