fsp.ld 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  1. /*
  2. Linker File for Renesas FSP
  3. */
  4. INCLUDE memory_regions.ld
  5. /* Uncomment and set XIP_SECONDARY_SLOT_IMAGE to 1 below for the secondary XIP application image.*/
  6. /*
  7. XIP_SECONDARY_SLOT_IMAGE = 1;
  8. */
  9. QSPI_FLASH_PRV_LENGTH = DEFINED(QSPI_FLASH_SIZE) ? ABSOLUTE(QSPI_FLASH_SIZE) : ABSOLUTE(QSPI_FLASH_LENGTH);
  10. OSPI_DEVICE_0_PRV_LENGTH = DEFINED(OSPI_DEVICE_0_SIZE) ? ABSOLUTE(OSPI_DEVICE_0_SIZE) : ABSOLUTE(OSPI_DEVICE_0_LENGTH);
  11. OSPI_DEVICE_1_PRV_LENGTH = DEFINED(OSPI_DEVICE_1_SIZE) ? ABSOLUTE(OSPI_DEVICE_1_SIZE) : ABSOLUTE(OSPI_DEVICE_1_LENGTH);
  12. /* If a flat (secure) project has DEFINED RAM_NS_BUFFER_LENGTH, then emit IDAU symbols to allocate non-secure RAM. */
  13. __RESERVE_NS_RAM = !DEFINED(PROJECT_NONSECURE) && DEFINED(RAM_NS_BUFFER_LENGTH) && (OPTION_SETTING_S_LENGTH != 0);
  14. ITCM_START = DEFINED(ITCM_START)? ITCM_START : 0;
  15. ITCM_LENGTH = DEFINED(ITCM_LENGTH)? ITCM_LENGTH : 0;
  16. DTCM_START = DEFINED(DTCM_START)? DTCM_START : 0;
  17. DTCM_LENGTH = DEFINED(DTCM_LENGTH)? DTCM_LENGTH : 0;
  18. RAM_NS_BUFFER_BLOCK_LENGTH = DEFINED(RAM_NS_BUFFER_LENGTH) ? ALIGN(RAM_NS_BUFFER_LENGTH, 8192) : 0;
  19. RAM_NS_BUFFER_LENGTH = DEFINED(RAM_NS_BUFFER_LENGTH) ? RAM_NS_BUFFER_LENGTH : 0;
  20. RAM_NS_BUFFER_START = RAM_START + RAM_LENGTH - RAM_NS_BUFFER_LENGTH;
  21. RAM_NS_BUFFER_BLOCK_START = RAM_START + RAM_LENGTH - RAM_NS_BUFFER_BLOCK_LENGTH;
  22. OPTION_SETTING_START_NS = DEFINED(PROJECT_NONSECURE) ? OPTION_SETTING_START : OPTION_SETTING_START + 0x80;
  23. OPTION_SETTING_DATA_FLASH_S_START = DEFINED(OPTION_SETTING_DATA_FLASH_S_START) ? OPTION_SETTING_DATA_FLASH_S_START : 0;
  24. OPTION_SETTING_DATA_FLASH_S_LENGTH = DEFINED(OPTION_SETTING_DATA_FLASH_S_LENGTH) ? OPTION_SETTING_DATA_FLASH_S_LENGTH : 0;
  25. /* This definition is used to avoid moving the counter in OPTION_SETTING regions for projects that should not configure option settings.
  26. * Bootloader images do not configure option settings because they are owned by the bootloader.
  27. * FSP_BOOTABLE_IMAGE is only defined in bootloader images. */
  28. __bl_FSP_BOOTABLE_IMAGE = 1;
  29. __bln_FSP_BOOTABLE_IMAGE = 1;
  30. PROJECT_SECURE_OR_FLAT = (!DEFINED(PROJECT_NONSECURE) || DEFINED(PROJECT_SECURE)) && OPTION_SETTING_LENGTH && !DEFINED(FSP_BOOTABLE_IMAGE);
  31. USE_OPTION_SETTING_NS = DEFINED(PROJECT_NONSECURE) && !DEFINED(FSP_BOOTABLE_IMAGE);
  32. USE_OPTION_SETTING_DATA_FLASH = PROJECT_SECURE_OR_FLAT && (OPTION_SETTING_DATA_FLASH_S_LENGTH != 0);
  33. __bl_FLASH_IMAGE_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  34. FLASH_APPLICATION_IMAGE_NUMBER == 1 ? FLASH_START + FLASH_BOOTLOADER_LENGTH + FLASH_BOOTLOADER_HEADER_LENGTH :
  35. FLASH_START + FLASH_BOOTLOADER_LENGTH + FLASH_BOOTLOADER_SCRATCH_LENGTH + FLASH_APPLICATION_S_LENGTH + FLASH_BOOTLOADER_HEADER_LENGTH;
  36. __bl_FLASH_IMAGE_LENGTH = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  37. FLASH_APPLICATION_S_LENGTH - FLASH_BOOTLOADER_HEADER_LENGTH;
  38. __bl_FLASH_IMAGE_END = __bl_FLASH_IMAGE_START + __bl_FLASH_IMAGE_LENGTH;
  39. __bl_XIP_SECONDARY_FLASH_IMAGE_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  40. FLASH_BOOTLOADER_LENGTH + FLASH_APPLICATION_S_LENGTH + FLASH_BOOTLOADER_HEADER_LENGTH;
  41. __bl_XIP_SECONDARY_FLASH_IMAGE_END = __bl_XIP_SECONDARY_FLASH_IMAGE_START + __bl_FLASH_IMAGE_LENGTH;
  42. __bl_FLASH_NS_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  43. FLASH_APPLICATION_NS_LENGTH == 0 ? __bl_FLASH_IMAGE_END :
  44. __bl_FLASH_IMAGE_START - FLASH_BOOTLOADER_HEADER_LENGTH + FLASH_APPLICATION_S_LENGTH;
  45. __bl_FLASH_NSC_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  46. FLASH_APPLICATION_NS_LENGTH == 0 ? __bl_FLASH_IMAGE_END :
  47. __bl_FLASH_IMAGE_END - FLASH_APPLICATION_NSC_LENGTH;
  48. __bl_RAM_NS_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  49. FLASH_APPLICATION_NS_LENGTH == 0 ? RAM_START + RAM_LENGTH :
  50. RAM_START + RAM_LENGTH - RAM_APPLICATION_NS_LENGTH;
  51. __bl_RAM_NSC_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  52. FLASH_APPLICATION_NS_LENGTH == 0 ? RAM_START + RAM_LENGTH :
  53. __bl_RAM_NS_START - RAM_APPLICATION_NSC_LENGTH;
  54. __bl_FLASH_NS_IMAGE_START = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  55. FLASH_APPLICATION_NS_LENGTH == 0 ? __bl_FLASH_IMAGE_END :
  56. __bl_FLASH_NS_START + FLASH_BOOTLOADER_HEADER_LENGTH_2;
  57. __bln_FLASH_IMAGE_START = __bl_FLASH_NS_IMAGE_START | (!DEFINED (NS_OFFSET_START) ? 0 : NS_OFFSET_START);
  58. __bln_FLASH_IMAGE_LENGTH = !DEFINED(FLASH_BOOTLOADER_LENGTH) ? 0 :
  59. FLASH_APPLICATION_NS_LENGTH == 0 ? __bl_FLASH_IMAGE_END :
  60. FLASH_APPLICATION_NS_LENGTH - FLASH_BOOTLOADER_HEADER_LENGTH_2;
  61. XIP_SECONDARY_SLOT_IMAGE = DEFINED(XIP_SECONDARY_SLOT_IMAGE) ? XIP_SECONDARY_SLOT_IMAGE : 0;
  62. FLASH_ORIGIN = !DEFINED(FLASH_IMAGE_START) ? FLASH_START :
  63. XIP_SECONDARY_SLOT_IMAGE == 1 ? XIP_SECONDARY_FLASH_IMAGE_START :
  64. FLASH_IMAGE_START;
  65. LIMITED_FLASH_LENGTH = DEFINED(FLASH_IMAGE_LENGTH) ? FLASH_IMAGE_LENGTH :
  66. DEFINED(FLASH_BOOTLOADER_LENGTH) ? FLASH_BOOTLOADER_LENGTH :
  67. FLASH_LENGTH;
  68. OPTION_SETTING_SAS_SIZE = 0x34;
  69. OPTION_SETTING_SAS_LENGTH = !DEFINED(OPTION_SETTING_LENGTH) ? 0 :
  70. OPTION_SETTING_LENGTH == 0 ? 0 :
  71. OPTION_SETTING_LENGTH - OPTION_SETTING_SAS_SIZE;
  72. /* Define memory regions. */
  73. MEMORY
  74. {
  75. ITCM (rx) : ORIGIN = ITCM_START, LENGTH = ITCM_LENGTH
  76. DTCM (rwx) : ORIGIN = DTCM_START, LENGTH = DTCM_LENGTH
  77. FLASH (rx) : ORIGIN = FLASH_ORIGIN, LENGTH = LIMITED_FLASH_LENGTH
  78. RAM (rwx) : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
  79. DATA_FLASH (rx) : ORIGIN = DATA_FLASH_START, LENGTH = DATA_FLASH_LENGTH
  80. QSPI_FLASH (rx) : ORIGIN = QSPI_FLASH_START, LENGTH = QSPI_FLASH_PRV_LENGTH
  81. OSPI_DEVICE_0 (rx) : ORIGIN = OSPI_DEVICE_0_START, LENGTH = OSPI_DEVICE_0_PRV_LENGTH
  82. OSPI_DEVICE_1 (rx) : ORIGIN = OSPI_DEVICE_1_START, LENGTH = OSPI_DEVICE_1_PRV_LENGTH
  83. OSPI_DEVICE_0_RAM (rwx) : ORIGIN = OSPI_DEVICE_0_START, LENGTH = OSPI_DEVICE_0_PRV_LENGTH
  84. OSPI_DEVICE_1_RAM (rwx) : ORIGIN = OSPI_DEVICE_1_START, LENGTH = OSPI_DEVICE_1_PRV_LENGTH
  85. SDRAM (rwx) : ORIGIN = SDRAM_START, LENGTH = SDRAM_LENGTH
  86. OPTION_SETTING (r) : ORIGIN = OPTION_SETTING_START, LENGTH = OPTION_SETTING_LENGTH
  87. OPTION_SETTING_OFS (r) : ORIGIN = OPTION_SETTING_START, LENGTH = 0x18
  88. OPTION_SETTING_SAS (r) : ORIGIN = OPTION_SETTING_START + OPTION_SETTING_SAS_SIZE, LENGTH = OPTION_SETTING_SAS_LENGTH
  89. OPTION_SETTING_S (r) : ORIGIN = OPTION_SETTING_S_START, LENGTH = OPTION_SETTING_S_LENGTH
  90. OPTION_SETTING_DATA_FLASH_S (r) : ORIGIN = OPTION_SETTING_DATA_FLASH_S_START, LENGTH = OPTION_SETTING_DATA_FLASH_S_LENGTH
  91. ID_CODE (rx) : ORIGIN = ID_CODE_START, LENGTH = ID_CODE_LENGTH
  92. }
  93. /* Library configurations */
  94. GROUP( libc.a libm.a)
  95. /* Linker script to place sections and symbol values. Should be used together
  96. * with other linker script that defines memory regions FLASH and RAM.
  97. * It references following symbols, which must be DEFINED in code:
  98. * Reset_Handler : Entry of reset handler
  99. *
  100. * It defines following symbols, which code can use without definition:
  101. * __exidx_start
  102. * __exidx_end
  103. * __copy_table_start__
  104. * __copy_table_end__
  105. * __zero_table_start__
  106. * __zero_table_end__
  107. * __etext
  108. * __data_start__
  109. * __preinit_array_start
  110. * __preinit_array_end
  111. * __init_array_start
  112. * __init_array_end
  113. * __fini_array_start
  114. * __fini_array_end
  115. * __data_end__
  116. * __bss_start__
  117. * __bss_end__
  118. * __HeapLimit
  119. * __StackLimit
  120. * __StackTop
  121. * __stack
  122. * __Vectors_End
  123. * __Vectors_Size
  124. * __qspi_flash_start__
  125. * __qspi_flash_end__
  126. * __qspi_flash_code_size__
  127. * __qspi_region_max_size__
  128. * __qspi_region_start_address__
  129. * __qspi_region_end_address__
  130. * __ospi_device_0_start__
  131. * __ospi_device_0_end__
  132. * __ospi_device_0_code_size__
  133. * __ospi_device_0_region_max_size__
  134. * __ospi_device_0_region_start_address__
  135. * __ospi_device_0_region_end_address__
  136. * __ospi_device_1_start__
  137. * __ospi_device_1_end__
  138. * __ospi_device_1_code_size__
  139. * __ospi_device_1_region_max_size__
  140. * __ospi_device_1_region_start_address__
  141. * __ospi_device_1_region_end_address__
  142. */
  143. ENTRY(Reset_Handler)
  144. SECTIONS
  145. {
  146. .text :
  147. {
  148. __tz_FLASH_S = ABSOLUTE(FLASH_START);
  149. __ROM_Start = .;
  150. /* Even though the vector table is not 256 entries (1KB) long, we still allocate that much
  151. * space because ROM registers are at address 0x400 and there is very little space
  152. * in between. */
  153. KEEP(*(.fixed_vectors*))
  154. KEEP(*(.application_vectors*))
  155. __Vectors_End = .;
  156. /* ROM Registers start at address 0x00000400 for devices that do not have the OPTION_SETTING region. */
  157. . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400;
  158. KEEP(*(.rom_registers*))
  159. /* Reserving 0x100 bytes of space for ROM registers. */
  160. . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500;
  161. /* Allocate flash write-boundary-aligned
  162. * space for sce9 wrapped public keys for mcuboot if the module is used.
  163. */
  164. . = ALIGN(128);
  165. KEEP(*(.mcuboot_sce9_key*))
  166. *(.text*)
  167. KEEP(*(.version))
  168. KEEP(*(.init))
  169. KEEP(*(.fini))
  170. /* section information for finsh shell */
  171. . = ALIGN(4);
  172. __fsymtab_start = .;
  173. KEEP(*(FSymTab))
  174. __fsymtab_end = .;
  175. . = ALIGN(4);
  176. __vsymtab_start = .;
  177. KEEP(*(VSymTab))
  178. __vsymtab_end = .;
  179. /* section information for initial. */
  180. . = ALIGN(4);
  181. __rt_init_start = .;
  182. KEEP(*(SORT(.rti_fn*)))
  183. __rt_init_end = .;
  184. . = ALIGN(4);
  185. KEEP(*(FalPartTable))
  186. /* .ctors */
  187. *crtbegin.o(.ctors)
  188. *crtbegin?.o(.ctors)
  189. *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
  190. *(SORT(.ctors.*))
  191. *(.ctors)
  192. /* .dtors */
  193. *crtbegin.o(.dtors)
  194. *crtbegin?.o(.dtors)
  195. *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
  196. *(SORT(.dtors.*))
  197. *(.dtors)
  198. *(.rodata*)
  199. __usb_dev_descriptor_start_fs = .;
  200. KEEP(*(.usb_device_desc_fs*))
  201. __usb_cfg_descriptor_start_fs = .;
  202. KEEP(*(.usb_config_desc_fs*))
  203. __usb_interface_descriptor_start_fs = .;
  204. KEEP(*(.usb_interface_desc_fs*))
  205. __usb_descriptor_end_fs = .;
  206. __usb_dev_descriptor_start_hs = .;
  207. KEEP(*(.usb_device_desc_hs*))
  208. __usb_cfg_descriptor_start_hs = .;
  209. KEEP(*(.usb_config_desc_hs*))
  210. __usb_interface_descriptor_start_hs = .;
  211. KEEP(*(.usb_interface_desc_hs*))
  212. __usb_descriptor_end_hs = .;
  213. KEEP(*(.eh_frame*))
  214. __ROM_End = .;
  215. } > FLASH = 0xFF
  216. __Vectors_Size = __Vectors_End - __Vectors;
  217. . = .;
  218. __itcm_data_pre_location = .;
  219. /* Initialized ITCM data. */
  220. /* Aligned to FCACHE2 for RA8. */
  221. .itcm_data : ALIGN(16)
  222. {
  223. /* Start of ITCM Secure Trustzone region. */
  224. __tz_ITCM_S = ABSOLUTE(ITCM_START);
  225. /* All ITCM data start */
  226. __itcm_data_start = .;
  227. KEEP(*(.itcm_data*))
  228. /* Pad to eight byte alignment in case of ECC initialization. Fill zero. */
  229. . = ALIGN(8);
  230. /* All ITCM data end */
  231. __itcm_data_end = .;
  232. /*
  233. * Start of the ITCM Non-Secure Trustzone region.
  234. * ITCM_NS_START can be used to set a fixed address for non-secure ITCM in secure projects or flat projects.
  235. */
  236. __tz_ITCM_N = DEFINED(ITCM_NS_START) ? ABSOLUTE(ITCM_NS_START) : ALIGN(__itcm_data_end, 8192);
  237. } > ITCM AT > FLASH = 0x00
  238. /* Addresses exported for ITCM initialization. */
  239. __itcm_data_init_start = LOADADDR(.itcm_data);
  240. __itcm_data_init_end = LOADADDR(.itcm_data) + SIZEOF(.itcm_data);
  241. ASSERT(ORIGIN(ITCM) % 8 == 0, "ITCM memory region origin must be aligned to 8 bytes.")
  242. ASSERT(LENGTH(ITCM) % 8 == 0, "ITCM memory region length must be a multiple of 8 bytes.")
  243. ASSERT(LOADADDR(.itcm_data) % 16 == 0, ".itcm_data section must be aligned to 16 bytes.")
  244. ASSERT(SIZEOF(.itcm_data) % 8 == 0, ".itcm_data section size must be a multiple of 8 bytes.")
  245. /* Restore location counter. */
  246. /* If ITCM is not present, this will be the address stored in '.' before ALIGN was attempted. */
  247. /* If ITCM is present, this will be the absolute address that follows the ITCM ROM location. */
  248. . = (SIZEOF(.itcm_data) > 0) ? __itcm_data_init_end : __itcm_data_pre_location;
  249. __exidx_start = .;
  250. /DISCARD/ :
  251. {
  252. *(.ARM.extab* .gnu.linkonce.armextab.*)
  253. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  254. }
  255. __exidx_end = .;
  256. /* To copy multiple ROM to RAM sections,
  257. * uncomment .copy.table section and,
  258. * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
  259. /*
  260. .copy.table :
  261. {
  262. . = ALIGN(4);
  263. __copy_table_start__ = .;
  264. LONG (__etext)
  265. LONG (__data_start__)
  266. LONG (__data_end__ - __data_start__)
  267. LONG (__etext2)
  268. LONG (__data2_start__)
  269. LONG (__data2_end__ - __data2_start__)
  270. __copy_table_end__ = .;
  271. } > FLASH
  272. */
  273. /* To clear multiple BSS sections,
  274. * uncomment .zero.table section and,
  275. * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
  276. /*
  277. .zero.table :
  278. {
  279. . = ALIGN(4);
  280. __zero_table_start__ = .;
  281. LONG (__bss_start__)
  282. LONG (__bss_end__ - __bss_start__)
  283. LONG (__bss2_start__)
  284. LONG (__bss2_end__ - __bss2_start__)
  285. __zero_table_end__ = .;
  286. } > FLASH
  287. */
  288. __etext = .;
  289. __tz_RAM_S = ORIGIN(RAM);
  290. /* If DTC is used, put the DTC vector table at the start of SRAM.
  291. This avoids memory holes due to 1K alignment required by it. */
  292. .fsp_dtc_vector_table (NOLOAD) :
  293. {
  294. . = ORIGIN(RAM);
  295. *(.fsp_dtc_vector_table)
  296. } > RAM
  297. /* Initialized data section. */
  298. .data :
  299. {
  300. __data_start__ = .;
  301. . = ALIGN(4);
  302. __Code_In_RAM_Start = .;
  303. KEEP(*(.code_in_ram*))
  304. __Code_In_RAM_End = .;
  305. *(vtable)
  306. /* Don't use *(.data*) because it will place data meant for .data_flash in this section. */
  307. *(.data.*)
  308. *(.data)
  309. . = ALIGN(4);
  310. /* preinit data */
  311. PROVIDE_HIDDEN (__preinit_array_start = .);
  312. KEEP(*(.preinit_array))
  313. PROVIDE_HIDDEN (__preinit_array_end = .);
  314. . = ALIGN(4);
  315. /* init data */
  316. PROVIDE_HIDDEN (__init_array_start = .);
  317. KEEP(*(SORT(.init_array.*)))
  318. KEEP(*(.init_array))
  319. PROVIDE_HIDDEN (__init_array_end = .);
  320. . = ALIGN(4);
  321. /* finit data */
  322. PROVIDE_HIDDEN (__fini_array_start = .);
  323. KEEP(*(SORT(.fini_array.*)))
  324. KEEP(*(.fini_array))
  325. PROVIDE_HIDDEN (__fini_array_end = .);
  326. KEEP(*(.jcr*))
  327. . = ALIGN(4);
  328. /* All data end */
  329. __data_end__ = .;
  330. } > RAM AT > FLASH
  331. . = .;
  332. __dtcm_data_pre_location = LOADADDR(.data) + SIZEOF(.data);
  333. /* Initialized DTCM data. */
  334. /* Aligned to FCACHE2 for RA8. */
  335. .dtcm_data : ALIGN(16)
  336. {
  337. /* Start of DTCM Secure Trustzone region. */
  338. __tz_DTCM_S = ABSOLUTE(DTCM_START);
  339. /* Initialized DTCM data start */
  340. __dtcm_data_start = .;
  341. KEEP(*(.dtcm_data*))
  342. /* Pad to eight byte alignment in case of ECC initialization. Fill zero. */
  343. . = ALIGN(8);
  344. /* Initialized DTCM data end */
  345. __dtcm_data_end = .;
  346. } > DTCM AT > FLASH = 0x00
  347. . = __dtcm_data_end;
  348. /* Uninitialized DTCM data. */
  349. /* ALIGN appears on the left side of the colon because it is being used to assign the VMA directly, as opposed to a right side appearance which would control the LMA. */
  350. .dtcm_bss ALIGN(8) (NOLOAD) :
  351. {
  352. /* Uninitialized DTCM data start */
  353. __dtcm_bss_start = .;
  354. KEEP(*(.dtcm_bss*))
  355. /* Pad to eight byte alignment in case of ECC initialization. No fill because of NOLOAD. */
  356. . = ALIGN(8);
  357. /* Uninitialized DTCM data end */
  358. __dtcm_bss_end = .;
  359. /*
  360. * Start of the DTCM Non-Secure Trustzone region.
  361. * DTCM_NS_START can be used to set a fixed address for non-secure DTCM in secure projects or flat projects.
  362. */
  363. __tz_DTCM_N = DEFINED(DTCM_NS_START) ? ABSOLUTE(DTCM_NS_START) : ALIGN(__dtcm_bss_end, 8192);
  364. } > DTCM
  365. /* Addresses exported for DTCM initialization. */
  366. __dtcm_data_init_start = LOADADDR(.dtcm_data);
  367. __dtcm_data_init_end = LOADADDR(.dtcm_data) + SIZEOF(.dtcm_data);
  368. ASSERT(ORIGIN(DTCM) % 8 == 0, "DTCM memory region origin must be aligned to 8 bytes.")
  369. ASSERT(LENGTH(DTCM) % 8 == 0, "DTCM memory region length must be a multiple of 8 bytes.")
  370. ASSERT(LOADADDR(.dtcm_bss) == ADDR(.dtcm_bss), ".dtcm_bss has (VMA != LMA) but should be NOLOAD (VMA == LMA).")
  371. ASSERT(LOADADDR(.dtcm_data) % 16 == 0, ".dtcm_data section must be aligned to 16 bytes.")
  372. ASSERT(SIZEOF(.dtcm_data) % 8 == 0, ".dtcm_data section size must be a multiple of 8 bytes.")
  373. ASSERT(LOADADDR(.dtcm_bss) % 8 == 0, ".dtcm_bss section must be aligned to 8 bytes.")
  374. ASSERT(SIZEOF(.dtcm_bss) % 8 == 0, ".dtcm_bss section size must be a multiple of 8 bytes.")
  375. ASSERT(__dtcm_bss_start == __dtcm_data_end, ".dtcm_bss section is not adjacent to .dtcm_data section.")
  376. /* Restore location counter. */
  377. /* If DTCM is not present, this will be the address stored in '.' before ALIGN was attempted. */
  378. /* If DTCM is present, this will be the absolute address that follows the DTCM ROM location. */
  379. . = (SIZEOF(.dtcm_data) > 0) ? __dtcm_data_init_end : __dtcm_data_pre_location;
  380. /* TrustZone Secure Gateway Stubs Section */
  381. /* Store location counter for SPI non-retentive sections. */
  382. sgstubs_pre_location = .;
  383. /* Determine the secure gateway stubs address either by the provided linker variable or the next 1024-byte block. */
  384. SGSTUBS_LOC = (DEFINED(PROJECT_SECURE) && DEFINED(FLASH_NSC_START)) ? ABSOLUTE(FLASH_NSC_START) : ALIGN(1024);
  385. .gnu.sgstubs SGSTUBS_LOC : ALIGN(1024)
  386. {
  387. __FLASH_NSC_START = DEFINED(FLASH_NSC_START) ? ABSOLUTE(FLASH_NSC_START) : __RESERVE_NS_RAM ? ABSOLUTE(FLASH_START + FLASH_LENGTH) : ALIGN(1024);
  388. _start_sg = .;
  389. *(.gnu.sgstubs*)
  390. . = ALIGN(32);
  391. _end_sg = .;
  392. } > FLASH
  393. __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);
  394. FLASH_NS_IMAGE_START = DEFINED(FLASH_NS_IMAGE_START) ? FLASH_NS_IMAGE_START : __tz_FLASH_N;
  395. /* Note: There are no secure/non-secure boundaries for QSPI. These symbols are provided for the RA configuration tool. */
  396. __tz_QSPI_FLASH_S = ORIGIN(QSPI_FLASH);
  397. /* QSPI_FLASH section to be downloaded via debugger */
  398. .qspi_flash :
  399. {
  400. __qspi_flash_start__ = .;
  401. KEEP(*(.qspi_flash*))
  402. KEEP(*(.code_in_qspi*))
  403. __qspi_flash_end__ = .;
  404. } > QSPI_FLASH
  405. __qspi_flash_code_size__ = __qspi_flash_end__ - __qspi_flash_start__;
  406. /* QSPI_FLASH non-retentive section, creates a copy in internal flash that can be copied to QSPI */
  407. __qspi_flash_code_addr__ = sgstubs_pre_location;
  408. .qspi_non_retentive : AT(__qspi_flash_code_addr__)
  409. {
  410. __qspi_non_retentive_start__ = .;
  411. KEEP(*(.qspi_non_retentive*))
  412. __qspi_non_retentive_end__ = .;
  413. } > QSPI_FLASH
  414. __qspi_non_retentive_size__ = __qspi_non_retentive_end__ - __qspi_non_retentive_start__;
  415. __qspi_region_max_size__ = 0x4000000; /* Must be the same as defined in MEMORY above */
  416. __qspi_region_start_address__ = __qspi_flash_start__;
  417. __qspi_region_end_address__ = __qspi_flash_start__ + __qspi_region_max_size__;
  418. /* Note: There are no secure/non-secure boundaries for QSPI. These symbols are provided for the RA configuration tool. */
  419. __tz_QSPI_FLASH_N = __qspi_non_retentive_end__;
  420. /* Support for OctaRAM */
  421. .OSPI_DEVICE_0_NO_LOAD (NOLOAD):
  422. {
  423. . = ALIGN(4);
  424. __ospi_device_0_start__ = .;
  425. *(.ospi_device_0_no_load*)
  426. . = ALIGN(4);
  427. __ospi_device_0_end__ = .;
  428. } > OSPI_DEVICE_0_RAM
  429. .OSPI_DEVICE_1_NO_LOAD (NOLOAD):
  430. {
  431. . = ALIGN(4);
  432. __ospi_device_1_start__ = .;
  433. *(.ospi_device_1_no_load*)
  434. . = ALIGN(4);
  435. __ospi_device_1_end__ = .;
  436. } > OSPI_DEVICE_1_RAM
  437. /* Note: There are no secure/non-secure boundaries for QSPI. These symbols are provided for the RA configuration tool. */
  438. __tz_OSPI_DEVICE_0_S = ORIGIN(OSPI_DEVICE_0);
  439. /* OSPI_DEVICE_0 section to be downloaded via debugger */
  440. .OSPI_DEVICE_0 :
  441. {
  442. __ospi_device_0_start__ = .;
  443. KEEP(*(.ospi_device_0*))
  444. KEEP(*(.code_in_ospi_device_0*))
  445. __ospi_device_0_end__ = .;
  446. } > OSPI_DEVICE_0
  447. __ospi_device_0_code_size__ = __ospi_device_0_end__ - __ospi_device_0_start__;
  448. /* OSPI_DEVICE_0 non-retentive section, creates a copy in internal flash that can be copied to OSPI */
  449. __ospi_device_0_code_addr__ = sgstubs_pre_location + (SIZEOF(.qspi_non_retentive));
  450. .ospi_device_0_non_retentive : AT(__ospi_device_0_code_addr__)
  451. {
  452. __ospi_device_0_non_retentive_start__ = .;
  453. KEEP(*(.ospi_device_0_non_retentive*))
  454. __ospi_device_0_non_retentive_end__ = .;
  455. } > OSPI_DEVICE_0
  456. __ospi_device_0_non_retentive_size__ = __ospi_device_0_non_retentive_end__ - __ospi_device_0_non_retentive_start__;
  457. __ospi_device_0_region_max_size__ = 0x8000000; /* Must be the same as defined in MEMORY above */
  458. __ospi_device_0_region_start_address__ = __ospi_device_0_start__;
  459. __ospi_device_0_region_end_address__ = __ospi_device_0_start__ + __ospi_device_0_region_max_size__;
  460. /* Note: There are no secure/non-secure boundaries for OSPI. These symbols are provided for the RA configuration tool. */
  461. __tz_OSPI_DEVICE_0_N = __ospi_device_0_non_retentive_end__;
  462. /* Note: There are no secure/non-secure boundaries for OSPI. These symbols are provided for the RA configuration tool. */
  463. __tz_OSPI_DEVICE_1_S = ORIGIN(OSPI_DEVICE_1);
  464. /* OSPI_DEVICE_1 section to be downloaded via debugger */
  465. .OSPI_DEVICE_1 :
  466. {
  467. __ospi_device_1_start__ = .;
  468. KEEP(*(.ospi_device_1*))
  469. KEEP(*(.code_in_ospi_device_1*))
  470. __ospi_device_1_end__ = .;
  471. } > OSPI_DEVICE_1
  472. __ospi_device_1_code_size__ = __ospi_device_1_end__ - __ospi_device_1_start__;
  473. /* OSPI_DEVICE_1 non-retentive section, creates a copy in internal flash that can be copied to OSPI */
  474. __ospi_device_1_code_addr__ = sgstubs_pre_location + (SIZEOF(.qspi_non_retentive) + SIZEOF(.ospi_device_0_non_retentive));
  475. .ospi_device_1_non_retentive : AT(__ospi_device_1_code_addr__)
  476. {
  477. __ospi_device_1_non_retentive_start__ = .;
  478. KEEP(*(.ospi_device_1_non_retentive*))
  479. __ospi_device_1_non_retentive_end__ = .;
  480. } > OSPI_DEVICE_1
  481. __ospi_device_1_non_retentive_size__ = __ospi_device_1_non_retentive_end__ - __ospi_device_1_non_retentive_start__;
  482. __ospi_device_1_region_max_size__ = 0x10000000; /* Must be the same as defined in MEMORY above */
  483. __ospi_device_1_region_start_address__ = __ospi_device_1_start__;
  484. __ospi_device_1_region_end_address__ = __ospi_device_1_start__ + __ospi_device_1_region_max_size__;
  485. /* Note: There are no secure/non-secure boundaries for OSPI. These symbols are provided for the RA configuration tool. */
  486. __tz_OSPI_DEVICE_1_N = __ospi_device_1_non_retentive_end__;
  487. .noinit (NOLOAD):
  488. {
  489. . = ALIGN(4);
  490. __noinit_start = .;
  491. KEEP(*(.noinit*))
  492. . = ALIGN(8);
  493. /* Place the FreeRTOS heap here so that the __HeapLimit calculation does not include the freertos heap. */
  494. KEEP(*(.heap.*))
  495. __noinit_end = .;
  496. } > RAM
  497. . = .;
  498. __nocache_pre_location = .;
  499. .nocache ALIGN(32) (NOLOAD):
  500. {
  501. __nocache_start = .;
  502. KEEP(*(.nocache))
  503. . = ALIGN(32);
  504. __nocache_end = .;
  505. } > RAM
  506. . = (SIZEOF(.nocache) > 0) ? __nocache_end : __nocache_pre_location;
  507. .bss :
  508. {
  509. . = ALIGN(4);
  510. __bss_start__ = .;
  511. *(.bss*)
  512. *(COMMON)
  513. . = ALIGN(4);
  514. __bss_end__ = .;
  515. } > RAM
  516. .heap (NOLOAD):
  517. {
  518. . = ALIGN(8);
  519. __HeapBase = .;
  520. /* Place the STD heap here. */
  521. KEEP(*(.heap))
  522. __HeapLimit = .;
  523. } > RAM
  524. /* Stacks are stored in this section. */
  525. .stack_dummy (NOLOAD):
  526. {
  527. . = ALIGN(8);
  528. __StackLimit = .;
  529. /* Main stack */
  530. KEEP(*(.stack))
  531. __StackTop = .;
  532. /* Thread stacks */
  533. KEEP(*(.stack*))
  534. __StackTopAll = .;
  535. } > RAM
  536. PROVIDE(__stack = __StackTopAll);
  537. /* This symbol represents the end of user allocated RAM. The RAM after this symbol can be used
  538. at run time for things such as ThreadX memory pool allocations. */
  539. __RAM_segment_used_end__ = ALIGN(__StackTopAll , 4);
  540. /* RAM_NSC_START can be used to set a fixed address for non-secure callable RAM in secure projects.
  541. * If it is not specified, the address for NSC RAM is the end of RAM aligned to a 1K boundary.
  542. * In flat projects that require non-secure RAM, this variable is set to the start of non-secure RAM. */
  543. __RAM_NSC_START = DEFINED(RAM_NSC_START) ? ABSOLUTE(RAM_NSC_START - RAM_NS_BUFFER_BLOCK_LENGTH) : __RESERVE_NS_RAM ? ABSOLUTE(RAM_NS_BUFFER_BLOCK_START) : ALIGN(__RAM_segment_used_end__, 1024);
  544. /* RAM_NS_START can be used to set a fixed address for non-secure RAM in secure projects or flat projects.
  545. * RAM_NS_BUFFER_BLOCK_LENGTH is used to allocate non-secure buffers in a flat project. If it is not
  546. * specified, the address for NSC RAM is the end of RAM aligned to an 8K boundary.
  547. * In flat projects that require non-secure RAM, this variable is set to the start of non-secure RAM. */
  548. __tz_RAM_N = DEFINED(FLASH_BOOTLOADER_LENGTH) ? (RAM_START + RAM_LENGTH - RAM_APPLICATION_NS_LENGTH) : DEFINED(RAM_NS_START) ? ABSOLUTE(RAM_NS_START - RAM_NS_BUFFER_BLOCK_LENGTH) : __RESERVE_NS_RAM ? ABSOLUTE(RAM_NS_BUFFER_BLOCK_START) : ALIGN(__RAM_NSC_START, 8192);
  549. /* Non-secure buffers must be in non-secure RAM. This is primarily used for the EDMAC in flat projects.
  550. * The EDMAC is a non-secure bus master and can only access non-secure RAM. */
  551. .ns_buffer (NOLOAD):
  552. {
  553. /* Allocate RAM on a 32-byte boundary to help with placement of Ethernet buffers. */
  554. . = __RESERVE_NS_RAM ? ABSOLUTE(RAM_NS_BUFFER_START & 0xFFFFFFE0) : .;
  555. KEEP(*(.ns_buffer*))
  556. } > RAM
  557. /* Data flash. */
  558. .data_flash :
  559. {
  560. . = ORIGIN(DATA_FLASH);
  561. __tz_DATA_FLASH_S = .;
  562. __Data_Flash_Start = .;
  563. KEEP(*(.data_flash*))
  564. __Data_Flash_End = .;
  565. __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);
  566. } > DATA_FLASH
  567. /* Note: There are no secure/non-secure boundaries for SDRAM. These symbols are provided for the RA configuration tool. */
  568. __tz_SDRAM_S = ORIGIN(SDRAM);
  569. /* SDRAM */
  570. .sdram (NOLOAD):
  571. {
  572. __SDRAM_Start = .;
  573. KEEP(*(.sdram*))
  574. KEEP(*(.frame*))
  575. __SDRAM_End = .;
  576. } > SDRAM
  577. . = .;
  578. __nocache_sdram_pre_location = .;
  579. .nocache_sdram ALIGN(32) (NOLOAD):
  580. {
  581. __nocache_sdram_start = .;
  582. KEEP(*(.nocache_sdram))
  583. . = ALIGN(32);
  584. __nocache_sdram_end = .;
  585. } > SDRAM
  586. . = (SIZEOF(.nocache_sdram) > 0) ? __nocache_sdram_end : __nocache_sdram_pre_location;
  587. /* Note: There are no secure/non-secure boundaries for SDRAM. These symbols are provided for the RA configuration tool. */
  588. __tz_SDRAM_N = __SDRAM_End;
  589. /* Note: There are no secure/non-secure boundaries for ID_CODE. These symbols are provided for the RA configuration tool. */
  590. __tz_ID_CODE_S = ORIGIN(ID_CODE);
  591. /* Note: There are no secure/non-secure boundaries for ID_CODE. These symbols are provided for the RA configuration tool.
  592. * Set this symbol to the same value as __tz_ID_CODE_S so the RA configuration tool does not split the ID_CODE
  593. * memory region between TrustZone projects. */
  594. __tz_ID_CODE_N = __tz_ID_CODE_S;
  595. .id_code :
  596. {
  597. __ID_Code_Start = .;
  598. KEEP(*(.id_code*))
  599. __ID_Code_End = .;
  600. } > ID_CODE
  601. /* Symbol required for RA Configuration tool. */
  602. __tz_OPTION_SETTING_S = ORIGIN(OPTION_SETTING_OFS);
  603. .option_setting_ofs :
  604. {
  605. __OPTION_SETTING_OFS_Start = .;
  606. KEEP(*(.option_setting_ofs0))
  607. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_OFS_Start + 0x04 : __OPTION_SETTING_OFS_Start;
  608. KEEP(*(.option_setting_ofs2))
  609. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_OFS_Start + 0x10 : __OPTION_SETTING_OFS_Start;
  610. KEEP(*(.option_setting_dualsel))
  611. __OPTION_SETTING_OFS_End = .;
  612. } > OPTION_SETTING_OFS = 0xFF
  613. .option_setting_sas :
  614. {
  615. __OPTION_SETTING_SAS_Start = .;
  616. KEEP(*(.option_setting_sas))
  617. __OPTION_SETTING_SAS_End = .;
  618. } > OPTION_SETTING_SAS = 0xFF
  619. /* Symbol required for RA Configuration tool. */
  620. __tz_OPTION_SETTING_N = ABSOLUTE(OPTION_SETTING_START_NS);
  621. .option_setting_ns :
  622. {
  623. __OPTION_SETTING_NS_Start = .;
  624. KEEP(*(.option_setting_ofs1))
  625. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x04 : __OPTION_SETTING_NS_Start;
  626. KEEP(*(.option_setting_ofs3))
  627. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x10 : __OPTION_SETTING_NS_Start;
  628. KEEP(*(.option_setting_banksel))
  629. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x40 : __OPTION_SETTING_NS_Start;
  630. KEEP(*(.option_setting_bps0))
  631. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x44 : __OPTION_SETTING_NS_Start;
  632. KEEP(*(.option_setting_bps1))
  633. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x48 : __OPTION_SETTING_NS_Start;
  634. KEEP(*(.option_setting_bps2))
  635. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x4C : __OPTION_SETTING_NS_Start;
  636. KEEP(*(.option_setting_bps3))
  637. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x60 : __OPTION_SETTING_NS_Start;
  638. KEEP(*(.option_setting_pbps0))
  639. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x64 : __OPTION_SETTING_NS_Start;
  640. KEEP(*(.option_setting_pbps1))
  641. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x68 : __OPTION_SETTING_NS_Start;
  642. KEEP(*(.option_setting_pbps2))
  643. . = USE_OPTION_SETTING_NS ? __OPTION_SETTING_NS_Start + 0x6C : __OPTION_SETTING_NS_Start;
  644. KEEP(*(.option_setting_pbps3))
  645. __OPTION_SETTING_NS_End = .;
  646. } > OPTION_SETTING = 0xFF
  647. /* Symbol required for RA Configuration tool. */
  648. __tz_OPTION_SETTING_S_S = ORIGIN(OPTION_SETTING_S);
  649. .option_setting_s :
  650. {
  651. __OPTION_SETTING_S_Start = .;
  652. KEEP(*(.option_setting_ofs1_sec))
  653. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x04 : __OPTION_SETTING_S_Start;
  654. KEEP(*(.option_setting_ofs3_sec))
  655. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x10 : __OPTION_SETTING_S_Start;
  656. KEEP(*(.option_setting_banksel_sec))
  657. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x40 : __OPTION_SETTING_S_Start;
  658. KEEP(*(.option_setting_bps_sec0))
  659. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x44 : __OPTION_SETTING_S_Start;
  660. KEEP(*(.option_setting_bps_sec1))
  661. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x48 : __OPTION_SETTING_S_Start;
  662. KEEP(*(.option_setting_bps_sec2))
  663. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x4C : __OPTION_SETTING_S_Start;
  664. KEEP(*(.option_setting_bps_sec3))
  665. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x60 : __OPTION_SETTING_S_Start;
  666. KEEP(*(.option_setting_pbps_sec0))
  667. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x64 : __OPTION_SETTING_S_Start;
  668. KEEP(*(.option_setting_pbps_sec1))
  669. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x68 : __OPTION_SETTING_S_Start;
  670. KEEP(*(.option_setting_pbps_sec2))
  671. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x6C : __OPTION_SETTING_S_Start;
  672. KEEP(*(.option_setting_pbps_sec3))
  673. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x80 : __OPTION_SETTING_S_Start;
  674. KEEP(*(.option_setting_ofs1_sel))
  675. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x84 : __OPTION_SETTING_S_Start;
  676. KEEP(*(.option_setting_ofs3_sel))
  677. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0x90 : __OPTION_SETTING_S_Start;
  678. KEEP(*(.option_setting_banksel_sel))
  679. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0xC0 : __OPTION_SETTING_S_Start;
  680. KEEP(*(.option_setting_bps_sel0))
  681. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0xC4 : __OPTION_SETTING_S_Start;
  682. KEEP(*(.option_setting_bps_sel1))
  683. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0xC8 : __OPTION_SETTING_S_Start;
  684. KEEP(*(.option_setting_bps_sel2))
  685. . = PROJECT_SECURE_OR_FLAT ? __OPTION_SETTING_S_Start + 0xCC : __OPTION_SETTING_S_Start;
  686. KEEP(*(.option_setting_bps_sel3))
  687. __OPTION_SETTING_S_End = .;
  688. } > OPTION_SETTING_S = 0xFF
  689. /* Symbol required for RA Configuration tool. */
  690. __tz_OPTION_SETTING_S_N = __OPTION_SETTING_S_End;
  691. /* Symbol required for RA Configuration tool. */
  692. __tz_OPTION_SETTING_DATA_FLASH_S_S = ORIGIN(OPTION_SETTING_DATA_FLASH_S);
  693. .option_setting_data_flash_s :
  694. {
  695. __OPTION_SETTING_DATA_FLASH_S_Start = .;
  696. KEEP(*(.option_setting_data_flash_fsblctrl0))
  697. . = USE_OPTION_SETTING_DATA_FLASH ? __OPTION_SETTING_DATA_FLASH_S_Start + 0x04 : __OPTION_SETTING_DATA_FLASH_S_Start;
  698. KEEP(*(.option_setting_data_flash_fsblctrl1))
  699. . = USE_OPTION_SETTING_DATA_FLASH ? __OPTION_SETTING_DATA_FLASH_S_Start + 0x08 : __OPTION_SETTING_DATA_FLASH_S_Start;
  700. KEEP(*(.option_setting_data_flash_fsblctrl2))
  701. . = USE_OPTION_SETTING_DATA_FLASH ? __OPTION_SETTING_DATA_FLASH_S_Start + 0x0C : __OPTION_SETTING_DATA_FLASH_S_Start;
  702. KEEP(*(.option_setting_data_flash_sacc0))
  703. . = USE_OPTION_SETTING_DATA_FLASH ? __OPTION_SETTING_DATA_FLASH_S_Start + 0x10 : __OPTION_SETTING_DATA_FLASH_S_Start;
  704. KEEP(*(.option_setting_data_flash_sacc1))
  705. . = USE_OPTION_SETTING_DATA_FLASH ? __OPTION_SETTING_DATA_FLASH_S_Start + 0x14 : __OPTION_SETTING_DATA_FLASH_S_Start;
  706. KEEP(*(.option_setting_data_flash_samr))
  707. . = USE_OPTION_SETTING_DATA_FLASH ? __OPTION_SETTING_DATA_FLASH_S_Start + 0x2E0 : __OPTION_SETTING_DATA_FLASH_S_Start;
  708. KEEP(*(.option_setting_data_flash_hoemrtpk))
  709. __OPTION_SETTING_DATA_FLASH_S_End = .;
  710. } > OPTION_SETTING_DATA_FLASH_S = 0xFF
  711. /* Symbol required for RA Configuration tool. */
  712. __tz_OPTION_SETTING_DATA_FLASH_S_N = __OPTION_SETTING_DATA_FLASH_S_End;
  713. }