1 /**
2 * \file k2g_ddr.lds
3 *
4 * \brief This file is the linker script for k2g required for building
5 * applications with the gcc toolchain.
6 *
7 * \copyright Copyright (C) 2016 Texas Instruments Incorporated -
8 * http://www.ti.com/
9 */
11 /**
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 *
16 * Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 *
19 * Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the
22 * distribution.
23 *
24 * Neither the name of Texas Instruments Incorporated nor the names of
25 * its contributors may be used to endorse or promote products derived
26 * from this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 */
42 /*
43 ** The stack is kept at end of the image, and its size is 128 MB.
44 ** The heap section is placed above the stack to support I/O
45 ** operations using semi-hosting. The size of the section is 2KB.
46 */
48 MEMORY
49 {
50 DDR3_A15 : o = 0x80000000, l = 0x10000000 /* 256MB external DDR Bank 0 */
51 MSMCRAM : o = 0x0C000000, l = 0x000FFDFF /* internal RAM */
52 VECS : o = 0x0C0FFC00, l = 0x400 /* Vector area */
53 }
56 SECTIONS
57 {
58 BOARD_IO_DELAY_DATA : {*(BOARD_IO_DELAY_DATA)} AT> MSMCRAM
59 BOARD_IO_DELAY_CODE : {*(BOARD_IO_DELAY_CODE)} AT> MSMCRAM
60 .text : {*(.text)} > DDR3_A15
61 .data : {*(.data)} > DDR3_A15
62 .sbl_reg_log_bfr ALIGN(0x4): {} > MSMCRAM
63 .bss ALIGN(0x4):
64 {
65 _bss_start = . ;
66 *(.bss.*) *(COMMON);
67 _bss_end = . ;
68 } > DDR3_A15
70 . = ALIGN(4);
71 _end = .;
72 PROVIDE (end = .);
74 .stack ALIGN(0x8):
75 {
76 stack_start = .;
77 *(.stack.*) ;
78 . = . + 0x3000;
79 stack_end = .;
80 } > DDR3_A15
82 . = ALIGN(4);
83 __exidx_start = .;
84 PROVIDE(__exidx_start = __exidx_start);
86 .ARM.exidx :
87 {
88 *(.ARM.exidx* .gnu.linkonce.armexidx.*);
89 } > DDR3_A15
91 . = ALIGN(4);
92 __exidx_end = .;
93 PROVIDE(__exidx_end = __exidx_end);
95 .const ALIGN(0x4): {*(.const)} > DDR3_A15
96 .my_sect_ddr ALIGN(0x4): {*(.my_sect_ddr)} > DDR3_A15
98 _stack = stack_end;
99 }