linker_flash_s32k146.ldota 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral :
  5. * Dependencies : none
  6. *
  7. * Autosar Version : 4.4.0
  8. * Autosar Revision : ASR_REL_4_4_REV_0000
  9. * Autosar Conf.Variant :
  10. * SW Version : 1.0.0
  11. * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
  12. *
  13. * (c) Copyright 2020-2021 NXP Semiconductors
  14. * All Rights Reserved.
  15. *
  16. * NXP Confidential. This software is owned or controlled by NXP and may only be
  17. * used strictly in accordance with the applicable license terms. By expressly
  18. * accepting such terms or by downloading, installing, activating and/or otherwise
  19. * using the software, you are agreeing that you have read, and that you agree to
  20. * comply with and are bound by, such license terms. If you do not agree to be
  21. * bound by the applicable license terms, then you may not retain, install,
  22. * activate or otherwise use the software.
  23. ==================================================================================================*/
  24. /*
  25. * GCC Linker Command File:
  26. * 0x00000000 0x000FFFFF 1024KB Flash
  27. * 0x1FFF0000 0x1FFFFFFF 65536 SRAM_L
  28. * 0x20000000 0x2000EFFF 61440 SRAM_U
  29. */
  30. MEMORY
  31. {
  32. int_flash_interrupts : ORIGIN = 0x00014200, LENGTH = 0x00000400 /* 1K */ /* Do not change this section */
  33. /* int_flash_config : ORIGIN = 0x00000400, LENGTH = 0x00000010 /* 16bytes */ /* Do not change this section */
  34. int_flash : ORIGIN = 0x00014600, LENGTH = 0x000EBA00 /* ~1.0MB */
  35. /* int_flash_interrupts : ORIGIN = 0x00080200, LENGTH = 0x00000400 /**/
  36. /* int_flash : ORIGIN = 0x00080600, LENGTH = 0x0007FA00 /**/
  37. m_flexram : ORIGIN = 0x14000000, LENGTH = 0x00001000
  38. int_sram_results : ORIGIN = 0x1FFF0000, LENGTH = 0x00000100 /* 256bytes */
  39. int_sram : ORIGIN = 0x1FFF0100, LENGTH = 0x0001DF00 /* ~120K */
  40. int_sram_stack_c0 : ORIGIN = 0x2000E000, LENGTH = 0x00001000 - 0x10 /* 4K */
  41. ram_rsvd2 : ORIGIN = 0x2000EFF0, LENGTH = 0 /* End of SRAM */
  42. ExchangeInfo : ORIGIN = 0x2000EFF0, LENGTH = 0x10
  43. }
  44. HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x00000200;
  45. ENTRY(Reset_Handler)
  46. SECTIONS
  47. {
  48. .eeeprom (NOLOAD):
  49. {
  50. *(.eeprom)
  51. } >m_flexram
  52. .flash_interrupts :
  53. {
  54. . = ALIGN(512);
  55. __interrupts_rom_start = .;
  56. KEEP(*(.intc_vector))
  57. . = ALIGN(512);
  58. __interrupts_rom_end = .;
  59. } > int_flash_interrupts
  60. /* .flash_config : */
  61. /* { */
  62. /* KEEP(*(.flash_config)) */
  63. /* } > int_flash_config */
  64. .flash :
  65. {
  66. . = ALIGN(4);
  67. *(.startup)
  68. . = ALIGN(4);
  69. *(.systeminit)
  70. . = ALIGN(4);
  71. *(.text.startup)
  72. . = ALIGN(4);
  73. *(.text)
  74. *(.text*)
  75. . = ALIGN(4);
  76. *(.mcal_text)
  77. . = ALIGN(4);
  78. acfls_code_rom_start = .;
  79. . = ALIGN(0x4);
  80. *(.acfls_code_rom)
  81. acfls_code_rom_end = .;
  82. KEEP(*(.init))
  83. . = ALIGN(4);
  84. KEEP(*(.fini))
  85. . = ALIGN(4);
  86. *(.rodata)
  87. *(.rodata*)
  88. . = ALIGN(4);
  89. *(.mcal_const_cfg)
  90. . = ALIGN(4);
  91. *(.mcal_const)
  92. . = ALIGN(4);
  93. *(.mcal_const_no_cacheable)
  94. . = ALIGN(4);
  95. __init_table = .;
  96. KEEP(*(.init_table))
  97. . = ALIGN(4);
  98. __zero_table = .;
  99. KEEP(*(.zero_table))
  100. . = ALIGN(4);
  101. *(.acmcu_code_rom)
  102. . = ALIGN(4);
  103. _etext = .;
  104. __DATA_ROM = .;
  105. } > int_flash
  106. . = ALIGN(4);
  107. PROVIDE(__exidx_start = .);
  108. .ARM.exidx :
  109. {
  110. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  111. }> int_sram
  112. . = ALIGN(4);
  113. PROVIDE(__exidx_end = .);
  114. .ARM.extab :
  115. {
  116. *(.ARM.extab*)
  117. . = ALIGN(4);
  118. } > int_sram
  119. .sram_interrupts :
  120. {
  121. . = ALIGN(4096);
  122. __interrupts_ram_start = .;
  123. . += (__interrupts_rom_end - __interrupts_rom_start);
  124. . = ALIGN(4);
  125. __interrupts_ram_end = .;
  126. } > int_sram
  127. .sram_data : AT(__DATA_ROM)
  128. {
  129. . = ALIGN(4);
  130. __data_ram_start = .;
  131. *(.ramcode)
  132. . = ALIGN(4);
  133. *(.data)
  134. *(.data*)
  135. . = ALIGN(4);
  136. *(.mcal_data)
  137. . = ALIGN(4);
  138. *(.mcal_data_no_cacheable)
  139. . = ALIGN(4);
  140. __data_ram_end = .;
  141. } > int_sram
  142. __DATA_ROM_END = __DATA_ROM + (__data_ram_end - __data_ram_start);
  143. .sram_bss (NOLOAD) :
  144. {
  145. . = ALIGN(16);
  146. __sram_bss_start = .;
  147. *(.bss)
  148. *(.bss*)
  149. . = ALIGN(16);
  150. *(.mcal_bss)
  151. . = ALIGN(16);
  152. __non_cacheable_bss_start = .;
  153. *(.mcal_bss_no_cacheable)
  154. . = ALIGN(4);
  155. __non_cacheable_bss_end = .;
  156. __sram_bss_end = .;
  157. } > int_sram
  158. .acfls_code_ram :
  159. {
  160. . += (acfls_code_rom_end - acfls_code_rom_start );
  161. } > int_sram
  162. /* heap section */
  163. .heap (NOLOAD):
  164. {
  165. . = ALIGN(4);
  166. _end = .;
  167. end = .;
  168. _heap_start = .;
  169. . += HEAP_SIZE;
  170. _heap_end = .;
  171. } > int_sram
  172. int_results (NOLOAD):
  173. {
  174. . = ALIGN(4);
  175. KEEP(*(.int_results))
  176. . += 0x100;
  177. } > int_sram_results
  178. __Stack_end_c0 = ORIGIN(int_sram_stack_c0);
  179. __Stack_start_c0 = ORIGIN(int_sram_stack_c0) + LENGTH(int_sram_stack_c0);
  180. __INT_SRAM_START = ORIGIN(int_sram_results);
  181. __INT_SRAM_END = ORIGIN(ram_rsvd2);
  182. __RAM_INIT_START = __data_ram_start;
  183. __RAM_INIT_END = __data_ram_end;
  184. __ROM_INIT_START = __DATA_ROM;
  185. __ROM_INIT_END = __DATA_ROM_END;
  186. __BSS_SRAM_START = __sram_bss_start;
  187. __BSS_SRAM_END = __sram_bss_end;
  188. __BSS_SRAM_SIZE = __sram_bss_end - __sram_bss_start;
  189. __RAM_INTERRUPT_START = __interrupts_ram_start;
  190. __ROM_INTERRUPT_START = __interrupts_rom_start;
  191. __ROM_INTERRUPT_END = __interrupts_rom_end;
  192. __INIT_TABLE = __init_table;
  193. __ZERO_TABLE = __zero_table;
  194. __RAM_INIT = 1;
  195. /* Fls module access code support */
  196. Fls_ACEraseRomStart = acfls_code_rom_start;
  197. Fls_ACEraseRomEnd = acfls_code_rom_end;
  198. Fls_ACEraseSize = acfls_code_rom_end - acfls_code_rom_start;
  199. Fls_ACWriteRomStart = acfls_code_rom_start;
  200. Fls_ACWriteRomEnd = acfls_code_rom_end;
  201. Fls_ACWriteSize = acfls_code_rom_end - acfls_code_rom_start;
  202. _ERASE_FUNC_ADDRESS_ = ADDR(.acfls_code_ram);
  203. _WRITE_FUNC_ADDRESS_ = ADDR(.acfls_code_ram);
  204. __ENTRY_VTABLE = __RAM_INTERRUPT_START;
  205. }