Subversion Repositories freemyipod

Rev

Go to most recent revision | Details | 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
 
16
#ifndef CODE_REGION
17
#define CODE_REGION SDRAM
18
#endif
19
#ifndef BSS_REGION
20
#define BSS_REGION SDRAM
21
#endif
22
#ifndef DMABSS_REGION
23
#define DMABSS_REGION SRAM
24
#endif
25
#ifndef STACK_REGION
26
#define STACK_REGION SRAM
27
#endif
28
 
29
#ifndef STACK_SIZE
30
#define STACK_SIZE 0x1000
31
#endif
32
 
33
#ifndef IRQ_STACK_SIZE
34
#define IRQ_STACK_SIZE 0x1000
35
#endif
36
 
37
#ifndef ABORT_STACK_SIZE
38
#define ABORT_STACK_SIZE 0
39
#endif
40
 
41
MEMORY
42
{
43
    SRAM : ORIGIN = SRAM_BASE, LENGTH = SRAM_SIZE
44
    SDRAM : ORIGIN = SDRAM_BASE, LENGTH = SDRAM_SIZE
45
}
46
 
47
_entry = _vectors;
48
ENTRY(_entry)
49
 
50
SECTIONS
51
{
52
 
53
    .text :
54
    {
55
        _text = .;
56
        KEEP(*(.vectors))
57
        *(.text)
58
        *(.text.*)
59
        *(.rodata)
60
        *(.rodata.*)
61
        *(.dmarodata)
62
        *(.dmarodata.*)
63
        *(.data)
64
        *(.data.*)
65
        *(.dmadata)
66
        *(.dmadata.*)
67
        _text_end = .;
68
        . = ALIGN(1 << CACHEALIGN_BITS);
69
    } >CODE_REGION
70
 
71
    _text_size = _text_end - _text;
72
 
73
    .bss (NOLOAD) :
74
    {
75
        . = ALIGN(1 << CACHEALIGN_BITS);
76
        _bss = .;
77
        *(.bss)
78
        *(.bss.*)
79
        *(COMMON)
80
        . = ALIGN(1 << CACHEALIGN_BITS);
81
        _bss_end = .;
82
    } >BSS_REGION
83
 
84
    _bss_size = _bss_end - _bss;
85
 
86
    .dmabss (NOLOAD) :
87
    {
88
        . = ALIGN(1 << CACHEALIGN_BITS);
89
        _dmabss = .;
90
        *(.dmabss)
91
        *(.dmabss.*)
92
        . = ALIGN(1 << CACHEALIGN_BITS);
93
        _dmabss_end = .;
94
    } >DMABSS_REGION
95
 
96
    _dmabss_size = _dmabss_end - _dmabss;
97
 
98
    .stack (NOLOAD) :
99
    {
100
        . = ALIGN(1 << CACHEALIGN_BITS);
101
        _stack = .;
102
        . = . + STACK_SIZE;
103
        _stack_top = .;
104
        . = . + IRQ_STACK_SIZE;
105
        _irq_stack_top = .;
106
        . = . + ABORT_STACK_SIZE;
107
        _abort_stack_top = .;
108
        . = ALIGN(1 << CACHEALIGN_BITS);
109
        _stack_end = .;
110
    } >STACK_REGION
111
 
112
    _stack_size = _stack_end - _stack;
113
 
114
    DISCARD :
115
    {
116
        *(.note.*)
117
    }
118
 
119
    .stab            0 : { *(.stab) }
120
    .stabstr         0 : { *(.stabstr) }
121
    .stab.excl       0 : { *(.stab.excl) }
122
    .stab.exclstr    0 : { *(.stab.exclstr) }
123
    .stab.index      0 : { *(.stab.index) }
124
    .stab.indexstr   0 : { *(.stab.indexstr) }
125
    .comment         0 : { *(.comment) }
126
    .debug           0 : { *(.debug) }
127
    .line            0 : { *(.line) }
128
    .debug_srcinfo   0 : { *(.debug_srcinfo) }
129
    .debug_sfnames   0 : { *(.debug_sfnames) }
130
    .debug_aranges   0 : { *(.debug_aranges) }
131
    .debug_pubnames  0 : { *(.debug_pubnames) }
132
    .debug_info      0 : { *(.debug_info .gnu.linkonce.wi.*) }
133
    .debug_abbrev    0 : { *(.debug_abbrev) }
134
    .debug_line      0 : { *(.debug_line) }
135
    .debug_frame     0 : { *(.debug_frame) }
136
    .debug_str       0 : { *(.debug_str) }
137
    .debug_loc       0 : { *(.debug_loc) }
138
    .debug_macinfo   0 : { *(.debug_macinfo) }
139
    .debug_weaknames 0 : { *(.debug_weaknames) }
140
    .debug_funcnames 0 : { *(.debug_funcnames) }
141
    .debug_typenames 0 : { *(.debug_typenames) }
142
    .debug_varnames  0 : { *(.debug_varnames) }
143
 
144
}