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.

Placing segments in memoryfrom the linker's point of view, all segments are equal; they are simply named parts ofmemory.For detailed information about individual segments, see the chapter Segment <strong>reference</strong>.Segment memory typeXLINK assigns a segment memory type to each of the segments. In some cases, theindividual segments may have the same name as the segment memory type they belongto, for example CODE. Make sure not to confuse the individual segment names with thesegment memory types in those cases.By default, the <strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong> uses only the following XLINK segmentmemory types:Segment memory typeCODECONSTDATATable 5: XLINK segment memory typesDescriptionFor executable codeFor data placed in ROMFor data placed in RAMXLINK supports a number of other segment memory types than the ones describedabove. However, they exist to support other types of microcontrollers.For more details about segments, see the chapter Segment <strong>reference</strong>.Placing segments in memoryThe placement of segments in memory is performed by the <strong>IAR</strong> XLINK Linker. It usesa linker command file that contains command line options which specify the locationswhere the segments can be placed, thereby assuring that your application fits on thetarget chip. You can use the same source code with different derivatives just byrebuilding the code with the appropriate linker command file.In particular, the linker command file specifies:● The placement of segments in memory● The maximum stack size● The maximum heap size.This section describes the methods for placing the segments in memory, which meansthat you have to customize the linker command file to suit the memory layout of yourtarget system. For showing the methods, fictitious examples are used.32<strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong>Reference Guide

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

Saved successfully!

Ooh no, something went wrong!