1*c3086949SMatthias Ringwald/* 2*c3086949SMatthias Ringwald Linker File for Renesas FSP 3*c3086949SMatthias Ringwald*/ 4*c3086949SMatthias Ringwald 5*c3086949SMatthias RingwaldINCLUDE memory_regions.ld 6*c3086949SMatthias Ringwald 7*c3086949SMatthias Ringwald/* Uncomment and set XIP_SECONDARY_SLOT_IMAGE to 1 below for the secondary XIP application image.*/ 8*c3086949SMatthias Ringwald/* 9*c3086949SMatthias Ringwald XIP_SECONDARY_SLOT_IMAGE = 1; 10*c3086949SMatthias Ringwald*/ 11*c3086949SMatthias Ringwald 12*c3086949SMatthias RingwaldQSPI_FLASH_PRV_LENGTH = DEFINED(QSPI_FLASH_SIZE) ? ABSOLUTE(QSPI_FLASH_SIZE) : ABSOLUTE(QSPI_FLASH_LENGTH); 13*c3086949SMatthias RingwaldOSPI_DEVICE_0_PRV_LENGTH = DEFINED(OSPI_DEVICE_0_SIZE) ? ABSOLUTE(OSPI_DEVICE_0_SIZE) : ABSOLUTE(OSPI_DEVICE_0_LENGTH); 14*c3086949SMatthias RingwaldOSPI_DEVICE_1_PRV_LENGTH = DEFINED(OSPI_DEVICE_1_SIZE) ? ABSOLUTE(OSPI_DEVICE_1_SIZE) : ABSOLUTE(OSPI_DEVICE_1_LENGTH); 15*c3086949SMatthias Ringwald 16*c3086949SMatthias Ringwald/* If a flat (secure) project has DEFINED RAM_NS_BUFFER_LENGTH, then emit IDAU symbols to allocate non-secure RAM. */ 17*c3086949SMatthias Ringwald__RESERVE_NS_RAM = !DEFINED(PROJECT_NONSECURE) && DEFINED(RAM_NS_BUFFER_LENGTH) && (OPTION_SETTING_S_LENGTH != 0); 18*c3086949SMatthias Ringwald 19*c3086949SMatthias RingwaldRAM_NS_BUFFER_BLOCK_LENGTH = DEFINED(RAM_NS_BUFFER_LENGTH) ? ALIGN(RAM_NS_BUFFER_LENGTH, 8192) : 0; 20*c3086949SMatthias RingwaldRAM_NS_BUFFER_LENGTH = DEFINED(RAM_NS_BUFFER_LENGTH) ? RAM_NS_BUFFER_LENGTH : 0; 21*c3086949SMatthias RingwaldRAM_NS_BUFFER_START = RAM_START + RAM_LENGTH - RAM_NS_BUFFER_LENGTH; 22*c3086949SMatthias RingwaldRAM_NS_BUFFER_BLOCK_START = RAM_START + RAM_LENGTH - RAM_NS_BUFFER_BLOCK_LENGTH; 23*c3086949SMatthias Ringwald 24*c3086949SMatthias RingwaldOPTION_SETTING_START_NS = 0x0100A180; 25*c3086949SMatthias Ringwald 26*c3086949SMatthias Ringwald/* This definition is used to avoid moving the counter in OPTION_SETTING regions for projects that should not configure option settings. 27*c3086949SMatthias Ringwald * Bootloader images do not configure option settings because they are owned by the bootloader. 28*c3086949SMatthias Ringwald * FSP_BOOTABLE_IMAGE is only defined in bootloader images. */ 29*c3086949SMatthias Ringwald__bl_FSP_BOOTABLE_IMAGE = 1; 30*c3086949SMatthias Ringwald__bln_FSP_BOOTABLE_IMAGE = 1; 31*c3086949SMatthias RingwaldPROJECT_SECURE_OR_FLAT = !DEFINED(PROJECT_NONSECURE) && OPTION_SETTING_LENGTH && !DEFINED(FSP_BOOTABLE_IMAGE); 32*c3086949SMatthias RingwaldUSE_OPTION_SETTING_NS = DEFINED(PROJECT_NONSECURE) && !DEFINED(FSP_BOOTABLE_IMAGE); 33*c3086949SMatthias Ringwald 34*c3086949SMatthias Ringwald__bl_FLASH_IMAGE_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 35*c3086949SMatthias Ringwald FLASH_APPLICATION_IMAGE_NUMBER == 1 ? FLASH_BOOTLOADER_LENGTH + FLASH_BOOTLOADER_HEADER_LENGTH : 36*c3086949SMatthias Ringwald FLASH_BOOTLOADER_LENGTH + FLASH_BOOTLOADER_SCRATCH_LENGTH + FLASH_APPLICATION_S_LENGTH + FLASH_BOOTLOADER_HEADER_LENGTH; 37*c3086949SMatthias Ringwald__bl_FLASH_IMAGE_LENGTH = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 38*c3086949SMatthias Ringwald FLASH_APPLICATION_S_LENGTH - FLASH_BOOTLOADER_HEADER_LENGTH; 39*c3086949SMatthias Ringwald__bl_FLASH_IMAGE_END = __bl_FLASH_IMAGE_START + __bl_FLASH_IMAGE_LENGTH; 40*c3086949SMatthias Ringwald__bl_XIP_SECONDARY_FLASH_IMAGE_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 41*c3086949SMatthias Ringwald FLASH_BOOTLOADER_LENGTH + FLASH_APPLICATION_S_LENGTH + FLASH_BOOTLOADER_HEADER_LENGTH; 42*c3086949SMatthias Ringwald__bl_XIP_SECONDARY_FLASH_IMAGE_END = __bl_XIP_SECONDARY_FLASH_IMAGE_START + __bl_FLASH_IMAGE_LENGTH; 43*c3086949SMatthias Ringwald__bl_FLASH_NS_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 44*c3086949SMatthias Ringwald FLASH_APPLICATION_NS_LENGTH == 0 ? __bl_FLASH_IMAGE_END : 45*c3086949SMatthias Ringwald __bl_FLASH_IMAGE_START - FLASH_BOOTLOADER_HEADER_LENGTH + FLASH_APPLICATION_S_LENGTH; 46*c3086949SMatthias Ringwald__bl_FLASH_NSC_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 47*c3086949SMatthias Ringwald FLASH_APPLICATION_NS_LENGTH == 0 ? __bl_FLASH_IMAGE_END : 48*c3086949SMatthias Ringwald __bl_FLASH_NS_START - FLASH_APPLICATION_NSC_LENGTH; 49*c3086949SMatthias Ringwald__bl_RAM_NS_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 50*c3086949SMatthias Ringwald FLASH_APPLICATION_NS_LENGTH == 0 ? RAM_START + RAM_LENGTH : 51*c3086949SMatthias Ringwald RAM_START + RAM_LENGTH - RAM_APPLICATION_NS_LENGTH; 52*c3086949SMatthias Ringwald__bl_RAM_NSC_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 53*c3086949SMatthias Ringwald FLASH_APPLICATION_NS_LENGTH == 0 ? RAM_START + RAM_LENGTH : 54*c3086949SMatthias Ringwald __bl_RAM_NS_START - RAM_APPLICATION_NSC_LENGTH; 55*c3086949SMatthias Ringwald__bl_FLASH_NS_IMAGE_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 56*c3086949SMatthias Ringwald FLASH_APPLICATION_NS_LENGTH == 0 ? __bl_FLASH_IMAGE_END : 57*c3086949SMatthias Ringwald __bl_FLASH_NS_START + FLASH_BOOTLOADER_HEADER_LENGTH_2; 58*c3086949SMatthias Ringwald__bln_FLASH_IMAGE_START = __bl_FLASH_NS_IMAGE_START; 59*c3086949SMatthias Ringwald__bln_FLASH_IMAGE_LENGTH = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 : 60*c3086949SMatthias Ringwald FLASH_APPLICATION_NS_LENGTH == 0 ? __bl_FLASH_IMAGE_END : 61*c3086949SMatthias Ringwald FLASH_APPLICATION_NS_LENGTH - FLASH_BOOTLOADER_HEADER_LENGTH_2; 62*c3086949SMatthias Ringwald 63*c3086949SMatthias RingwaldXIP_SECONDARY_SLOT_IMAGE = DEFINED(XIP_SECONDARY_SLOT_IMAGE) ? XIP_SECONDARY_SLOT_IMAGE : 0; 64*c3086949SMatthias RingwaldFLASH_ORIGIN = !DEFINED(FLASH_IMAGE_START) ? FLASH_START : 65*c3086949SMatthias Ringwald XIP_SECONDARY_SLOT_IMAGE == 1 ? XIP_SECONDARY_FLASH_IMAGE_START : 66*c3086949SMatthias Ringwald FLASH_IMAGE_START; 67*c3086949SMatthias RingwaldLIMITED_FLASH_LENGTH = DEFINED(FLASH_IMAGE_LENGTH) ? FLASH_IMAGE_LENGTH : 68*c3086949SMatthias Ringwald DEFINED(FLASH_BOOTLOADER_LENGTH) ? FLASH_BOOTLOADER_LENGTH : 69*c3086949SMatthias Ringwald FLASH_LENGTH; 70*c3086949SMatthias Ringwald 71*c3086949SMatthias Ringwald/* Define memory regions. */ 72*c3086949SMatthias RingwaldMEMORY 73*c3086949SMatthias Ringwald{ 74*c3086949SMatthias Ringwald FLASH (rx) : ORIGIN = FLASH_ORIGIN, LENGTH = LIMITED_FLASH_LENGTH 75*c3086949SMatthias Ringwald RAM (rwx) : ORIGIN = RAM_START, LENGTH = RAM_LENGTH 76*c3086949SMatthias Ringwald DATA_FLASH (rx) : ORIGIN = DATA_FLASH_START, LENGTH = DATA_FLASH_LENGTH 77*c3086949SMatthias Ringwald QSPI_FLASH (rx) : ORIGIN = QSPI_FLASH_START, LENGTH = QSPI_FLASH_PRV_LENGTH 78*c3086949SMatthias Ringwald OSPI_DEVICE_0 (rx) : ORIGIN = OSPI_DEVICE_0_START, LENGTH = OSPI_DEVICE_0_PRV_LENGTH 79*c3086949SMatthias Ringwald OSPI_DEVICE_1 (rx) : ORIGIN = OSPI_DEVICE_1_START, LENGTH = OSPI_DEVICE_1_PRV_LENGTH 80*c3086949SMatthias Ringwald OSPI_DEVICE_0_RAM (rwx) : ORIGIN = OSPI_DEVICE_0_START, LENGTH = OSPI_DEVICE_0_PRV_LENGTH 81*c3086949SMatthias Ringwald OSPI_DEVICE_1_RAM (rwx) : ORIGIN = OSPI_DEVICE_1_START, LENGTH = OSPI_DEVICE_1_PRV_LENGTH 82*c3086949SMatthias Ringwald SDRAM (rwx) : ORIGIN = SDRAM_START, LENGTH = SDRAM_LENGTH 83*c3086949SMatthias Ringwald OPTION_SETTING (r): ORIGIN = OPTION_SETTING_START, LENGTH = OPTION_SETTING_LENGTH 84*c3086949SMatthias Ringwald OPTION_SETTING_S (r): ORIGIN = OPTION_SETTING_S_START, LENGTH = OPTION_SETTING_S_LENGTH 85*c3086949SMatthias Ringwald ID_CODE (rx) : ORIGIN = ID_CODE_START, LENGTH = ID_CODE_LENGTH 86*c3086949SMatthias Ringwald} 87*c3086949SMatthias Ringwald 88*c3086949SMatthias Ringwald/* Library configurations */ 89*c3086949SMatthias RingwaldGROUP(libgcc.a libc.a libm.a libnosys.a) 90*c3086949SMatthias Ringwald 91*c3086949SMatthias Ringwald/* Linker script to place sections and symbol values. Should be used together 92*c3086949SMatthias Ringwald * with other linker script that defines memory regions FLASH and RAM. 93*c3086949SMatthias Ringwald * It references following symbols, which must be DEFINED in code: 94*c3086949SMatthias Ringwald * Reset_Handler : Entry of reset handler 95*c3086949SMatthias Ringwald * 96*c3086949SMatthias Ringwald * It defines following symbols, which code can use without definition: 97*c3086949SMatthias Ringwald * __exidx_start 98*c3086949SMatthias Ringwald * __exidx_end 99*c3086949SMatthias Ringwald * __copy_table_start__ 100*c3086949SMatthias Ringwald * __copy_table_end__ 101*c3086949SMatthias Ringwald * __zero_table_start__ 102*c3086949SMatthias Ringwald * __zero_table_end__ 103*c3086949SMatthias Ringwald * __etext 104*c3086949SMatthias Ringwald * __data_start__ 105*c3086949SMatthias Ringwald * __preinit_array_start 106*c3086949SMatthias Ringwald * __preinit_array_end 107*c3086949SMatthias Ringwald * __init_array_start 108*c3086949SMatthias Ringwald * __init_array_end 109*c3086949SMatthias Ringwald * __fini_array_start 110*c3086949SMatthias Ringwald * __fini_array_end 111*c3086949SMatthias Ringwald * __data_end__ 112*c3086949SMatthias Ringwald * __bss_start__ 113*c3086949SMatthias Ringwald * __bss_end__ 114*c3086949SMatthias Ringwald * __HeapLimit 115*c3086949SMatthias Ringwald * __StackLimit 116*c3086949SMatthias Ringwald * __StackTop 117*c3086949SMatthias Ringwald * __stack 118*c3086949SMatthias Ringwald * __Vectors_End 119*c3086949SMatthias Ringwald * __Vectors_Size 120*c3086949SMatthias Ringwald * __qspi_flash_start__ 121*c3086949SMatthias Ringwald * __qspi_flash_end__ 122*c3086949SMatthias Ringwald * __qspi_flash_code_size__ 123*c3086949SMatthias Ringwald * __qspi_region_max_size__ 124*c3086949SMatthias Ringwald * __qspi_region_start_address__ 125*c3086949SMatthias Ringwald * __qspi_region_end_address__ 126*c3086949SMatthias Ringwald * __ospi_device_0_start__ 127*c3086949SMatthias Ringwald * __ospi_device_0_end__ 128*c3086949SMatthias Ringwald * __ospi_device_0_code_size__ 129*c3086949SMatthias Ringwald * __ospi_device_0_region_max_size__ 130*c3086949SMatthias Ringwald * __ospi_device_0_region_start_address__ 131*c3086949SMatthias Ringwald * __ospi_device_0_region_end_address__ 132*c3086949SMatthias Ringwald * __ospi_device_1_start__ 133*c3086949SMatthias Ringwald * __ospi_device_1_end__ 134*c3086949SMatthias Ringwald * __ospi_device_1_code_size__ 135*c3086949SMatthias Ringwald * __ospi_device_1_region_max_size__ 136*c3086949SMatthias Ringwald * __ospi_device_1_region_start_address__ 137*c3086949SMatthias Ringwald * __ospi_device_1_region_end_address__ 138*c3086949SMatthias Ringwald */ 139*c3086949SMatthias RingwaldENTRY(Reset_Handler) 140*c3086949SMatthias Ringwald 141*c3086949SMatthias RingwaldSECTIONS 142*c3086949SMatthias Ringwald{ 143*c3086949SMatthias Ringwald .text : 144*c3086949SMatthias Ringwald { 145*c3086949SMatthias Ringwald __tz_FLASH_S = ABSOLUTE(FLASH_START); 146*c3086949SMatthias Ringwald __ROM_Start = .; 147*c3086949SMatthias Ringwald 148*c3086949SMatthias Ringwald /* Even though the vector table is not 256 entries (1KB) long, we still allocate that much 149*c3086949SMatthias Ringwald * space because ROM registers are at address 0x400 and there is very little space 150*c3086949SMatthias Ringwald * in between. */ 151*c3086949SMatthias Ringwald KEEP(*(.fixed_vectors*)) 152*c3086949SMatthias Ringwald KEEP(*(.application_vectors*)) 153*c3086949SMatthias Ringwald __Vectors_End = .; 154*c3086949SMatthias Ringwald 155*c3086949SMatthias Ringwald /* ROM Registers start at address 0x00000400 for devices that do not have the OPTION_SETTING region. */ 156*c3086949SMatthias Ringwald . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400; 157*c3086949SMatthias Ringwald KEEP(*(.rom_registers*)) 158*c3086949SMatthias Ringwald 159*c3086949SMatthias Ringwald /* Reserving 0x100 bytes of space for ROM registers. */ 160*c3086949SMatthias Ringwald . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500; 161*c3086949SMatthias Ringwald 162*c3086949SMatthias Ringwald /* Allocate flash write-boundary-aligned 163*c3086949SMatthias Ringwald * space for sce9 wrapped public keys for mcuboot if the module is used. 164*c3086949SMatthias Ringwald */ 165*c3086949SMatthias Ringwald . = ALIGN(128); 166*c3086949SMatthias Ringwald KEEP(*(.mcuboot_sce9_key*)) 167*c3086949SMatthias Ringwald 168*c3086949SMatthias Ringwald *(.text*) 169*c3086949SMatthias Ringwald 170*c3086949SMatthias Ringwald KEEP(*(.version)) 171*c3086949SMatthias Ringwald KEEP(*(.init)) 172*c3086949SMatthias Ringwald KEEP(*(.fini)) 173*c3086949SMatthias Ringwald 174*c3086949SMatthias Ringwald /* .ctors */ 175*c3086949SMatthias Ringwald *crtbegin.o(.ctors) 176*c3086949SMatthias Ringwald *crtbegin?.o(.ctors) 177*c3086949SMatthias Ringwald *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) 178*c3086949SMatthias Ringwald *(SORT(.ctors.*)) 179*c3086949SMatthias Ringwald *(.ctors) 180*c3086949SMatthias Ringwald 181*c3086949SMatthias Ringwald /* .dtors */ 182*c3086949SMatthias Ringwald *crtbegin.o(.dtors) 183*c3086949SMatthias Ringwald *crtbegin?.o(.dtors) 184*c3086949SMatthias Ringwald *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) 185*c3086949SMatthias Ringwald *(SORT(.dtors.*)) 186*c3086949SMatthias Ringwald *(.dtors) 187*c3086949SMatthias Ringwald 188*c3086949SMatthias Ringwald *(.rodata*) 189*c3086949SMatthias Ringwald __usb_dev_descriptor_start_fs = .; 190*c3086949SMatthias Ringwald KEEP(*(.usb_device_desc_fs*)) 191*c3086949SMatthias Ringwald __usb_cfg_descriptor_start_fs = .; 192*c3086949SMatthias Ringwald KEEP(*(.usb_config_desc_fs*)) 193*c3086949SMatthias Ringwald __usb_interface_descriptor_start_fs = .; 194*c3086949SMatthias Ringwald KEEP(*(.usb_interface_desc_fs*)) 195*c3086949SMatthias Ringwald __usb_descriptor_end_fs = .; 196*c3086949SMatthias Ringwald __usb_dev_descriptor_start_hs = .; 197*c3086949SMatthias Ringwald KEEP(*(.usb_device_desc_hs*)) 198*c3086949SMatthias Ringwald __usb_cfg_descriptor_start_hs = .; 199*c3086949SMatthias Ringwald KEEP(*(.usb_config_desc_hs*)) 200*c3086949SMatthias Ringwald __usb_interface_descriptor_start_hs = .; 201*c3086949SMatthias Ringwald KEEP(*(.usb_interface_desc_hs*)) 202*c3086949SMatthias Ringwald __usb_descriptor_end_hs = .; 203*c3086949SMatthias Ringwald 204*c3086949SMatthias Ringwald KEEP(*(.eh_frame*)) 205*c3086949SMatthias Ringwald 206*c3086949SMatthias Ringwald __ROM_End = .; 207*c3086949SMatthias Ringwald } > FLASH = 0xFF 208*c3086949SMatthias Ringwald 209*c3086949SMatthias Ringwald __Vectors_Size = __Vectors_End - __Vectors; 210*c3086949SMatthias Ringwald 211*c3086949SMatthias Ringwald .ARM.extab : 212*c3086949SMatthias Ringwald { 213*c3086949SMatthias Ringwald *(.ARM.extab* .gnu.linkonce.armextab.*) 214*c3086949SMatthias Ringwald } > FLASH 215*c3086949SMatthias Ringwald 216*c3086949SMatthias Ringwald __exidx_start = .; 217*c3086949SMatthias Ringwald .ARM.exidx : 218*c3086949SMatthias Ringwald { 219*c3086949SMatthias Ringwald *(.ARM.exidx* .gnu.linkonce.armexidx.*) 220*c3086949SMatthias Ringwald } > FLASH 221*c3086949SMatthias Ringwald __exidx_end = .; 222*c3086949SMatthias Ringwald 223*c3086949SMatthias Ringwald /* To copy multiple ROM to RAM sections, 224*c3086949SMatthias Ringwald * uncomment .copy.table section and, 225*c3086949SMatthias Ringwald * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ 226*c3086949SMatthias Ringwald /* 227*c3086949SMatthias Ringwald .copy.table : 228*c3086949SMatthias Ringwald { 229*c3086949SMatthias Ringwald . = ALIGN(4); 230*c3086949SMatthias Ringwald __copy_table_start__ = .; 231*c3086949SMatthias Ringwald LONG (__etext) 232*c3086949SMatthias Ringwald LONG (__data_start__) 233*c3086949SMatthias Ringwald LONG (__data_end__ - __data_start__) 234*c3086949SMatthias Ringwald LONG (__etext2) 235*c3086949SMatthias Ringwald LONG (__data2_start__) 236*c3086949SMatthias Ringwald LONG (__data2_end__ - __data2_start__) 237*c3086949SMatthias Ringwald __copy_table_end__ = .; 238*c3086949SMatthias Ringwald } > FLASH 239*c3086949SMatthias Ringwald */ 240*c3086949SMatthias Ringwald 241*c3086949SMatthias Ringwald /* To clear multiple BSS sections, 242*c3086949SMatthias Ringwald * uncomment .zero.table section and, 243*c3086949SMatthias Ringwald * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ 244*c3086949SMatthias Ringwald /* 245*c3086949SMatthias Ringwald .zero.table : 246*c3086949SMatthias Ringwald { 247*c3086949SMatthias Ringwald . = ALIGN(4); 248*c3086949SMatthias Ringwald __zero_table_start__ = .; 249*c3086949SMatthias Ringwald LONG (__bss_start__) 250*c3086949SMatthias Ringwald LONG (__bss_end__ - __bss_start__) 251*c3086949SMatthias Ringwald LONG (__bss2_start__) 252*c3086949SMatthias Ringwald LONG (__bss2_end__ - __bss2_start__) 253*c3086949SMatthias Ringwald __zero_table_end__ = .; 254*c3086949SMatthias Ringwald } > FLASH 255*c3086949SMatthias Ringwald */ 256*c3086949SMatthias Ringwald 257*c3086949SMatthias Ringwald __etext = .; 258*c3086949SMatthias Ringwald 259*c3086949SMatthias Ringwald __tz_RAM_S = ORIGIN(RAM); 260*c3086949SMatthias Ringwald 261*c3086949SMatthias Ringwald /* If DTC is used, put the DTC vector table at the start of SRAM. 262*c3086949SMatthias Ringwald This avoids memory holes due to 1K alignment required by it. */ 263*c3086949SMatthias Ringwald .fsp_dtc_vector_table (NOLOAD) : 264*c3086949SMatthias Ringwald { 265*c3086949SMatthias Ringwald . = ORIGIN(RAM); 266*c3086949SMatthias Ringwald *(.fsp_dtc_vector_table) 267*c3086949SMatthias Ringwald } > RAM 268*c3086949SMatthias Ringwald 269*c3086949SMatthias Ringwald /* Initialized data section. */ 270*c3086949SMatthias Ringwald .data : 271*c3086949SMatthias Ringwald { 272*c3086949SMatthias Ringwald __data_start__ = .; 273*c3086949SMatthias Ringwald . = ALIGN(4); 274*c3086949SMatthias Ringwald 275*c3086949SMatthias Ringwald __Code_In_RAM_Start = .; 276*c3086949SMatthias Ringwald 277*c3086949SMatthias Ringwald KEEP(*(.code_in_ram*)) 278*c3086949SMatthias Ringwald __Code_In_RAM_End = .; 279*c3086949SMatthias Ringwald 280*c3086949SMatthias Ringwald *(vtable) 281*c3086949SMatthias Ringwald /* Don't use *(.data*) because it will place data meant for .data_flash in this section. */ 282*c3086949SMatthias Ringwald *(.data.*) 283*c3086949SMatthias Ringwald *(.data) 284*c3086949SMatthias Ringwald 285*c3086949SMatthias Ringwald . = ALIGN(4); 286*c3086949SMatthias Ringwald /* preinit data */ 287*c3086949SMatthias Ringwald PROVIDE_HIDDEN (__preinit_array_start = .); 288*c3086949SMatthias Ringwald KEEP(*(.preinit_array)) 289*c3086949SMatthias Ringwald PROVIDE_HIDDEN (__preinit_array_end = .); 290*c3086949SMatthias Ringwald 291*c3086949SMatthias Ringwald . = ALIGN(4); 292*c3086949SMatthias Ringwald /* init data */ 293*c3086949SMatthias Ringwald PROVIDE_HIDDEN (__init_array_start = .); 294*c3086949SMatthias Ringwald KEEP(*(SORT(.init_array.*))) 295*c3086949SMatthias Ringwald KEEP(*(.init_array)) 296*c3086949SMatthias Ringwald PROVIDE_HIDDEN (__init_array_end = .); 297*c3086949SMatthias Ringwald 298*c3086949SMatthias Ringwald 299*c3086949SMatthias Ringwald . = ALIGN(4); 300*c3086949SMatthias Ringwald /* finit data */ 301*c3086949SMatthias Ringwald PROVIDE_HIDDEN (__fini_array_start = .); 302*c3086949SMatthias Ringwald KEEP(*(SORT(.fini_array.*))) 303*c3086949SMatthias Ringwald KEEP(*(.fini_array)) 304*c3086949SMatthias Ringwald PROVIDE_HIDDEN (__fini_array_end = .); 305*c3086949SMatthias Ringwald 306*c3086949SMatthias Ringwald KEEP(*(.jcr*)) 307*c3086949SMatthias Ringwald 308*c3086949SMatthias Ringwald . = ALIGN(4); 309*c3086949SMatthias Ringwald 310*c3086949SMatthias Ringwald /* All data end */ 311*c3086949SMatthias Ringwald __data_end__ = .; 312*c3086949SMatthias Ringwald 313*c3086949SMatthias Ringwald } > RAM AT > FLASH 314*c3086949SMatthias Ringwald 315*c3086949SMatthias Ringwald 316*c3086949SMatthias Ringwald /* TrustZone Secure Gateway Stubs Section. */ 317*c3086949SMatthias Ringwald 318*c3086949SMatthias Ringwald /* Some arithmetic is needed to eliminate unnecessary FILL for secure projects. */ 319*c3086949SMatthias Ringwald /* 1. Get the address to the next block after the .data section in FLASH. */ 320*c3086949SMatthias Ringwald DATA_END = LOADADDR(.data) + SIZEOF(.data); 321*c3086949SMatthias Ringwald /* 2. Determine the secure gateway stubs address either by the provided linker variable or the next 1024-byte block after .data */ 322*c3086949SMatthias Ringwald SGSTUBS_LOC = (DEFINED(PROJECT_SECURE) && DEFINED(FLASH_NSC_START)) ? ABSOLUTE(FLASH_NSC_START) : ALIGN(DATA_END, 1024); 323*c3086949SMatthias Ringwald /* 3. Manually specify the start location for .gnu.sgstubs */ 324*c3086949SMatthias Ringwald .gnu.sgstubs SGSTUBS_LOC : ALIGN(1024) 325*c3086949SMatthias Ringwald { 326*c3086949SMatthias Ringwald __tz_FLASH_C = DEFINED(FLASH_NSC_START) ? ABSOLUTE(FLASH_NSC_START) : __RESERVE_NS_RAM ? ABSOLUTE(FLASH_START + FLASH_LENGTH) : ALIGN(1024); 327*c3086949SMatthias Ringwald _start_sg = .; 328*c3086949SMatthias Ringwald *(.gnu.sgstubs*) 329*c3086949SMatthias Ringwald . = ALIGN(32); 330*c3086949SMatthias Ringwald _end_sg = .; 331*c3086949SMatthias Ringwald } > FLASH 332*c3086949SMatthias Ringwald 333*c3086949SMatthias Ringwald __tz_FLASH_N = DEFINED(FLASH_NS_START) ? ABSOLUTE(FLASH_NS_START) : __RESERVE_NS_RAM ? ABSOLUTE(FLASH_START + FLASH_LENGTH) : FLASH_LENGTH < 32768 ? FLASH_LENGTH : ALIGN(32768); 334*c3086949SMatthias Ringwald FLASH_NS_IMAGE_START = DEFINED(FLASH_NS_IMAGE_START) ? FLASH_NS_IMAGE_START : __tz_FLASH_N; 335*c3086949SMatthias Ringwald 336*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for QSPI. These symbols are provided for the RA configuration tool. */ 337*c3086949SMatthias Ringwald __tz_QSPI_FLASH_S = ORIGIN(QSPI_FLASH); 338*c3086949SMatthias Ringwald 339*c3086949SMatthias Ringwald /* QSPI_FLASH section to be downloaded via debugger */ 340*c3086949SMatthias Ringwald .qspi_flash : 341*c3086949SMatthias Ringwald { 342*c3086949SMatthias Ringwald __qspi_flash_start__ = .; 343*c3086949SMatthias Ringwald KEEP(*(.qspi_flash*)) 344*c3086949SMatthias Ringwald KEEP(*(.code_in_qspi*)) 345*c3086949SMatthias Ringwald __qspi_flash_end__ = .; 346*c3086949SMatthias Ringwald } > QSPI_FLASH 347*c3086949SMatthias Ringwald __qspi_flash_code_size__ = __qspi_flash_end__ - __qspi_flash_start__; 348*c3086949SMatthias Ringwald 349*c3086949SMatthias Ringwald /* QSPI_FLASH non-retentive section, creates a copy in internal flash that can be copied to QSPI */ 350*c3086949SMatthias Ringwald __qspi_flash_code_addr__ = __etext + (__data_end__ - __data_start__); 351*c3086949SMatthias Ringwald .qspi_non_retentive : AT (__qspi_flash_code_addr__) 352*c3086949SMatthias Ringwald { 353*c3086949SMatthias Ringwald __qspi_non_retentive_start__ = .; 354*c3086949SMatthias Ringwald KEEP(*(.qspi_non_retentive*)) 355*c3086949SMatthias Ringwald __qspi_non_retentive_end__ = .; 356*c3086949SMatthias Ringwald } > QSPI_FLASH 357*c3086949SMatthias Ringwald __qspi_non_retentive_size__ = __qspi_non_retentive_end__ - __qspi_non_retentive_start__; 358*c3086949SMatthias Ringwald 359*c3086949SMatthias Ringwald __qspi_region_max_size__ = 0x4000000; /* Must be the same as defined in MEMORY above */ 360*c3086949SMatthias Ringwald __qspi_region_start_address__ = __qspi_flash_start__; 361*c3086949SMatthias Ringwald __qspi_region_end_address__ = __qspi_flash_start__ + __qspi_region_max_size__; 362*c3086949SMatthias Ringwald 363*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for QSPI. These symbols are provided for the RA configuration tool. */ 364*c3086949SMatthias Ringwald __tz_QSPI_FLASH_N = __qspi_non_retentive_end__; 365*c3086949SMatthias Ringwald 366*c3086949SMatthias Ringwald /* Support for OctaRAM */ 367*c3086949SMatthias Ringwald .OSPI_DEVICE_0_NO_LOAD (NOLOAD): 368*c3086949SMatthias Ringwald { 369*c3086949SMatthias Ringwald . = ALIGN(4); 370*c3086949SMatthias Ringwald __ospi_device_0_start__ = .; 371*c3086949SMatthias Ringwald *(.ospi_device_0_no_load*) 372*c3086949SMatthias Ringwald . = ALIGN(4); 373*c3086949SMatthias Ringwald __ospi_device_0_end__ = .; 374*c3086949SMatthias Ringwald } > OSPI_DEVICE_0_RAM 375*c3086949SMatthias Ringwald 376*c3086949SMatthias Ringwald .OSPI_DEVICE_1_NO_LOAD (NOLOAD): 377*c3086949SMatthias Ringwald { 378*c3086949SMatthias Ringwald . = ALIGN(4); 379*c3086949SMatthias Ringwald __ospi_device_1_start__ = .; 380*c3086949SMatthias Ringwald *(.ospi_device_1_no_load*) 381*c3086949SMatthias Ringwald . = ALIGN(4); 382*c3086949SMatthias Ringwald __ospi_device_1_end__ = .; 383*c3086949SMatthias Ringwald } > OSPI_DEVICE_1_RAM 384*c3086949SMatthias Ringwald 385*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for QSPI. These symbols are provided for the RA configuration tool. */ 386*c3086949SMatthias Ringwald __tz_OSPI_DEVICE_0_S = ORIGIN(OSPI_DEVICE_0); 387*c3086949SMatthias Ringwald 388*c3086949SMatthias Ringwald /* OSPI_DEVICE_0 section to be downloaded via debugger */ 389*c3086949SMatthias Ringwald .OSPI_DEVICE_0 : 390*c3086949SMatthias Ringwald { 391*c3086949SMatthias Ringwald __ospi_device_0_start__ = .; 392*c3086949SMatthias Ringwald KEEP(*(.ospi_device_0*)) 393*c3086949SMatthias Ringwald KEEP(*(.code_in_ospi_device_0*)) 394*c3086949SMatthias Ringwald __ospi_device_0_end__ = .; 395*c3086949SMatthias Ringwald } > OSPI_DEVICE_0 396*c3086949SMatthias Ringwald __ospi_device_0_code_size__ = __ospi_device_0_end__ - __ospi_device_0_start__; 397*c3086949SMatthias Ringwald 398*c3086949SMatthias Ringwald /* OSPI_DEVICE_0 non-retentive section, creates a copy in internal flash that can be copied to OSPI */ 399*c3086949SMatthias Ringwald __ospi_device_0_code_addr__ = __etext + (__data_end__ - __data_start__); 400*c3086949SMatthias Ringwald .ospi_device_0_non_retentive : AT (__ospi_device_0_code_addr__) 401*c3086949SMatthias Ringwald { 402*c3086949SMatthias Ringwald __ospi_device_0_non_retentive_start__ = .; 403*c3086949SMatthias Ringwald KEEP(*(.ospi_device_0_non_retentive*)) 404*c3086949SMatthias Ringwald __ospi_device_0_non_retentive_end__ = .; 405*c3086949SMatthias Ringwald } > OSPI_DEVICE_0 406*c3086949SMatthias Ringwald __ospi_device_0_non_retentive_size__ = __ospi_device_0_non_retentive_end__ - __ospi_device_0_non_retentive_start__; 407*c3086949SMatthias Ringwald 408*c3086949SMatthias Ringwald __ospi_device_0_region_max_size__ = 0x8000000; /* Must be the same as defined in MEMORY above */ 409*c3086949SMatthias Ringwald __ospi_device_0_region_start_address__ = __ospi_device_0_start__; 410*c3086949SMatthias Ringwald __ospi_device_0_region_end_address__ = __ospi_device_0_start__ + __ospi_device_0_region_max_size__; 411*c3086949SMatthias Ringwald 412*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for OSPI. These symbols are provided for the RA configuration tool. */ 413*c3086949SMatthias Ringwald __tz_OSPI_DEVICE_0_N = __ospi_device_0_non_retentive_end__; 414*c3086949SMatthias Ringwald 415*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for OSPI. These symbols are provided for the RA configuration tool. */ 416*c3086949SMatthias Ringwald __tz_OSPI_DEVICE_1_S = ORIGIN(OSPI_DEVICE_1); 417*c3086949SMatthias Ringwald 418*c3086949SMatthias Ringwald /* OSPI_DEVICE_1 section to be downloaded via debugger */ 419*c3086949SMatthias Ringwald .OSPI_DEVICE_1 : 420*c3086949SMatthias Ringwald { 421*c3086949SMatthias Ringwald __ospi_device_1_start__ = .; 422*c3086949SMatthias Ringwald KEEP(*(.ospi_device_1*)) 423*c3086949SMatthias Ringwald KEEP(*(.code_in_ospi_device_1*)) 424*c3086949SMatthias Ringwald __ospi_device_1_end__ = .; 425*c3086949SMatthias Ringwald } > OSPI_DEVICE_1 426*c3086949SMatthias Ringwald __ospi_device_1_code_size__ = __ospi_device_1_end__ - __ospi_device_1_start__; 427*c3086949SMatthias Ringwald 428*c3086949SMatthias Ringwald /* OSPI_DEVICE_1 non-retentive section, creates a copy in internal flash that can be copied to OSPI */ 429*c3086949SMatthias Ringwald __ospi_device_1_code_addr__ = __etext + (__data_end__ - __data_start__); 430*c3086949SMatthias Ringwald .ospi_device_1_non_retentive : AT (__ospi_device_1_code_addr__) 431*c3086949SMatthias Ringwald { 432*c3086949SMatthias Ringwald __ospi_device_1_non_retentive_start__ = .; 433*c3086949SMatthias Ringwald KEEP(*(.ospi_device_1_non_retentive*)) 434*c3086949SMatthias Ringwald __ospi_device_1_non_retentive_end__ = .; 435*c3086949SMatthias Ringwald } > OSPI_DEVICE_1 436*c3086949SMatthias Ringwald __ospi_device_1_non_retentive_size__ = __ospi_device_1_non_retentive_end__ - __ospi_device_1_non_retentive_start__; 437*c3086949SMatthias Ringwald 438*c3086949SMatthias Ringwald __ospi_device_1_region_max_size__ = 0x10000000; /* Must be the same as defined in MEMORY above */ 439*c3086949SMatthias Ringwald __ospi_device_1_region_start_address__ = __ospi_device_1_start__; 440*c3086949SMatthias Ringwald __ospi_device_1_region_end_address__ = __ospi_device_1_start__ + __ospi_device_1_region_max_size__; 441*c3086949SMatthias Ringwald 442*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for OSPI. These symbols are provided for the RA configuration tool. */ 443*c3086949SMatthias Ringwald __tz_OSPI_DEVICE_1_N = __ospi_device_1_non_retentive_end__; 444*c3086949SMatthias Ringwald 445*c3086949SMatthias Ringwald .noinit (NOLOAD): 446*c3086949SMatthias Ringwald { 447*c3086949SMatthias Ringwald . = ALIGN(4); 448*c3086949SMatthias Ringwald __noinit_start = .; 449*c3086949SMatthias Ringwald KEEP(*(.noinit*)) 450*c3086949SMatthias Ringwald . = ALIGN(8); 451*c3086949SMatthias Ringwald /* Place the FreeRTOS heap here so that the __HeapLimit calculation does not include the freertos heap. */ 452*c3086949SMatthias Ringwald KEEP(*(.heap.*)) 453*c3086949SMatthias Ringwald __noinit_end = .; 454*c3086949SMatthias Ringwald } > RAM 455*c3086949SMatthias Ringwald 456*c3086949SMatthias Ringwald .bss : 457*c3086949SMatthias Ringwald { 458*c3086949SMatthias Ringwald . = ALIGN(4); 459*c3086949SMatthias Ringwald __bss_start__ = .; 460*c3086949SMatthias Ringwald *(.bss*) 461*c3086949SMatthias Ringwald *(COMMON) 462*c3086949SMatthias Ringwald . = ALIGN(4); 463*c3086949SMatthias Ringwald __bss_end__ = .; 464*c3086949SMatthias Ringwald } > RAM 465*c3086949SMatthias Ringwald 466*c3086949SMatthias Ringwald .heap (NOLOAD): 467*c3086949SMatthias Ringwald { 468*c3086949SMatthias Ringwald . = ALIGN(8); 469*c3086949SMatthias Ringwald __HeapBase = .; 470*c3086949SMatthias Ringwald /* Place the STD heap here. */ 471*c3086949SMatthias Ringwald KEEP(*(.heap)) 472*c3086949SMatthias Ringwald __HeapLimit = .; 473*c3086949SMatthias Ringwald } > RAM 474*c3086949SMatthias Ringwald 475*c3086949SMatthias Ringwald /* Stacks are stored in this section. */ 476*c3086949SMatthias Ringwald .stack_dummy (NOLOAD): 477*c3086949SMatthias Ringwald { 478*c3086949SMatthias Ringwald . = ALIGN(8); 479*c3086949SMatthias Ringwald __StackLimit = .; 480*c3086949SMatthias Ringwald /* Main stack */ 481*c3086949SMatthias Ringwald KEEP(*(.stack)) 482*c3086949SMatthias Ringwald __StackTop = .; 483*c3086949SMatthias Ringwald /* Thread stacks */ 484*c3086949SMatthias Ringwald KEEP(*(.stack*)) 485*c3086949SMatthias Ringwald __StackTopAll = .; 486*c3086949SMatthias Ringwald } > RAM 487*c3086949SMatthias Ringwald 488*c3086949SMatthias Ringwald PROVIDE(__stack = __StackTopAll); 489*c3086949SMatthias Ringwald 490*c3086949SMatthias Ringwald /* This symbol represents the end of user allocated RAM. The RAM after this symbol can be used 491*c3086949SMatthias Ringwald at run time for things such as ThreadX memory pool allocations. */ 492*c3086949SMatthias Ringwald __RAM_segment_used_end__ = ALIGN(__StackTopAll , 4); 493*c3086949SMatthias Ringwald 494*c3086949SMatthias Ringwald /* RAM_NSC_START can be used to set a fixed address for non-secure callable RAM in secure projects. 495*c3086949SMatthias Ringwald * If it is not specified, the address for NSC RAM is the end of RAM aligned to a 1K boundary. 496*c3086949SMatthias Ringwald * In flat projects that require non-secure RAM, this variable is set to the start of non-secure RAM. */ 497*c3086949SMatthias Ringwald __tz_RAM_C = DEFINED(RAM_NSC_START) ? ABSOLUTE(RAM_NSC_START) : __RESERVE_NS_RAM ? ABSOLUTE(RAM_NS_BUFFER_BLOCK_START) : ALIGN(__RAM_segment_used_end__, 1024); 498*c3086949SMatthias Ringwald 499*c3086949SMatthias Ringwald /* RAM_NS_START can be used to set a fixed address for non-secure RAM in secure projects or flat projects. 500*c3086949SMatthias Ringwald * RAM_NS_BUFFER_BLOCK_LENGTH is used to allocate non-secure buffers in a flat project. If it is not 501*c3086949SMatthias Ringwald * specified, the address for NSC RAM is the end of RAM aligned to an 8K boundary. 502*c3086949SMatthias Ringwald * In flat projects that require non-secure RAM, this variable is set to the start of non-secure RAM. */ 503*c3086949SMatthias Ringwald __tz_RAM_N = DEFINED(RAM_NS_START) ? ABSOLUTE(RAM_NS_START) : __RESERVE_NS_RAM ? ABSOLUTE(RAM_NS_BUFFER_BLOCK_START) : ALIGN(__tz_RAM_C, 8192); 504*c3086949SMatthias Ringwald 505*c3086949SMatthias Ringwald /* Non-secure buffers must be in non-secure RAM. This is primarily used for the EDMAC in flat projects. 506*c3086949SMatthias Ringwald * The EDMAC is a non-secure bus master and can only access non-secure RAM. */ 507*c3086949SMatthias Ringwald .ns_buffer (NOLOAD): 508*c3086949SMatthias Ringwald { 509*c3086949SMatthias Ringwald /* Allocate RAM on a 32-byte boundary to help with placement of Ethernet buffers. */ 510*c3086949SMatthias Ringwald . = __RESERVE_NS_RAM ? ABSOLUTE(RAM_NS_BUFFER_START & 0xFFFFFFE0) : .; 511*c3086949SMatthias Ringwald 512*c3086949SMatthias Ringwald KEEP(*(.ns_buffer*)) 513*c3086949SMatthias Ringwald } > RAM 514*c3086949SMatthias Ringwald 515*c3086949SMatthias Ringwald /* Data flash. */ 516*c3086949SMatthias Ringwald .data_flash : 517*c3086949SMatthias Ringwald { 518*c3086949SMatthias Ringwald . = ORIGIN(DATA_FLASH); 519*c3086949SMatthias Ringwald __tz_DATA_FLASH_S = .; 520*c3086949SMatthias Ringwald __Data_Flash_Start = .; 521*c3086949SMatthias Ringwald KEEP(*(.data_flash*)) 522*c3086949SMatthias Ringwald __Data_Flash_End = .; 523*c3086949SMatthias Ringwald 524*c3086949SMatthias Ringwald __tz_DATA_FLASH_N = DEFINED(DATA_FLASH_NS_START) ? ABSOLUTE(DATA_FLASH_NS_START) : __RESERVE_NS_RAM ? ABSOLUTE(DATA_FLASH_START + DATA_FLASH_LENGTH) : ALIGN(1024); 525*c3086949SMatthias Ringwald } > DATA_FLASH 526*c3086949SMatthias Ringwald 527*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for SDRAM. These symbols are provided for the RA configuration tool. */ 528*c3086949SMatthias Ringwald __tz_SDRAM_S = ORIGIN(SDRAM); 529*c3086949SMatthias Ringwald 530*c3086949SMatthias Ringwald /* SDRAM */ 531*c3086949SMatthias Ringwald .sdram (NOLOAD): 532*c3086949SMatthias Ringwald { 533*c3086949SMatthias Ringwald __SDRAM_Start = .; 534*c3086949SMatthias Ringwald KEEP(*(.sdram*)) 535*c3086949SMatthias Ringwald KEEP(*(.frame*)) 536*c3086949SMatthias Ringwald __SDRAM_End = .; 537*c3086949SMatthias Ringwald } > SDRAM 538*c3086949SMatthias Ringwald 539*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for SDRAM. These symbols are provided for the RA configuration tool. */ 540*c3086949SMatthias Ringwald __tz_SDRAM_N = __SDRAM_End; 541*c3086949SMatthias Ringwald 542*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for ID_CODE. These symbols are provided for the RA configuration tool. */ 543*c3086949SMatthias Ringwald __tz_ID_CODE_S = ORIGIN(ID_CODE); 544*c3086949SMatthias Ringwald 545*c3086949SMatthias Ringwald .id_code : 546*c3086949SMatthias Ringwald { 547*c3086949SMatthias Ringwald __ID_Code_Start = .; 548*c3086949SMatthias Ringwald KEEP(*(.id_code*)) 549*c3086949SMatthias Ringwald __ID_Code_End = .; 550*c3086949SMatthias Ringwald } > ID_CODE 551*c3086949SMatthias Ringwald 552*c3086949SMatthias Ringwald /* Note: There are no secure/non-secure boundaries for ID_CODE. These symbols are provided for the RA configuration tool. */ 553*c3086949SMatthias Ringwald __tz_ID_CODE_N = __ID_Code_End; 554*c3086949SMatthias Ringwald 555*c3086949SMatthias Ringwald /* Symbol required for RA Configuration tool. */ 556*c3086949SMatthias Ringwald __tz_OPTION_SETTING_S = ORIGIN(OPTION_SETTING); 557*c3086949SMatthias Ringwald 558*c3086949SMatthias Ringwald .option_setting : 559*c3086949SMatthias Ringwald { 560*c3086949SMatthias Ringwald __OPTION_SETTING_Start = .; 561*c3086949SMatthias Ringwald KEEP(*(.option_setting_ofs0)) 562*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_Start + 0x10 : __OPTION_SETTING_Start; 563*c3086949SMatthias Ringwald KEEP(*(.option_setting_dualsel)) 564*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_Start + 0x34 : __OPTION_SETTING_Start; 565*c3086949SMatthias Ringwald KEEP(*(.option_setting_sas)) 566*c3086949SMatthias Ringwald __OPTION_SETTING_End = .; 567*c3086949SMatthias Ringwald } > OPTION_SETTING = 0xFF 568*c3086949SMatthias Ringwald 569*c3086949SMatthias Ringwald /* Symbol required for RA Configuration tool. */ 570*c3086949SMatthias Ringwald __tz_OPTION_SETTING_N = OPTION_SETTING_START_NS; 571*c3086949SMatthias Ringwald 572*c3086949SMatthias Ringwald .option_setting_ns : 573*c3086949SMatthias Ringwald { 574*c3086949SMatthias Ringwald __OPTION_SETTING_NS_Start = .; 575*c3086949SMatthias Ringwald KEEP(*(.option_setting_ofs1)) 576*c3086949SMatthias Ringwald . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x10 : __OPTION_SETTING_NS_Start; 577*c3086949SMatthias Ringwald KEEP(*(.option_setting_banksel)) 578*c3086949SMatthias Ringwald . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x40 : __OPTION_SETTING_NS_Start; 579*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps0)) 580*c3086949SMatthias Ringwald . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x44 : __OPTION_SETTING_NS_Start; 581*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps1)) 582*c3086949SMatthias Ringwald . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x48 : __OPTION_SETTING_NS_Start; 583*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps2)) 584*c3086949SMatthias Ringwald . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x60 : __OPTION_SETTING_NS_Start; 585*c3086949SMatthias Ringwald KEEP(*(.option_setting_pbps0)) 586*c3086949SMatthias Ringwald . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x64 : __OPTION_SETTING_NS_Start; 587*c3086949SMatthias Ringwald KEEP(*(.option_setting_pbps1)) 588*c3086949SMatthias Ringwald . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x68 : __OPTION_SETTING_NS_Start; 589*c3086949SMatthias Ringwald KEEP(*(.option_setting_pbps2)) 590*c3086949SMatthias Ringwald __OPTION_SETTING_NS_End = .; 591*c3086949SMatthias Ringwald } > OPTION_SETTING = 0xFF 592*c3086949SMatthias Ringwald 593*c3086949SMatthias Ringwald /* Symbol required for RA Configuration tool. */ 594*c3086949SMatthias Ringwald __tz_OPTION_SETTING_S_S = ORIGIN(OPTION_SETTING_S); 595*c3086949SMatthias Ringwald 596*c3086949SMatthias Ringwald .option_setting_s : 597*c3086949SMatthias Ringwald { 598*c3086949SMatthias Ringwald __OPTION_SETTING_S_Start = .; 599*c3086949SMatthias Ringwald KEEP(*(.option_setting_ofs1_sec)) 600*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x10 : __OPTION_SETTING_S_Start; 601*c3086949SMatthias Ringwald KEEP(*(.option_setting_banksel_sec)) 602*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x40 : __OPTION_SETTING_S_Start; 603*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps_sec0)) 604*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x44 : __OPTION_SETTING_S_Start; 605*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps_sec1)) 606*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x48 : __OPTION_SETTING_S_Start; 607*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps_sec2)) 608*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x60 : __OPTION_SETTING_S_Start; 609*c3086949SMatthias Ringwald KEEP(*(.option_setting_pbps_sec0)) 610*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x64 : __OPTION_SETTING_S_Start; 611*c3086949SMatthias Ringwald KEEP(*(.option_setting_pbps_sec1)) 612*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x68 : __OPTION_SETTING_S_Start; 613*c3086949SMatthias Ringwald KEEP(*(.option_setting_pbps_sec2)) 614*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x80 : __OPTION_SETTING_S_Start; 615*c3086949SMatthias Ringwald KEEP(*(.option_setting_ofs1_sel)) 616*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x90 : __OPTION_SETTING_S_Start; 617*c3086949SMatthias Ringwald KEEP(*(.option_setting_banksel_sel)) 618*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0xC0 : __OPTION_SETTING_S_Start; 619*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps_sel0)) 620*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0xC4 : __OPTION_SETTING_S_Start; 621*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps_sel1)) 622*c3086949SMatthias Ringwald . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0xC8 : __OPTION_SETTING_S_Start; 623*c3086949SMatthias Ringwald KEEP(*(.option_setting_bps_sel2)) 624*c3086949SMatthias Ringwald __OPTION_SETTING_S_End = .; 625*c3086949SMatthias Ringwald } > OPTION_SETTING_S = 0xFF 626*c3086949SMatthias Ringwald 627*c3086949SMatthias Ringwald /* Symbol required for RA Configuration tool. */ 628*c3086949SMatthias Ringwald __tz_OPTION_SETTING_S_N = __OPTION_SETTING_S_End; 629*c3086949SMatthias Ringwald} 630