Subversion Repositories DashDisplay

Rev

Rev 58 | Rev 65 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 58 Rev 61
Line 1... Line 1...
1
/*
1
/*
2
*****************************************************************************
2
******************************************************************************
3
**
3
**
4
 
4
 
5
**  File        : stm32_flash.ld
5
**  File        : LinkerScript.ld
-
 
6
**
-
 
7
**  Author		: STM32CubeMX
6
**
8
**
7
**  Abstract    : Linker script for STM32L152RE Device with
9
**  Abstract    : Linker script for STM32L152RETx series
8
**                512KByte FLASH, 80KByte RAM
10
**                512Kbytes FLASH and 80Kbytes RAM
9
**
11
**
10
**                Set heap size, stack size and stack location according
12
**                Set heap size, stack size and stack location according
11
**                to application requirements.
13
**                to application requirements.
12
**
14
**
13
**                Set memory bank area and size if external memory is used.
15
**                Set memory bank area and size if external memory is used.
14
**
16
**
15
**  Target      : STMicroelectronics STM32
17
**  Target      : STMicroelectronics STM32
16
**
18
**
17
**  Environment : Atollic TrueSTUDIO(R)
-
 
18
**
-
 
19
**  Distribution: The file is distributed as is, without any warranty
19
**  Distribution: The file is distributed “as is,” without any warranty
20
**                of any kind.
20
**                of any kind.
21
**
21
**
-
 
22
*****************************************************************************
22
**  (c)Copyright Atollic AB.
23
** @attention
-
 
24
**
-
 
25
** <h2><center>&copy; COPYRIGHT(c) 2019 STMicroelectronics</center></h2>
-
 
26
**
-
 
27
** Redistribution and use in source and binary forms, with or without modification,
-
 
28
** are permitted provided that the following conditions are met:
-
 
29
**   1. Redistributions of source code must retain the above copyright notice,
23
**  You may use this file as-is or modify it according to the needs of your
30
**      this list of conditions and the following disclaimer.
24
**  project. This file may only be built (assembled or compiled and linked)
31
**   2. Redistributions in binary form must reproduce the above copyright notice,
-
 
32
**      this list of conditions and the following disclaimer in the documentation
-
 
33
**      and/or other materials provided with the distribution.
-
 
34
**   3. Neither the name of STMicroelectronics nor the names of its contributors
25
**  using the Atollic TrueSTUDIO(R) product. The use of this file together
35
**      may be used to endorse or promote products derived from this software
26
**  with other tools than Atollic TrueSTUDIO(R) is not permitted.
36
**      without specific prior written permission.
-
 
37
**
-
 
38
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-
 
39
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-
 
40
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-
 
41
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-
 
42
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-
 
43
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-
 
44
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-
 
45
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-
 
46
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
 
47
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
**
48
**
28
*****************************************************************************
49
*****************************************************************************
29
*/
50
*/
30
 
51
 
31
/* Entry Point */
52
/* Entry Point */
32
ENTRY(Reset_Handler)
53
ENTRY(Reset_Handler)
33
 
54
 
34
/* Highest address of the user mode stack */
55
/* Highest address of the user mode stack */
35
_estack = 0x20014000;    /* end of RAM */
56
_estack = ORIGIN(RAM) + LENGTH(RAM);    /* end of RAM */
36
/* Generate a link error if heap and stack don't fit into RAM */
57
/* Generate a link error if heap and stack don't fit into RAM */
37
_Min_Heap_Size = 0x200;      /* required amount of heap  */
58
_Min_Heap_Size = 0x200;      /* required amount of heap  */
38
_Min_Stack_Size = 0x400; /* required amount of stack */
59
_Min_Stack_Size = 0x400; /* required amount of stack */
39
 
60
 
40
/* Specify the memory areas */
61
/* Specify the memory areas */
41
MEMORY
62
MEMORY
42
{
63
{
43
FLASH (rx)      : ORIGIN = 0x8000000, LENGTH = 512K
-
 
44
RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 80K
64
RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 80K
45
NVRAM (rx)     : ORIGIN = 0x08080000, LENGTH = 4K
65
FLASH (rx)      : ORIGIN = 0x8000000, LENGTH = 512K
46
}
66
}
47
 
67
 
48
/* Define output sections */
68
/* Define output sections */
49
SECTIONS
69
SECTIONS
50
{
70
{
Line 143... Line 163...
143
  } >RAM
163
  } >RAM
144
 
164
 
145
  /* User_heap_stack section, used to check that there is enough RAM left */
165
  /* User_heap_stack section, used to check that there is enough RAM left */
146
  ._user_heap_stack :
166
  ._user_heap_stack :
147
  {
167
  {
148
    . = ALIGN(4);
168
    . = ALIGN(8);
149
    PROVIDE ( end = . );
169
    PROVIDE ( end = . );
150
    PROVIDE ( _end = . );
170
    PROVIDE ( _end = . );
151
    . = . + _Min_Heap_Size;
171
    . = . + _Min_Heap_Size;
152
    . = . + _Min_Stack_Size;
172
    . = . + _Min_Stack_Size;
153
    . = ALIGN(4);
173
    . = ALIGN(8);
154
  } >RAM
174
  } >RAM
155
 
175
 
156
  
176
  
157
 
177
 
158
  /* Remove information from the standard libraries */
178
  /* Remove information from the standard libraries */
Line 161... Line 181...
161
    libc.a ( * )
181
    libc.a ( * )
162
    libm.a ( * )
182
    libm.a ( * )
163
    libgcc.a ( * )
183
    libgcc.a ( * )
164
  }
184
  }
165
 
185
 
166
 
-
 
167
 /* NVRAM image section : nothing gets stored here but the addresses are set up */
-
 
168
    .nvram_data (NOLOAD) :  
-
 
169
   {
-
 
170
   _nvr_base = .;
-
 
171
    KEEP ( *(.NVRAM_Data)) /* any __attribute__((section(".NVRAM_Data"))) section info to be put in here  */
-
 
172
   } >NVRAM 
-
 
173
 
-
 
174
 
-
 
175
 
-
 
176
   PROVIDE ( NVRAM_Base  = _nvr_base ); 
-
 
177
 
-
 
178
 
-
 
179
  .ARM.attributes 0 : { *(.ARM.attributes) }
186
  .ARM.attributes 0 : { *(.ARM.attributes) }
180
}
187
}
181
 
188
 
182
 
189