[processor-sdk/performance-audio-sr.git] / psdk_cust / pdk_k2g_1_0_1_2_eng / packages / ti / board / diag / common / K2G / linker.cmd
1 /**
2 * ============================================================================
3 * @n (C) Copyright 2016, 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 DIAG_MEM (RWIX): org = 0x0C060000, len = 0x00050000
44 DDR3_MEM (RWIX): org = 0x80000000, len = 0x00100000
45 }
47 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
48 OUTPUT_ARCH(arm)
50 SECTIONS
51 {
52 .startcode :
53 {
54 . = ALIGN(4);
55 *init.o (.text)
56 } >DIAG_MEM
58 .text :
59 {
60 . = ALIGN(4);
61 *(.text*)
62 *(.rodata*)
63 } >DIAG_MEM
65 .data :
66 {
67 . = ALIGN(4);
68 *(.data*)
69 } >DDR3_MEM
71 .bss :
72 {
73 . = ALIGN(4);
74 _bss_start = .;
75 *(.bss*)
76 *(COMMON)
77 _bss_end = .;
78 } >DDR3_MEM
80 .heap :
81 {
82 . = ALIGN(4);
83 __end__ = .;
84 end = __end__;
85 __HeapBase = __end__;
86 *(.heap*)
87 . = . + 0x40000;
88 __HeapLimit = .;
89 } >DDR3_MEM
91 .stack :
92 {
93 . = ALIGN(4);
94 __StackLimit = . ;
95 *(.stack*)
96 . = . + 0x8000;
97 __StackTop = .;
98 } >DDR3_MEM
99 _stack = __StackTop;
101 BOARD_IO_DELAY_CODE :
102 {
103 . = ALIGN(4);
104 *(BOARD_IO_DELAY_CODE*)
105 } > DIAG_MEM
107 BOARD_IO_DELAY_DATA :
108 {
109 . = ALIGN(4);
110 *(BOARD_IO_DELAY_DATA*)
111 } > DIAG_MEM
112 }