SLAU132V October 2004 – February 2020
Most MSP430X devices do not have any writeable memory above the 64K boundary. However, most FRAM MSP430x devices and a few non-FRAM devices have writeable memory above 64k boundary.
For those few non-FRAM devices with high RAM (above 64K), non-constant data may be placed above the 64K boundary by the linker command file.
For all other devices, which have no writeable memory above the 64K boundary even when the restricted or large data models are used, only constant data will be placed above 64K. The compiler can take advantage of this knowledge to produce more efficient code. The --near_data option controls this optimization.
When --near_data=globals is specified, this option tells the compiler that all global read/write data must be located in the first 64K of memory. This is the default behavior. Global read/write data is placed by default in the .bss and .data sections.
If --near_data=none is specified, this option tells the compiler that it cannot rely on this assumption to generate more efficient code.
NOTE
The Linker Defines the Memory MapThe linker, not the compiler, defines the memory map and allocates code and data into target memory. The compiler assumes nothing about the types of memory available, about any locations not available for code or data (holes), or about any locations reserved for I/O or control purposes. The compiler produces relocatable code that allows the linker to allocate code and data into the appropriate memory spaces. For example, you can use the linker to allocate global variables into on-chip RAM or to allocate executable code into external ROM. You can allocate each block of code or data individually into memory, but this is not a general practice (an exception to this is memory-mapped I/O, although you can access physical memory locations with C/C++ pointer types).