linker_flash_s32k146.ldfls 6.4 KB

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