linker_ram_s32k146.ld 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. * 0x1FFF0000 0x1FFFFFFF 65536 SRAM_L
  27. * 0x20000000 0x2000EFFF 61440 SRAM_U
  28. */
  29. MEMORY
  30. {
  31. int_sram_results : ORIGIN = 0x1FFF0000, LENGTH = 0x00000100 /* 256bytes */
  32. int_sram : ORIGIN = 0x1FFF0100, LENGTH = 0x0001DF00 /* ~120K */
  33. int_sram_stack_c0 : ORIGIN = 0x2000E000, LENGTH = 0x00001000 /* 4K */
  34. ram_rsvd2 : ORIGIN = 0x2000F000, LENGTH = 0 /* End of SRAM */
  35. }
  36. HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x00000200;
  37. ENTRY(Reset_Handler)
  38. SECTIONS
  39. {
  40. .sram :
  41. {
  42. . = ALIGN(4096);
  43. __interrupts_ram_start = .;
  44. KEEP(*(.intc_vector))
  45. . = ALIGN(4);
  46. __interrupts_ram_end = .;
  47. . = ALIGN(4);
  48. *(.startup)
  49. . = ALIGN(4);
  50. *(.systeminit)
  51. . = ALIGN(4);
  52. *(.text.startup)
  53. . = ALIGN(4);
  54. *(.text)
  55. *(.text*)
  56. . = ALIGN(4);
  57. *(.mcal_text)
  58. . = ALIGN(4);
  59. KEEP(*(.init))
  60. . = ALIGN(4);
  61. KEEP(*(.fini))
  62. . = ALIGN(4);
  63. *(.rodata)
  64. *(.rodata*)
  65. . = ALIGN(4);
  66. *(.mcal_const_cfg)
  67. . = ALIGN(4);
  68. *(.mcal_const)
  69. . = ALIGN(4);
  70. *(.mcal_const_no_cacheable)
  71. . = ALIGN(4);
  72. __init_table = .;
  73. KEEP(*(.init_table))
  74. . = ALIGN(4);
  75. __zero_table = .;
  76. KEEP(*(.zero_table))
  77. . = ALIGN(4);
  78. *(.acmcu_code_rom)
  79. . = ALIGN(4);
  80. *(.ramcode)
  81. . = ALIGN(4);
  82. *(.data)
  83. *(.data*)
  84. . = ALIGN(4);
  85. *(.mcal_data)
  86. . = ALIGN(4);
  87. *(.mcal_data_no_cacheable)
  88. . = ALIGN(16);
  89. __sram_bss_start = .;
  90. *(.bss)
  91. *(.bss*)
  92. . = ALIGN(16);
  93. *(.mcal_bss)
  94. . = ALIGN(16);
  95. __non_cacheable_bss_start = .;
  96. *(.mcal_bss_no_cacheable)
  97. . = ALIGN(4);
  98. __non_cacheable_bss_end = .;
  99. __sram_bss_end = .;
  100. } > int_sram
  101. .acfls_code_rom :
  102. {
  103. acfls_code_rom_start = .;
  104. . = ALIGN(0x4);
  105. *(.acfls_code_rom)
  106. acfls_code_rom_end = .;
  107. } > int_sram
  108. .acfls_code_ram :
  109. {
  110. . += (acfls_code_rom_end - acfls_code_rom_start );
  111. } > int_sram
  112. /* heap section */
  113. .heap (NOLOAD):
  114. {
  115. . = ALIGN(4);
  116. _end = .;
  117. end = .;
  118. _heap_start = .;
  119. . += HEAP_SIZE;
  120. _heap_end = .;
  121. } > int_sram
  122. int_results (NOLOAD):
  123. {
  124. . = ALIGN(4);
  125. KEEP(*(.int_results))
  126. . += 0x100;
  127. } > int_sram_results
  128. __Stack_end_c0 = ORIGIN(int_sram_stack_c0);
  129. __Stack_start_c0 = ORIGIN(int_sram_stack_c0) + LENGTH(int_sram_stack_c0);
  130. __INT_SRAM_START = ORIGIN(int_sram_results);
  131. __INT_SRAM_END = ORIGIN(ram_rsvd2);
  132. __RAM_INIT_START = ORIGIN(int_sram);
  133. __RAM_INIT_END = ORIGIN(int_sram) + LENGTH(int_sram) - 1;
  134. __ROM_INIT_START = 0;
  135. __ROM_INIT_END = 0;
  136. __BSS_SRAM_START = __sram_bss_start;
  137. __BSS_SRAM_END = __sram_bss_end;
  138. __BSS_SRAM_SIZE = __sram_bss_end - __sram_bss_start;
  139. __RAM_INTERRUPT_START = __interrupts_ram_start;
  140. __ROM_INTERRUPT_START = 0;
  141. __ROM_INTERRUPT_END = 0;
  142. __INIT_TABLE = __init_table;
  143. __ZERO_TABLE = __zero_table;
  144. __RAM_INIT = 0;
  145. /* Discard boot header in RAM */
  146. /DISCARD/ : { *(.flash_config) }
  147. /* Fls module access code support */
  148. Fls_ACEraseRomStart = ADDR(.acfls_code_rom);
  149. Fls_ACEraseRomEnd = ADDR(.acfls_code_rom) + SIZEOF(.acfls_code_rom);
  150. Fls_ACEraseSize = (SIZEOF(.acfls_code_rom)+3) / 4; /* Copy 4 bytes at a time*/
  151. Fls_ACWriteRomStart = ADDR(.acfls_code_rom);
  152. Fls_ACWriteRomEnd = ADDR(.acfls_code_rom) + SIZEOF(.acfls_code_rom);
  153. Fls_ACWriteSize = (SIZEOF(.acfls_code_rom)+3) / 4; /* Copy 4 bytes at a time*/
  154. _ERASE_FUNC_ADDRESS_ = ADDR(.acfls_code_ram);
  155. _WRITE_FUNC_ADDRESS_ = ADDR(.acfls_code_ram);
  156. __ENTRY_VTABLE = __RAM_INTERRUPT_START;
  157. }