1/****************************************************************************** 2* 3* Copyright (C) 2012 - 2015 Texas Instruments Incorporated - http://www.ti.com/ 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* GCC linker script for Texas Instruments MSP432P401R 34* 35* File creation date: 2015-09-03 36* 37******************************************************************************/ 38 39MEMORY 40{ 41 MAIN_FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x00040000 42 INFO_FLASH (RX) : ORIGIN = 0x00200000, LENGTH = 0x00004000 43 SRAM_CODE (RWX): ORIGIN = 0x01000000, LENGTH = 0x00010000 44 SRAM_DATA (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000 45} 46 47REGION_ALIAS("REGION_TEXT", MAIN_FLASH); 48REGION_ALIAS("REGION_BSS", SRAM_DATA); 49REGION_ALIAS("REGION_DATA", SRAM_DATA); 50REGION_ALIAS("REGION_STACK", SRAM_DATA); 51REGION_ALIAS("REGION_HEAP", SRAM_DATA); 52REGION_ALIAS("REGION_ARM_EXIDX", MAIN_FLASH); 53REGION_ALIAS("REGION_ARM_EXTAB", MAIN_FLASH); 54 55SECTIONS { 56 57 PROVIDE (_intvecs_base_address = 58 DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x0); 59 60 .intvecs (_intvecs_base_address) : AT (_intvecs_base_address) { 61 KEEP (*(.intvecs)) 62 } > REGION_TEXT 63 64 PROVIDE (_vtable_base_address = 65 DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20000000); 66 67 .vtable (_vtable_base_address) : AT (_vtable_base_address) { 68 KEEP (*(.vtable)) 69 } > REGION_DATA 70 71 .text : { 72 CREATE_OBJECT_SYMBOLS 73 KEEP (*(.text)) 74 *(.text.*) 75 . = ALIGN(0x4); 76 KEEP (*(.ctors)) 77 . = ALIGN(0x4); 78 KEEP (*(.dtors)) 79 . = ALIGN(0x4); 80 __init_array_start = .; 81 KEEP (*(.init_array*)) 82 __init_array_end = .; 83 *(.init) 84 *(.fini*) 85 } > REGION_TEXT AT> REGION_TEXT 86 87 .rodata : { 88 *(.rodata) 89 *(.rodata.*) 90 } > REGION_TEXT AT> REGION_TEXT 91 92 .ARM.exidx : { 93 __exidx_start = .; 94 *(.ARM.exidx* .gnu.linkonce.armexidx.*) 95 __exidx_end = .; 96 } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX 97 98 .ARM.extab : { 99 *(.ARM.extab* .gnu.linkonce.armextab.*) 100 } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB 101 102 __etext = .; 103 104 .data : { 105 __data_load__ = LOADADDR (.data); 106 __data_start__ = .; 107 KEEP (*(.data)) 108 KEEP (*(.data*)) 109 . = ALIGN (4); 110 __data_end__ = .; 111 } > REGION_DATA AT> REGION_TEXT 112 113 .bss : { 114 __bss_start__ = .; 115 *(.shbss) 116 KEEP (*(.bss)) 117 *(.bss.*) 118 *(COMMON) 119 . = ALIGN (4); 120 __bss_end__ = .; 121 } > REGION_BSS AT> REGION_BSS 122 123 .heap : { 124 __heap_start__ = .; 125 end = __heap_start__; 126 _end = end; 127 __end = end; 128 KEEP (*(.heap)) 129 __heap_end__ = .; 130 __HeapLimit = __heap_end__; 131 } > REGION_HEAP AT> REGION_HEAP 132 133 .stack (NOLOAD) : ALIGN(0x8) { 134 _stack = .; 135 __stack = .; 136 KEEP(*(.stack)) 137 } > REGION_STACK AT> REGION_STACK 138} 139 140