Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / NUCLEO-F767ZI / STM32F76xxI.ld @ f38aba21

History | View | Annotate | Download (4.294 KB)

1
/*
2
    ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3

    
4
    Licensed under the Apache License, Version 2.0 (the "License");
5
    you may not use this file except in compliance with the License.
6
    You may obtain a copy of the License at
7

    
8
        http://www.apache.org/licenses/LICENSE-2.0
9

    
10
    Unless required by applicable law or agreed to in writing, software
11
    distributed under the License is distributed on an "AS IS" BASIS,
12
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
    See the License for the specific language governing permissions and
14
    limitations under the License.
15
*/
16

    
17
/*
18
 * STM32F76xxI generic setup.
19
 * 
20
 * RAM0 - Data, Heap.
21
 * RAM3 - Main Stack, Process Stack, BSS, NOCACHE, ETH.
22
 *
23
 * Notes:
24
 * BSS is placed in DTCM RAM in order to simplify DMA buffers management.
25
 */
26
MEMORY
27
{
28
    flash0  : org = 0x08000000, len = 2M        /* Flash as AXIM (writable) */
29
    flash1  : org = 0x00200000, len = 2M        /* Flash as ITCM */
30
    flash2  : org = 0x00000000, len = 0
31
    flash3  : org = 0x00000000, len = 0
32
    flash4  : org = 0x00000000, len = 0
33
    flash5  : org = 0x00000000, len = 0
34
    flash6  : org = 0x00000000, len = 0
35
    flash7  : org = 0x00000000, len = 0
36
    ram0    : org = 0x20020000, len = 384k      /* SRAM1 + SRAM2 */
37
    ram1    : org = 0x20020000, len = 368k      /* SRAM1 */
38
    ram2    : org = 0x2007C000, len = 16k       /* SRAM2 */
39
    ram3    : org = 0x20000000, len = 128k      /* DTCM-RAM */
40
    ram4    : org = 0x00000000, len = 16k       /* ITCM-RAM */
41
    ram5    : org = 0x40024000, len = 4k        /* BCKP SRAM */
42
    ram6    : org = 0x00000000, len = 0
43
    ram7    : org = 0x00000000, len = 0
44
}
45

    
46
/* For each data/text section two region are defined, a virtual region
47
   and a load region (_LMA suffix).*/
48

    
49
/* Flash region to be used for exception vectors.*/
50
REGION_ALIAS("VECTORS_FLASH", flash1);
51
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
52

    
53
/* Flash region to be used for constructors and destructors.*/
54
REGION_ALIAS("XTORS_FLASH", flash1);
55
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
56

    
57
/* Flash region to be used for code text.*/
58
REGION_ALIAS("TEXT_FLASH", flash1);
59
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
60

    
61
/* Flash region to be used for read only data.*/
62
REGION_ALIAS("RODATA_FLASH", flash0);
63
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
64

    
65
/* Flash region to be used for various.*/
66
REGION_ALIAS("VARIOUS_FLASH", flash1);
67
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
68

    
69
/* Flash region to be used for RAM(n) initialization data.*/
70
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
71

    
72
/* RAM region to be used for Main stack. This stack accommodates the processing
73
   of all exceptions and interrupts.*/
74
REGION_ALIAS("MAIN_STACK_RAM", ram3);
75

    
76
/* RAM region to be used for the process stack. This is the stack used by
77
   the main() function.*/
78
REGION_ALIAS("PROCESS_STACK_RAM", ram3);
79

    
80
/* RAM region to be used for data segment.*/
81
REGION_ALIAS("DATA_RAM", ram0);
82
REGION_ALIAS("DATA_RAM_LMA", flash0);
83

    
84
/* RAM region to be used for BSS segment.*/
85
REGION_ALIAS("BSS_RAM", ram3);
86

    
87
/* RAM region to be used for the default heap.*/
88
REGION_ALIAS("HEAP_RAM", ram0);
89

    
90
/* Stack rules inclusion.*/
91
INCLUDE rules_stacks.ld
92

    
93
/*===========================================================================*/
94
/* Custom sections for STM32F7xx.                                            */
95
/*===========================================================================*/
96

    
97
/* RAM region to be used for nocache segment.*/
98
REGION_ALIAS("NOCACHE_RAM", ram3);
99

    
100
/* RAM region to be used for eth segment.*/
101
REGION_ALIAS("ETH_RAM", ram3);
102

    
103
SECTIONS
104
{
105
    /* Special section for non cache-able areas.*/
106
    .nocache (NOLOAD) : ALIGN(4)
107
    {
108
        __nocache_base__ = .;
109
        *(.nocache)
110
        *(.nocache.*)
111
        *(.bss.__nocache_*)
112
        . = ALIGN(4);
113
        __nocache_end__ = .;
114
    } > NOCACHE_RAM
115

    
116
    /* Special section for Ethernet DMA non cache-able areas.*/
117
    .eth (NOLOAD) : ALIGN(4)
118
    {
119
        __eth_base__ = .;
120
        *(.eth)
121
        *(.eth.*)
122
        *(.bss.__eth_*)
123
        . = ALIGN(4);
124
        __eth_end__ = .;
125
    } > ETH_RAM
126
}
127

    
128
/* Code rules inclusion.*/
129
INCLUDE rules_code.ld
130

    
131
/* Data rules inclusion.*/
132
INCLUDE rules_data.ld
133

    
134
/* Memory rules inclusion.*/
135
INCLUDE rules_memory.ld
136