GD32E230x8.icf 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*###ICF### Section handled by ICF editor, don't touch! ****/
  2. /*-Editor annotation file-*/
  3. /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_4.xml" */
  4. /*-Specials-*/
  5. define symbol __ICFEDIT_intvec_start__ = 0x08000000;
  6. /*-Memory Regions-*/
  7. define symbol __ICFEDIT_region_IROM1_start__ = 0x08000000;
  8. define symbol __ICFEDIT_region_IROM1_end__ = 0x0800FFFF;
  9. define symbol __ICFEDIT_region_IROM2_start__ = 0x0;
  10. define symbol __ICFEDIT_region_IROM2_end__ = 0x0;
  11. define symbol __ICFEDIT_region_EROM1_start__ = 0x0;
  12. define symbol __ICFEDIT_region_EROM1_end__ = 0x0;
  13. define symbol __ICFEDIT_region_EROM2_start__ = 0x0;
  14. define symbol __ICFEDIT_region_EROM2_end__ = 0x0;
  15. define symbol __ICFEDIT_region_EROM3_start__ = 0x0;
  16. define symbol __ICFEDIT_region_EROM3_end__ = 0x0;
  17. define symbol __ICFEDIT_region_IRAM1_start__ = 0x20000040;
  18. define symbol __ICFEDIT_region_IRAM1_end__ = 0x20001FFF;
  19. define symbol __ICFEDIT_region_IRAM2_start__ = 0x0;
  20. define symbol __ICFEDIT_region_IRAM2_end__ = 0x0;
  21. define symbol __ICFEDIT_region_ERAM1_start__ = 0x0;
  22. define symbol __ICFEDIT_region_ERAM1_end__ = 0x0;
  23. define symbol __ICFEDIT_region_ERAM2_start__ = 0x0;
  24. define symbol __ICFEDIT_region_ERAM2_end__ = 0x0;
  25. define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
  26. define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
  27. /*-Sizes-*/
  28. define symbol __ICFEDIT_size_cstack__ = 0x400;
  29. define symbol __ICFEDIT_size_proc_stack__ = 0x0;
  30. define symbol __ICFEDIT_size_heap__ = 0x800;
  31. /**** End of ICF editor section. ###ICF###*/
  32. define memory mem with size = 4G;
  33. define symbol use_IROM1 = (__ICFEDIT_region_IROM1_start__ != 0x0 || __ICFEDIT_region_IROM1_end__ != 0x0);
  34. define symbol use_IROM2 = (__ICFEDIT_region_IROM2_start__ != 0x0 || __ICFEDIT_region_IROM2_end__ != 0x0);
  35. define symbol use_EROM1 = (__ICFEDIT_region_EROM1_start__ != 0x0 || __ICFEDIT_region_EROM1_end__ != 0x0);
  36. define symbol use_EROM2 = (__ICFEDIT_region_EROM2_start__ != 0x0 || __ICFEDIT_region_EROM2_end__ != 0x0);
  37. define symbol use_EROM3 = (__ICFEDIT_region_EROM3_start__ != 0x0 || __ICFEDIT_region_EROM3_end__ != 0x0);
  38. define symbol use_IRAM1 = (__ICFEDIT_region_IRAM1_start__ != 0x0 || __ICFEDIT_region_IRAM1_end__ != 0x0);
  39. define symbol use_IRAM2 = (__ICFEDIT_region_IRAM2_start__ != 0x0 || __ICFEDIT_region_IRAM2_end__ != 0x0);
  40. define symbol use_ERAM1 = (__ICFEDIT_region_ERAM1_start__ != 0x0 || __ICFEDIT_region_ERAM1_end__ != 0x0);
  41. define symbol use_ERAM2 = (__ICFEDIT_region_ERAM2_start__ != 0x0 || __ICFEDIT_region_ERAM2_end__ != 0x0);
  42. define symbol use_ERAM3 = (__ICFEDIT_region_ERAM3_start__ != 0x0 || __ICFEDIT_region_ERAM3_end__ != 0x0);
  43. if (use_IROM1)
  44. {
  45. define region IROM1_region = mem:[from __ICFEDIT_region_IROM1_start__ to __ICFEDIT_region_IROM1_end__];
  46. }
  47. else
  48. {
  49. define region IROM1_region = [];
  50. }
  51. if (use_IROM2)
  52. {
  53. define region IROM2_region = mem:[from __ICFEDIT_region_IROM2_start__ to __ICFEDIT_region_IROM2_end__];
  54. }
  55. else
  56. {
  57. define region IROM2_region = [];
  58. }
  59. define region IROM_region = IROM1_region | IROM2_region;
  60. if (use_EROM1)
  61. {
  62. define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
  63. }
  64. else
  65. {
  66. define region EROM1_region = [];
  67. }
  68. if (use_EROM2)
  69. {
  70. define region EROM2_region = mem:[from __ICFEDIT_region_EROM2_start__ to __ICFEDIT_region_EROM2_end__];
  71. }
  72. else
  73. {
  74. define region EROM2_region = [];
  75. }
  76. if (use_EROM3)
  77. {
  78. define region EROM3_region = mem:[from __ICFEDIT_region_EROM3_start__ to __ICFEDIT_region_EROM3_end__];
  79. }
  80. else
  81. {
  82. define region EROM3_region = [];
  83. }
  84. define region EROM_region = EROM1_region | EROM2_region | EROM3_region;
  85. if (use_IRAM1)
  86. {
  87. define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
  88. }
  89. else
  90. {
  91. define region IRAM1_region = [];
  92. }
  93. if (use_IRAM2)
  94. {
  95. define region IRAM2_region = mem:[from __ICFEDIT_region_IRAM2_start__ to __ICFEDIT_region_IRAM2_end__];
  96. }
  97. else
  98. {
  99. define region IRAM2_region = [];
  100. }
  101. define region IRAM_region = IRAM1_region | IRAM2_region;
  102. if (use_ERAM1)
  103. {
  104. define region ERAM1_region = mem:[from __ICFEDIT_region_ERAM1_start__ to __ICFEDIT_region_ERAM1_end__];
  105. }
  106. else
  107. {
  108. define region ERAM1_region = [];
  109. }
  110. if (use_ERAM2)
  111. {
  112. define region ERAM2_region = mem:[from __ICFEDIT_region_ERAM2_start__ to __ICFEDIT_region_ERAM2_end__];
  113. }
  114. else
  115. {
  116. define region ERAM2_region = [];
  117. }
  118. if (use_ERAM3)
  119. {
  120. define region ERAM3_region = mem:[from __ICFEDIT_region_ERAM3_start__ to __ICFEDIT_region_ERAM3_end__];
  121. }
  122. else
  123. {
  124. define region ERAM3_region = [];
  125. }
  126. define region noinit_region = mem:[from __ICFEDIT_region_IRAM1_start__ - 0x40 to __ICFEDIT_region_IRAM1_start__ - 0x01 ];
  127. define region ERAM_region = ERAM1_region | ERAM2_region | ERAM3_region;
  128. do not initialize { section .noinit };
  129. initialize by copy { readwrite };
  130. if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
  131. {
  132. // Required in a multi-threaded application
  133. initialize by copy with packing = none { section __DLIB_PERTHREAD };
  134. }
  135. place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
  136. if (!isempty(IROM_region))
  137. {
  138. place in IROM_region { readonly };
  139. }
  140. if (!isempty(EROM_region))
  141. {
  142. place in EROM_region { readonly section application_specific_ro };
  143. }
  144. if (!isempty(IRAM_region))
  145. {
  146. define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
  147. define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { };
  148. define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
  149. place in IRAM_region { readwrite, block CSTACK, block PROC_STACK, block HEAP };
  150. }
  151. if (!isempty(ERAM_region))
  152. {
  153. place in ERAM_region { readwrite section application_specific_rw };
  154. }
  155. place in noinit_region { readwrite section .noinit };