1 /* ============================================================================ */
2 /* Copyright (c) 2016, Texas Instruments Incorporated */
3 /* All rights reserved. */
4 /* */
5 /* Redistribution and use in source and binary forms, with or without */
6 /* modification, are permitted provided that the following conditions */
7 /* are met: */
8 /* */
9 /* * Redistributions of source code must retain the above copyright */
10 /* notice, this list of conditions and the following disclaimer. */
11 /* */
12 /* * Redistributions in binary form must reproduce the above copyright */
13 /* notice, this list of conditions and the following disclaimer in the */
14 /* documentation and/or other materials provided with the distribution. */
15 /* */
16 /* * Neither the name of Texas Instruments Incorporated nor the names of */
17 /* its contributors may be used to endorse or promote products derived */
18 /* from this software without specific prior written permission. */
19 /* */
20 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" */
21 /* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, */
22 /* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
23 /* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR */
24 /* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
25 /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, */
26 /* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; */
27 /* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, */
28 /* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR */
29 /* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
30 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
31 /* ============================================================================ */
33 /******************************************************************************/
34 /* lnk_msp430g2221.cmd - LINKER COMMAND FILE FOR LINKING MSP430G2221 PROGRAMS */
35 /* */
36 /* Usage: lnk430 <obj files...> -o <out file> -m <map file> lnk.cmd */
37 /* cl430 <src files...> -z -o <out file> -m <map file> lnk.cmd */
38 /* */
39 /*----------------------------------------------------------------------------*/
40 /* These linker options are for command line linking only. For IDE linking, */
41 /* you should set your linker options in Project Properties */
42 /* -c LINK USING C CONVENTIONS */
43 /* -stack 0x0100 SOFTWARE STACK SIZE */
44 /* -heap 0x0100 HEAP AREA SIZE */
45 /* */
46 /*----------------------------------------------------------------------------*/
47 /* Version: 1.191 */
48 /*----------------------------------------------------------------------------*/
50 /****************************************************************************/
51 /* Specify the system memory map */
52 /****************************************************************************/
54 MEMORY
55 {
56 SFR : origin = 0x0000, length = 0x0010
57 PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0
58 PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100
59 RAM : origin = 0x0200, length = 0x0080
60 INFOA : origin = 0x10C0, length = 0x0040
61 INFOB : origin = 0x1080, length = 0x0040
62 INFOC : origin = 0x1040, length = 0x0040
63 INFOD : origin = 0x1000, length = 0x0040
64 FLASH : origin = 0xF800, length = 0x07E0
65 INT00 : origin = 0xFFE0, length = 0x0002
66 INT01 : origin = 0xFFE2, length = 0x0002
67 INT02 : origin = 0xFFE4, length = 0x0002
68 INT03 : origin = 0xFFE6, length = 0x0002
69 INT04 : origin = 0xFFE8, length = 0x0002
70 INT05 : origin = 0xFFEA, length = 0x0002
71 INT06 : origin = 0xFFEC, length = 0x0002
72 INT07 : origin = 0xFFEE, length = 0x0002
73 INT08 : origin = 0xFFF0, length = 0x0002
74 INT09 : origin = 0xFFF2, length = 0x0002
75 INT10 : origin = 0xFFF4, length = 0x0002
76 INT11 : origin = 0xFFF6, length = 0x0002
77 INT12 : origin = 0xFFF8, length = 0x0002
78 INT13 : origin = 0xFFFA, length = 0x0002
79 INT14 : origin = 0xFFFC, length = 0x0002
80 RESET : origin = 0xFFFE, length = 0x0002
81 }
83 /****************************************************************************/
84 /* Specify the sections allocation into memory */
85 /****************************************************************************/
87 SECTIONS
88 {
89 .bss : {} > RAM /* Global & static vars */
90 .data : {} > RAM /* Global & static vars */
91 .TI.noinit : {} > RAM /* For #pragma noinit */
92 .sysmem : {} > RAM /* Dynamic memory allocation area */
93 .stack : {} > RAM (HIGH) /* Software system stack */
95 .text : {} > FLASH /* Code */
96 .cinit : {} > FLASH /* Initialization tables */
97 .const : {} > FLASH /* Constant data */
98 .cio : {} > RAM /* C I/O Buffer */
100 .pinit : {} > FLASH /* C++ Constructor tables */
101 .binit : {} > FLASH /* Boot-time Initialization tables */
102 .init_array : {} > FLASH /* C++ Constructor tables */
103 .mspabi.exidx : {} > FLASH /* C++ Constructor tables */
104 .mspabi.extab : {} > FLASH /* C++ Constructor tables */
105 #ifdef __TI_COMPILER_VERSION
106 #if __TI_COMPILER_VERSION >= 15009000
107 #ifndef __LARGE_DATA_MODEL__
108 .TI.ramfunc : {} load=FLASH, run=RAM, table(BINIT)
109 #else
110 .TI.ramfunc : {} load=FLASH | FLASH2, run=RAM, table(BINIT)
111 #endif
112 #endif
113 #endif
115 .infoA : {} > INFOA /* MSP430 INFO FLASH Memory segments */
116 .infoB : {} > INFOB
117 .infoC : {} > INFOC
118 .infoD : {} > INFOD
120 /* MSP430 Interrupt vectors */
121 .int00 : {} > INT00
122 .int01 : {} > INT01
123 PORT1 : { * ( .int02 ) } > INT02 type = VECT_INIT
124 PORT2 : { * ( .int03 ) } > INT03 type = VECT_INIT
125 USI : { * ( .int04 ) } > INT04 type = VECT_INIT
126 .int05 : {} > INT05
127 .int06 : {} > INT06
128 .int07 : {} > INT07
129 TIMERA1 : { * ( .int08 ) } > INT08 type = VECT_INIT
130 TIMERA0 : { * ( .int09 ) } > INT09 type = VECT_INIT
131 WDT : { * ( .int10 ) } > INT10 type = VECT_INIT
132 .int11 : {} > INT11
133 .int12 : {} > INT12
134 .int13 : {} > INT13
135 NMI : { * ( .int14 ) } > INT14 type = VECT_INIT
136 .reset : {} > RESET /* MSP430 Reset vector */
137 }
139 /****************************************************************************/
140 /* Include peripherals memory map */
141 /****************************************************************************/
143 -l msp430g2221.cmd