Subversion Repositories freemyipod

Rev

Rev 881 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
881 theseven 1
#include "global.h"
2
 
3
#ifndef SRAM_BASE
4
#define SRAM_BASE 0x22000000
5
#endif
6
#ifndef SRAM_SIZE
7
#define SRAM_SIZE DEFAULT_SRAM_SIZE
8
#endif
9
#ifndef SDRAM_BASE
10
#define SDRAM_BASE 0x08000000
11
#endif
12
#ifndef SDRAM_SIZE
13
#define SDRAM_SIZE DEFAULT_SDRAM_SIZE
14
#endif
15
 
946 theseven 16
#ifndef VECTORS_REGION
17
#define VECTORS_REGION SRAM
18
#endif
19
#ifndef VECTORS_BASE
20
#define VECTORS_BASE SRAM_BASE
21
#endif
881 theseven 22
#ifndef CODE_REGION
23
#define CODE_REGION SDRAM
24
#endif
946 theseven 25
#ifndef CODE_BASE
26
#define CODE_BASE
27
#endif
881 theseven 28
#ifndef BSS_REGION
29
#define BSS_REGION SDRAM
30
#endif
946 theseven 31
#ifndef BSS_BASE
32
#define BSS_BASE
33
#endif
881 theseven 34
#ifndef DMABSS_REGION
35
#define DMABSS_REGION SRAM
36
#endif
946 theseven 37
#ifndef DMABSS_BASE
38
#define DMABSS_BASE
39
#endif
881 theseven 40
#ifndef STACK_REGION
41
#define STACK_REGION SRAM
42
#endif
946 theseven 43
#ifndef STACK_BASE
44
#define STACK_BASE
45
#endif
881 theseven 46
 
47
#ifndef STACK_SIZE
48
#define STACK_SIZE 0x1000
49
#endif
50
 
51
#ifndef IRQ_STACK_SIZE
52
#define IRQ_STACK_SIZE 0x1000
53
#endif
54
 
55
#ifndef ABORT_STACK_SIZE
56
#define ABORT_STACK_SIZE 0
57
#endif
58
 
59
MEMORY
60
{
61
    SRAM : ORIGIN = SRAM_BASE, LENGTH = SRAM_SIZE
62
    SDRAM : ORIGIN = SDRAM_BASE, LENGTH = SDRAM_SIZE
63
}
64
 
946 theseven 65
_entry = _init;
881 theseven 66
ENTRY(_entry)
67
 
68
SECTIONS
69
{
70
 
946 theseven 71
    .text CODE_BASE :
881 theseven 72
    {
946 theseven 73
        _init = .;
74
        KEEP(*(.init))
75
        _init_end = .;
881 theseven 76
        _text = .;
77
        *(.text)
78
        *(.text.*)
79
        *(.rodata)
80
        *(.rodata.*)
81
        *(.dmarodata)
82
        *(.dmarodata.*)
83
        *(.data)
84
        *(.data.*)
85
        *(.dmadata)
86
        *(.dmadata.*)
87
        _text_end = .;
88
        . = ALIGN(1 << CACHEALIGN_BITS);
89
    } >CODE_REGION
90
 
91
    _text_size = _text_end - _text;
92
 
946 theseven 93
    .vectors VECTORS_BASE :
881 theseven 94
    {
946 theseven 95
        _vectors = .;
96
        KEEP(*(.vectors))
97
        _vectors_end = .;
98
    } >VECTORS_REGION AT>CODE_REGION
99
 
100
    _vectors_src = LOADADDR(.vectors);
101
    _vectors_size = _vectors_end - _vectors;
102
 
103
    .dummy _text_end - 4 :
104
    {
105
        . += 4;
881 theseven 106
        . = ALIGN(1 << CACHEALIGN_BITS);
946 theseven 107
    } >CODE_REGION
108
 
109
    .bss BSS_BASE (NOLOAD) :
110
    {
111
        . = ALIGN(1 << CACHEALIGN_BITS);
881 theseven 112
        _bss = .;
113
        *(.bss)
114
        *(.bss.*)
115
        *(COMMON)
116
        . = ALIGN(1 << CACHEALIGN_BITS);
117
        _bss_end = .;
118
    } >BSS_REGION
119
 
120
    _bss_size = _bss_end - _bss;
121
 
946 theseven 122
    .dmabss DMABSS_BASE (NOLOAD) :
881 theseven 123
    {
124
        . = ALIGN(1 << CACHEALIGN_BITS);
125
        _dmabss = .;
126
        *(.dmabss)
127
        *(.dmabss.*)
128
        . = ALIGN(1 << CACHEALIGN_BITS);
129
        _dmabss_end = .;
130
    } >DMABSS_REGION
131
 
132
    _dmabss_size = _dmabss_end - _dmabss;
133
 
946 theseven 134
    .stack STACK_BASE (NOLOAD) :
881 theseven 135
    {
136
        . = ALIGN(1 << CACHEALIGN_BITS);
137
        _stack = .;
138
        . = . + STACK_SIZE;
139
        _stack_top = .;
140
        . = . + IRQ_STACK_SIZE;
141
        _irq_stack_top = .;
142
        . = . + ABORT_STACK_SIZE;
143
        _abort_stack_top = .;
144
        . = ALIGN(1 << CACHEALIGN_BITS);
145
        _stack_end = .;
146
    } >STACK_REGION
147
 
148
    _stack_size = _stack_end - _stack;
149
 
150
    DISCARD :
151
    {
152
        *(.note.*)
153
    }
154
 
155
    .stab            0 : { *(.stab) }
156
    .stabstr         0 : { *(.stabstr) }
157
    .stab.excl       0 : { *(.stab.excl) }
158
    .stab.exclstr    0 : { *(.stab.exclstr) }
159
    .stab.index      0 : { *(.stab.index) }
160
    .stab.indexstr   0 : { *(.stab.indexstr) }
161
    .comment         0 : { *(.comment) }
162
    .debug           0 : { *(.debug) }
163
    .line            0 : { *(.line) }
164
    .debug_srcinfo   0 : { *(.debug_srcinfo) }
165
    .debug_sfnames   0 : { *(.debug_sfnames) }
166
    .debug_aranges   0 : { *(.debug_aranges) }
167
    .debug_pubnames  0 : { *(.debug_pubnames) }
168
    .debug_info      0 : { *(.debug_info .gnu.linkonce.wi.*) }
169
    .debug_abbrev    0 : { *(.debug_abbrev) }
170
    .debug_line      0 : { *(.debug_line) }
171
    .debug_frame     0 : { *(.debug_frame) }
172
    .debug_str       0 : { *(.debug_str) }
173
    .debug_loc       0 : { *(.debug_loc) }
174
    .debug_macinfo   0 : { *(.debug_macinfo) }
175
    .debug_weaknames 0 : { *(.debug_weaknames) }
176
    .debug_funcnames 0 : { *(.debug_funcnames) }
177
    .debug_typenames 0 : { *(.debug_typenames) }
178
    .debug_varnames  0 : { *(.debug_varnames) }
179
 
180
}