-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlnk430F2122_BLINK.xcl
163 lines (128 loc) · 5.45 KB
/
lnk430F2122_BLINK.xcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
//*****************************************************************
//
// XLINK command file for IAR Embedded Workbench for MSP430.
//
// This file should be used with the MSP430F2122 microprocessor.
//
// Copyright 1996-2007 IAR Systems. All rights reserved.
//
// Usage: xlink your_file(s) -f lnk430f2122 library
//
// $Revision: 4088 $
//
//*****************************************************************
/************************ Revision History ****************************
YYYY-MM-DD Comments
-------------------------------------------------------------------------------------------
2009-10-01 Update from the factory linker file to the KEYFB-specific linker file.
************************************************************************/
//*****************************************************************
//
// The memory areas of the MSP430F2122 microprocessor:
//
// Peripheral units: 0 - 01FF
//
// Information memory (FLASH): 1000 - 10FF
//
// Read-write memory (RAM): 0200 - 03FF
//
// Read-only memory (FLASH): F000 - FFDD
//
//
//*****************************************************************
//*****************************************************************
//
// The following segments are defined in this linker command file:
//
// Data read/write segments (RAM)
// ==============================
//
// segment Restrictions Usage
// ------- ------------ --------------------------
// DATA16_I < 10000 Data16 initialized variables
// DATA16_Z < 10000 Data16 zero initialized variables
// DATA16_N < 10000 Data16 uninitialized variables
// DATA16_HEAP < 10000 Data16 heap used by malloc and free
// DATA20_I Data20 initialized variables
// DATA20_Z Data20 zero initialized variables
// DATA20_N Data20 uninitialized variables
// DATA20_HEAP Data20 heap used by malloc and free
// CSTACK < 10000 Runtime stack
//
//
// Program and data read-only segments (FLASH)
// ===========================================
//
// segment Restrictions Usage
// ------- ------------ --------------------------
// INFO Information memory
// CSTART < 10000 Program startup code
// CODE Program code
// ISR_CODE < 10000 Program code for interrupt service routines
// DATA16_C < 10000 Data16 constant data and string literals
// DATA16_ID < 10000 Data16 initializers for DATA16_I
// DATA20_C Data20 constant data and string literals
// DATA20_ID Data20 initializers for DATA20_I
// DIFUNCT < 10000 Dynamic initialization vector used by C++
// CHECKSUM Checksum byte(s) generated by the -J option
// INTVEC FFE0-FFFF Interrupt vectors
// RESET FFFE-FFFF The reset vector
// DEVICE_INFO Non-volatile flags, device_id and unique_id
//
//*****************************************************************
// ---------------------------------------------------------
// Stack and heap sizes.
// ---------------------------------------------------------
// Uncomment for command line use
//-D_STACK_SIZE=80
//-D_DATA16_HEAP_SIZE=80
// These are defined in the Project Options, but should be:
// Stack size = 108
// Heap size = 0
// ---------------------------------------------------------
// Define cpu.
// ---------------------------------------------------------
-cmsp430
// ---------------------------------------------------------
// Read-write memory.
// ---------------------------------------------------------
-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA16_HEAP+_DATA16_HEAP_SIZE=0200-03FF
-Z(DATA)CSTACK+_STACK_SIZE#
// ---------------------------------------------------------
// Read only memory
// ---------------------------------------------------------
// Information memory
// ---------------------------------------------------------
-Z(CODE)INFO=1000-10FF // Not sure if this is used
-Z(CODE)INFOA=10C0-10FF // Leave this segment alone as it contains cal values
-Z(CODE)INFOB=1080-10BF // Currently unused
//-Z(CODE)INFOC=1040-107F // Replace with device parameters
//-Z(CODE)INFOD=1000-103F // Replace with non-volatile system info
// Program-specific data segments in Info memory
-Z(CONST)DEVICE_INFO_SEGC=1040-107F
-Z(CONST)DEVICE_INFO_SEGD=1000-103F
// To replace oscillator calibration values when you accidentally erase them,
// uncomment this along with the code in cstartup.s43.
// -Z(CONST)CAL_VALUES=10F4-10FF
// ---------------------------------------------------------
// Constant data
// ---------------------------------------------------------
-Z(CONST)DATA16_C,DATA16_ID,DIFUNCT=F000-FFDD
// ---------------------------------------------------------
// Code
// ---------------------------------------------------------
-Z(CODE)CSTART,ISR_CODE=F000-FFDD
-P(CODE)CODE=F000-FFDD
// ---------------------------------------------------------
// Checksum storage
// ---------------------------------------------------------
-Z(CODE)CHECKSUM=FFDE-FFDF
// ---------------------------------------------------------
// Interrupt vectors
// ---------------------------------------------------------
-Z(CODE)INTVEC=FFE0-FFFF
-Z(CODE)RESET=FFFE-FFFF
-Z(CODE)NMI=FFFC-FFFD
// ---------------------------------------------------------
// The end
// ---------------------------------------------------------