rlx8711B-symbol-v02-img2_xip1.ld 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. ENTRY(Reset_Handler)
  2. INCLUDE "export-rom_symbol_v01.txt"
  3. MEMORY
  4. {
  5. ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x80000 /* ROM: 512k */
  6. ROMBSS_RAM (rw) : ORIGIN = 0x10000000, LENGTH = 0x2000 /* ROM BSS RAM: 8K */
  7. BOOTLOADER_RAM (rwx) : ORIGIN = 0x10002000, LENGTH = 0x3000 /* BOOT Loader RAM: 12K */
  8. BD_RAM (rwx) : ORIGIN = 0x10005000, LENGTH = 0x2B000 /* MAIN RAM: 228 */
  9. MSP_RAM (wx) : ORIGIN = 0x1003E000, LENGTH = 0x1000 /* MSP RAM: 4k */
  10. RDP_RAM (wx) : ORIGIN = 0x1003F000, LENGTH = 0xFF0 /* RDP RAM: 4k-0x10 */
  11. XIPBOOT (rx) : ORIGIN = 0x08000000+0x20, LENGTH = 0x04000-0x20 /* XIPBOOT: 32k, 32 Bytes resvd for header*/
  12. XIPSYS (r) : ORIGIN = 0x08009000, LENGTH = 0x1000 /* XIPSYS: 4K system data in flash */
  13. XIPCAL (r) : ORIGIN = 0x0800A000, LENGTH = 0x1000 /* XIPCAL: 4K calibration data in flash */
  14. XIP1 (rx) : ORIGIN = 0x0800B000+0x20, LENGTH = 0x75000-0x20 /* XIP1: 468k, 32 Bytes resvd for header */
  15. XIP2 (rx) : ORIGIN = 0x08080000+0x20, LENGTH = 0x75000-0x20 /* XIP2: 468k, 32 Bytes resvd for header */
  16. }
  17. SECTIONS
  18. {
  19. .rom.text : { } > ROM
  20. .rom.rodata : { } > ROM
  21. .hal.rom.bss : { } > ROMBSS_RAM
  22. /* image1 entry, this section should in RAM and fixed address for ROM */
  23. .ram_image1.entry :
  24. {
  25. __ram_image1_text_start__ = .;
  26. __ram_start_table_start__ = .;
  27. KEEP(*(SORT(.image1.entry.data*)))
  28. __ram_start_table_end__ = .;
  29. __image1_validate_code__ = .;
  30. KEEP(*(.image1.validate.rodata*))
  31. KEEP(*(.image1.export.symb*))
  32. } > BOOTLOADER_RAM
  33. /* Add . to assign the start address of the section */
  34. /* to prevent the change of the start address by ld doing section alignment */
  35. .ram_image1.text . :
  36. {
  37. /* image1 text */
  38. *(.boot.ram.text*)
  39. *(.boot.rodata*)
  40. } > BOOTLOADER_RAM
  41. .ram_image1.data . :
  42. {
  43. __ram_image1_data_start__ = .;
  44. KEEP(*(.boot.ram.data*))
  45. __ram_image1_data_end__ = .;
  46. __ram_image1_text_end__ = .;
  47. } > BOOTLOADER_RAM
  48. .ram_image1.bss . :
  49. {
  50. __image1_bss_start__ = .;
  51. KEEP(*(.boot.ram.bss*))
  52. KEEP(*(.boot.ram.end.bss*))
  53. __image1_bss_end__ = .;
  54. } > BOOTLOADER_RAM
  55. .ram_image2.entry :
  56. {
  57. __ram_image2_text_start__ = .;
  58. __image2_entry_func__ = .;
  59. KEEP(*(SORT(.image2.entry.data*)))
  60. __image2_validate_code__ = .;
  61. KEEP(*(.image2.validate.rodata*))
  62. } > BD_RAM
  63. .ram_image2.text :
  64. {
  65. KEEP(*(.image2.ram.text*))
  66. } > BD_RAM
  67. .ram_image2.data :
  68. {
  69. __data_start__ = .;
  70. *(.data*)
  71. __data_end__ = .;
  72. __ram_image2_text_end__ = .;
  73. . = ALIGN(16);
  74. } > BD_RAM
  75. .ram_image2.bss :
  76. {
  77. __bss_start__ = .;
  78. *(.bss*)
  79. *(COMMON)
  80. } > BD_RAM
  81. .ram_image2.skb.bss :
  82. {
  83. *(.bdsram.data*)
  84. __bss_end__ = .;
  85. } > BD_RAM
  86. .ram_heap.data :
  87. {
  88. *(.bfsram.data*)
  89. *(.heap.stdlib*)
  90. . = ALIGN(4);
  91. __rtt_heap_start = .;
  92. } > BD_RAM
  93. .ram_rdp.text :
  94. {
  95. __rom_top_4k_start_ = .;
  96. __rdp_text_start__ = .;
  97. KEEP(*(.rdp.ram.text*))
  98. KEEP(*(.rdp.ram.data*))
  99. __rdp_text_end__ = .;
  100. . = ALIGN(16);
  101. } > RDP_RAM
  102. .xip_image1.text :
  103. {
  104. __flash_boot_text_start__ = .;
  105. *(.flashboot.text*)
  106. __flash_boot_text_end__ = .;
  107. . = ALIGN(16);
  108. } > XIPBOOT
  109. .xip_image2.text :
  110. {
  111. __flash_text_start__ = .;
  112. *(.img2_custom_signature*)
  113. *(.text*)
  114. *(.rodata*)
  115. *(.debug_trace*)
  116. __flash_text_end__ = .;
  117. /* section information for finsh shell */
  118. . = ALIGN(4);
  119. __fsymtab_start = .;
  120. KEEP(*(FSymTab))
  121. __fsymtab_end = .;
  122. . = ALIGN(4);
  123. __vsymtab_start = .;
  124. KEEP(*(VSymTab))
  125. __vsymtab_end = .;
  126. . = ALIGN(4);
  127. /* section information for initial. */
  128. . = ALIGN(4);
  129. __rt_init_start = .;
  130. KEEP(*(SORT(.rti_fn*)))
  131. __rt_init_end = .;
  132. . = ALIGN(4);
  133. . = ALIGN (16);
  134. } > XIP1
  135. }
  136. SECTIONS
  137. {
  138. /* Bootloader symbol list */
  139. boot_export_symbol = 0x10002020;
  140. }