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