Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / NUCLEO-F767ZI / STM32F76xxI.ld @ 96621a83

History | View | Annotate | Download (4.428 KB)

1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2020  Thomas Schöpping et al.
4

    
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

    
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

    
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

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

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

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

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

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

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

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

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

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

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

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

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

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

    
92
/* Stack rules inclusion.*/
93
INCLUDE rules_stacks.ld
94

    
95
/*===========================================================================*/
96
/* Custom sections for STM32F7xx.                                            */
97
/*===========================================================================*/
98

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

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

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

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

    
130
/* Code rules inclusion.*/
131
INCLUDE rules_code.ld
132

    
133
/* Data rules inclusion.*/
134
INCLUDE rules_data.ld
135

    
136
/* Memory rules inclusion.*/
137
INCLUDE rules_memory.ld
138