image2.icf 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*###ICF### Section handled by ICF editor, don't touch! ****/
  2. /*-Editor annotation file-*/
  3. /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
  4. /*-Specials-*/
  5. //define symbol __ICFEDIT_intvec_start__ = 0x00000000;
  6. /**/
  7. /**/
  8. include "rom_symbol_v01_iar.icf";
  9. /****************************************
  10. * Memory Regions *
  11. ****************************************/
  12. define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
  13. define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF;
  14. define symbol __ICFEDIT_region_ROMBSS_RAM_start__ = 0x10000000;
  15. define symbol __ICFEDIT_region_ROMBSS_RAM_end__ = 0x10001FFF;
  16. define symbol __ICFEDIT_region_BOOTLOADER_RAM_start__ = 0x10002000;
  17. define symbol __ICFEDIT_region_BOOTLOADER_RAM_end__ = 0x10004FFF;
  18. define symbol __ICFEDIT_region_BD_RAM_start__ = 0x10005000;
  19. define symbol __ICFEDIT_region_BD_RAM_end__ = 0x1002FFFF;
  20. define symbol __ICFEDIT_region_MSP_RAM_start__ = 0x1003E000;
  21. define symbol __ICFEDIT_region_MSP_RAM_end__ = 0x1003EFFF;
  22. define symbol __ICFEDIT_region_RDP_RAM_start__ = 0x1003F000;
  23. define symbol __ICFEDIT_region_RDP_RAM_end__ = 0x1003FFEF;
  24. define symbol __ICFEDIT_region_IMG2_TEMP_start__ = 0x10006000;
  25. define symbol __ICFEDIT_region_IMG2_TEMP_end__ = 0x1000BFFF;
  26. define symbol __ICFEDIT_region_XIP_BOOT_start__ = 0x08000000+0x20;
  27. define symbol __ICFEDIT_region_XIP_BOOT_end__ = 0x08003FFF;
  28. define symbol __ICFEDIT_region_XIP_OTA1_start__ = 0x0800B000+0x20;
  29. define symbol __ICFEDIT_region_XIP_OTA1_end__ = 0x080FFFFF;
  30. /****************************************
  31. * Sizes *
  32. ****************************************/
  33. /*define symbol __ICFEDIT_size_cstack__ = 0x400;*/
  34. define symbol __ICFEDIT_size_heap__ = 0x000;
  35. /**** End of ICF editor section. ###ICF###*/
  36. define memory mem with size = 4G;
  37. define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
  38. define region ROM_BSS_region = mem:[from __ICFEDIT_region_ROMBSS_RAM_start__ to __ICFEDIT_region_ROMBSS_RAM_end__];
  39. define region BOOT_RAM_region = mem:[from __ICFEDIT_region_BOOTLOADER_RAM_start__ to __ICFEDIT_region_BOOTLOADER_RAM_end__];
  40. define region BD_RAM_region = mem:[from __ICFEDIT_region_BD_RAM_start__ to __ICFEDIT_region_BD_RAM_end__];
  41. define region IMG2_TEMP_region = mem:[from __ICFEDIT_region_IMG2_TEMP_start__ to __ICFEDIT_region_IMG2_TEMP_end__];
  42. define region XIP_BOOT_region = mem:[from __ICFEDIT_region_XIP_BOOT_start__ to __ICFEDIT_region_XIP_BOOT_end__];
  43. define region XIP_OTA1_region = mem:[from __ICFEDIT_region_XIP_OTA1_start__ to __ICFEDIT_region_XIP_OTA1_end__];
  44. define region RDP_RAM_region = mem:[from __ICFEDIT_region_RDP_RAM_start__ to __ICFEDIT_region_RDP_RAM_end__];
  45. /*define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };*/
  46. define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
  47. //initialize by copy { readwrite };
  48. //initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
  49. //do not initialize { section * };
  50. //place at address mem:__ICFEDIT_intvec_start__ { readonly section .vectors_table };
  51. //
  52. /****************************************
  53. * ROM Section config *
  54. ****************************************/
  55. keep { section FSymTab };
  56. keep { section VSymTab };
  57. keep { section .rti_fn* };
  58. keep { section .rom.text };
  59. keep { section .rom.rodata };
  60. place at start of ROM_region { readonly, section .rom.text, section .rom.rodata};
  61. /****************************************
  62. * ROM BSS Section config *
  63. ****************************************/
  64. keep { section .ram_vector_table1 };
  65. keep { section .ram_vector_table2 };
  66. keep { section .ram_vector_table3 };
  67. keep { section .hal.rom.bss* };
  68. keep { section .wlan_ram_map* };
  69. keep { section .libc.ram.bss* };
  70. keep { section .ssl_ram_map* };
  71. define block .hal.rom.bss with fixed order{ section .ram_vector_table1,
  72. section .ram_vector_table2,
  73. section .ram_vector_table3,
  74. section .hal.rom.bss*,
  75. section .wlan_ram_map*,
  76. section .libc.ram.bss*,
  77. section .ssl_ram_map*,
  78. };
  79. define block ROM_BSS with fixed order { block .hal.rom.bss};
  80. place at start of ROM_BSS_region { readwrite,
  81. block ROM_BSS,
  82. };
  83. /****************************************
  84. * BOOT RAM Section config *
  85. ****************************************/
  86. keep { section .image1.entry.data* };
  87. keep { section .image1.validate.rodata* };
  88. define block .ram_image1.entry with fixed order{section .image1.entry.data*,
  89. section .image1.validate.rodata*,
  90. };
  91. keep { section .boot.ram.text* };
  92. keep { section .boot.rodata* };
  93. define block .ram_image1.text with fixed order{section .boot.ram.text*,
  94. section .boot.rodata*,
  95. };
  96. keep { section .boot.ram.data* };
  97. define block .ram_image1.data with fixed order{section .boot.ram.data*,
  98. };
  99. keep { section .boot.ram.bss* };
  100. define block .ram_image1.bss with fixed order{section .boot.ram.bss*,
  101. };
  102. define block IMAGE1 with fixed order { block .ram_image1.entry, block .ram_image1.text, block .ram_image1.data, block .ram_image1.bss};
  103. place at start of BOOT_RAM_region { readwrite,
  104. block IMAGE1,
  105. };
  106. /****************************************
  107. * BD RAM Section config *
  108. ****************************************/
  109. keep { section .image2.entry.data* };
  110. keep { section .image2.validate.rodata* };
  111. define block .ram_image2.entry with fixed order{ section .image2.entry.data*,
  112. section .image2.validate.rodata*,
  113. };
  114. define block SHT$$PREINIT_ARRAY { preinit_array };
  115. define block SHT$$INIT_ARRAY { init_array };
  116. define block CPP_INIT with fixed order { block SHT$$PREINIT_ARRAY,
  117. block SHT$$INIT_ARRAY };
  118. define block .ram.data with fixed order{ section .data*,
  119. section DATA,
  120. section .iar.init_table,
  121. section __DLIB_PERTHREAD,
  122. block CPP_INIT,
  123. section .mdns.data,
  124. section .mdns.text
  125. };
  126. define block .ram.text with fixed order{ section .image2.ram.text*,
  127. };
  128. define block IMAGE2 with fixed order { block .ram_image2.entry,
  129. block .ram.data,
  130. block .ram.text,
  131. };
  132. define block .ram_image2.bss with fixed order{ section .bss*,
  133. section COMMON,
  134. };
  135. define block .ram_image2.skb.bss with fixed order{ section .bdsram.data* };
  136. define block .ram_heap.data with fixed order{ section .bfsram.data* };
  137. place in BD_RAM_region { readwrite,
  138. block IMAGE2,
  139. block .ram_image2.bss,
  140. block .ram_image2.skb.bss,
  141. block .ram_heap.data,
  142. section .heap.stdlib,
  143. last block HEAP,
  144. };
  145. /****************************************
  146. * XIP BOOT Section config *
  147. ****************************************/
  148. keep { section .flashboot.text* };
  149. define block .xip_image1.text with fixed order{ section .flashboot.text* };
  150. define block Bootloader with fixed order { section LOADER };
  151. place at start of XIP_BOOT_region { block Bootloader,
  152. readwrite,
  153. block .xip_image1.text };
  154. /****************************************
  155. * XIP OTA1 Section config *
  156. ****************************************/
  157. keep { section FSymTab };
  158. keep { section VSymTab };
  159. keep { section .rti_fn* };
  160. define block .xip_image2.text with fixed order{ section .img2_custom_signature*,
  161. section .text*,
  162. section .rodata*,
  163. section .debug_trace,
  164. section CODE,
  165. section Veneer, // object startup.o,
  166. section FSymTab,
  167. section VSymTab,
  168. section .rti_fn*,
  169. };
  170. place at start of XIP_OTA1_region { readwrite,
  171. block .xip_image2.text };
  172. /****************************************
  173. * RDP Section config *
  174. ****************************************/
  175. keep { section .rdp.ram.text* };
  176. keep { section .rdp.ram.data* };
  177. define block .RDP_RAM with fixed order {
  178. section .rdp.ram.text*,
  179. section .rdp.ram.data* };
  180. place at start of RDP_RAM_region{
  181. readwrite,
  182. block .RDP_RAM };
  183. define exported symbol __ram_start_table_start__= 0x10002000; // use in rom
  184. define exported symbol __image1_validate_code__= 0x10002018; // needed by ram code
  185. define exported symbol __rom_top_4k_start_= 0x1003F000; // needed by ram code
  186. define exported symbol __flash_text_start__= 0x0800b020; // needed by ram code
  187. define exported symbol boot_export_symbol = 0x10002020;