linker_flash_s32k146.ld 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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 = 0x00000000, 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 = 0x00000410, LENGTH = 0x000FFBF0 /* ~1.0MB */
  35. int_sram_results : ORIGIN = 0x1FFF0000, LENGTH = 0x00000100 /* 256bytes */
  36. int_sram : ORIGIN = 0x1FFF0100, LENGTH = 0x0001DF00 /* ~120K */
  37. int_sram_stack_c0 : ORIGIN = 0x2000E000, LENGTH = 0x00001000 /* 4K */
  38. ram_rsvd2 : ORIGIN = 0x2000F000, LENGTH = 0 /* End of SRAM */
  39. }
  40. HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x00000200;
  41. ENTRY(Reset_Handler)
  42. SECTIONS
  43. {
  44. .flash_interrupts :
  45. {
  46. . = ALIGN(4096);
  47. __interrupts_rom_start = .;
  48. KEEP(*(.intc_vector))
  49. . = ALIGN(4);
  50. __interrupts_rom_end = .;
  51. } > int_flash_interrupts
  52. .flash_config :
  53. {
  54. KEEP(*(.flash_config))
  55. } > int_flash_config
  56. .flash :
  57. {
  58. . = ALIGN(4);
  59. *(.startup)
  60. . = ALIGN(4);
  61. *(.systeminit)
  62. . = ALIGN(4);
  63. *(.text.startup)
  64. . = ALIGN(4);
  65. *(.text)
  66. *(.text*)
  67. . = ALIGN(4);
  68. *(.mcal_text)
  69. . = ALIGN(4);
  70. acfls_code_rom_start = .;
  71. . = ALIGN(0x4);
  72. *(.acfls_code_rom)
  73. acfls_code_rom_end = .;
  74. KEEP(*(.init))
  75. . = ALIGN(4);
  76. KEEP(*(.fini))
  77. . = ALIGN(4);
  78. *(.rodata)
  79. *(.rodata*)
  80. . = ALIGN(4);
  81. *(.mcal_const_cfg)
  82. . = ALIGN(4);
  83. *(.mcal_const)
  84. . = ALIGN(4);
  85. *(.mcal_const_no_cacheable)
  86. . = ALIGN(4);
  87. __init_table = .;
  88. KEEP(*(.init_table))
  89. . = ALIGN(4);
  90. __zero_table = .;
  91. KEEP(*(.zero_table))
  92. . = ALIGN(4);
  93. *(.acmcu_code_rom)
  94. . = ALIGN(4);
  95. _etext = .;
  96. __DATA_ROM = .;
  97. } > int_flash
  98. . = ALIGN(4);
  99. PROVIDE(__exidx_start = .);
  100. .ARM.exidx :
  101. {
  102. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  103. }> int_sram
  104. . = ALIGN(4);
  105. PROVIDE(__exidx_end = .);
  106. .ARM.extab :
  107. {
  108. *(.ARM.extab*)
  109. . = ALIGN(4);
  110. } > int_sram
  111. .sram_interrupts :
  112. {
  113. . = ALIGN(4096);
  114. __interrupts_ram_start = .;
  115. . += (__interrupts_rom_end - __interrupts_rom_start);
  116. . = ALIGN(4);
  117. __interrupts_ram_end = .;
  118. } > int_sram
  119. .sram_data : AT(__DATA_ROM)
  120. {
  121. . = ALIGN(4);
  122. __data_ram_start = .;
  123. *(.ramcode)
  124. . = ALIGN(4);
  125. *(.data)
  126. *(.data*)
  127. . = ALIGN(4);
  128. *(.mcal_data)
  129. . = ALIGN(4);
  130. *(.mcal_data_no_cacheable)
  131. . = ALIGN(4);
  132. __data_ram_end = .;
  133. } > int_sram
  134. __DATA_ROM_END = __DATA_ROM + (__data_ram_end - __data_ram_start);
  135. .sram_bss (NOLOAD) :
  136. {
  137. . = ALIGN(16);
  138. __sram_bss_start = .;
  139. *(.bss)
  140. *(.bss*)
  141. . = ALIGN(16);
  142. *(.mcal_bss)
  143. . = ALIGN(16);
  144. __non_cacheable_bss_start = .;
  145. *(.mcal_bss_no_cacheable)
  146. . = ALIGN(4);
  147. __non_cacheable_bss_end = .;
  148. __sram_bss_end = .;
  149. } > int_sram
  150. .acfls_code_ram :
  151. {
  152. . += (acfls_code_rom_end - acfls_code_rom_start );
  153. } > int_sram
  154. /* heap section */
  155. .heap (NOLOAD):
  156. {
  157. . = ALIGN(4);
  158. _end = .;
  159. end = .;
  160. _heap_start = .;
  161. . += HEAP_SIZE;
  162. _heap_end = .;
  163. } > int_sram
  164. int_results (NOLOAD):
  165. {
  166. . = ALIGN(4);
  167. KEEP(*(.int_results))
  168. . += 0x100;
  169. } > int_sram_results
  170. __Stack_end_c0 = ORIGIN(int_sram_stack_c0);
  171. __Stack_start_c0 = ORIGIN(int_sram_stack_c0) + LENGTH(int_sram_stack_c0);
  172. __INT_SRAM_START = ORIGIN(int_sram_results);
  173. __INT_SRAM_END = ORIGIN(ram_rsvd2);
  174. __RAM_INIT_START = __data_ram_start;
  175. __RAM_INIT_END = __data_ram_end;
  176. __ROM_INIT_START = __DATA_ROM;
  177. __ROM_INIT_END = __DATA_ROM_END;
  178. __BSS_SRAM_START = __sram_bss_start;
  179. __BSS_SRAM_END = __sram_bss_end;
  180. __BSS_SRAM_SIZE = __sram_bss_end - __sram_bss_start;
  181. __RAM_INTERRUPT_START = __interrupts_ram_start;
  182. __ROM_INTERRUPT_START = __interrupts_rom_start;
  183. __ROM_INTERRUPT_END = __interrupts_rom_end;
  184. __INIT_TABLE = __init_table;
  185. __ZERO_TABLE = __zero_table;
  186. __RAM_INIT = 1;
  187. /* Fls module access code support */
  188. Fls_ACEraseRomStart = acfls_code_rom_start;
  189. Fls_ACEraseRomEnd = acfls_code_rom_end;
  190. Fls_ACEraseSize = acfls_code_rom_end - acfls_code_rom_start;
  191. Fls_ACWriteRomStart = acfls_code_rom_start;
  192. Fls_ACWriteRomEnd = acfls_code_rom_end;
  193. Fls_ACWriteSize = acfls_code_rom_end - acfls_code_rom_start;
  194. _ERASE_FUNC_ADDRESS_ = ADDR(.acfls_code_ram);
  195. _WRITE_FUNC_ADDRESS_ = ADDR(.acfls_code_ram);
  196. __ENTRY_VTABLE = __RAM_INTERRUPT_START;
  197. }