1 /**
2 * ============================================================================
3 * @n (C) Copyright 2016-2017, Texas Instruments, Inc.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
35 /*
36 ** The stack is kept at end of the image, and its size is 128 MB.
37 ** The heap section is placed above the stack to support I/O
38 ** operations using semi-hosting. The size of the section is 2KB.
39 */
41 MEMORY
42 {
43 VECS (RWIX): org = 0x0C000000, len = 0x400 /* Vector area */
44 DIAG_MEM (RWIX): org = 0x0C060000, len = 0x00050000
45 DDR3_MEM (RWIX): org = 0x80000000, len = 0x00100000
46 APP_CACHED_DATA_BLK1_MEM (RWIX): org = 0x80100000, len = 0x00100000
47 }
49 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
50 OUTPUT_ARCH(arm)
52 SECTIONS
53 {
54 .startcode :
55 {
56 . = ALIGN(4);
57 *init.o (.text)
58 } >DIAG_MEM
60 .text :
61 {
62 . = ALIGN(4);
63 *(.text*)
64 *(.rodata*)
65 } >DIAG_MEM
67 .data :
68 {
69 . = ALIGN(4);
70 *(.data*)
71 } >DDR3_MEM
73 .bss :
74 {
75 . = ALIGN(4);
76 _bss_start = .;
77 *(.bss*)
78 *(COMMON)
79 _bss_end = .;
80 } >DDR3_MEM
82 .heap :
83 {
84 . = ALIGN(4);
85 __end__ = .;
86 end = __end__;
87 __HeapBase = __end__;
88 *(.heap*)
89 . = . + 0x40000;
90 __HeapLimit = .;
91 } >DDR3_MEM
93 .stack :
94 {
95 . = ALIGN(8);
96 __StackLimit = . ;
97 *(.stack*)
98 . = . + 0x8000;
99 __StackTop = .;
100 } >DDR3_MEM
101 _stack = __StackTop;
103 BOARD_IO_DELAY_CODE :
104 {
105 . = ALIGN(4);
106 *(BOARD_IO_DELAY_CODE*)
107 } > DIAG_MEM
109 BOARD_IO_DELAY_DATA :
110 {
111 . = ALIGN(4);
112 *(BOARD_IO_DELAY_DATA*)
113 } > DIAG_MEM
115 __vector_base__ = ORIGIN(VECS);
117 PRU0_REV2_IMEM : {
118 pru_imem0_rev2_start = .;
119 KEEP(*(PRU0_REV2_IMEM))
120 pru_imem0_rev2_end = .;
121 } > APP_CACHED_DATA_BLK1_MEM
122 PRU0_REV2_DMEM : {
123 pru_dmem0_rev2_start = .;
124 KEEP (*(PRU0_REV2_DMEM))
125 pru_dmem0_rev2_end = .;
126 } > APP_CACHED_DATA_BLK1_MEM
127 PRU0_REV2_EXT : {
128 KEEP (*(PRU0_REV2_EXT))
129 } > APP_CACHED_DATA_BLK1_MEM
130 PRU1_REV2_IMEM : {
131 pru_imem1_rev2_start = .;
132 KEEP (*(PRU1_REV2_IMEM))
133 pru_imem1_rev2_end = .;
134 } > APP_CACHED_DATA_BLK1_MEM
135 PRU1_REV2_DMEM : {
136 pru_dmem1_rev2_start = .;
137 KEEP (*(PRU1_REV2_DMEM))
138 pru_dmem1_rev2_end = .;
139 } > APP_CACHED_DATA_BLK1_MEM
140 PRU1_REV2_EXT : {
141 KEEP (*(PRU1_REV2_EXT))
142 } > APP_CACHED_DATA_BLK1_MEM
143 }