link.icf 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. ** ###################################################################
  3. ** Processors: MIMXRT1062CVJ5A
  4. ** MIMXRT1062CVL5A
  5. ** MIMXRT1062DVJ6A
  6. ** MIMXRT1062DVL6A
  7. ** MIMXRT1062DVN6B
  8. ** MIMXRT1062XVN5B
  9. **
  10. ** Compiler: IAR ANSI C/C++ Compiler for ARM
  11. ** Reference manual: IMXRT1060RM Rev.3, 07/2021 | IMXRT106XSRM Rev.0
  12. ** Version: rev. 0.2, 2022-03-25
  13. ** Build: b220401
  14. **
  15. ** Abstract:
  16. ** Linker file for the IAR ANSI C/C++ Compiler for ARM
  17. **
  18. ** Copyright 2016 Freescale Semiconductor, Inc.
  19. ** Copyright 2016-2022 NXP
  20. ** All rights reserved.
  21. **
  22. ** SPDX-License-Identifier: BSD-3-Clause
  23. **
  24. ** http: www.nxp.com
  25. ** mail: support@nxp.com
  26. **
  27. ** ###################################################################
  28. */
  29. define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000400 : 0;
  30. define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000003FF : 0;
  31. define symbol m_interrupts_start = 0x60002000;
  32. define symbol m_interrupts_end = 0x600023FF;
  33. define symbol m_text_start = 0x60002400;
  34. define symbol m_text_end = 0x607FFFFF;
  35. define symbol m_interrupts_ram_start = 0x20000000;
  36. define symbol m_interrupts_ram_end = 0x20000000 + __ram_vector_table_offset__;
  37. define symbol m_data_start = m_interrupts_ram_start + __ram_vector_table_size__;
  38. define symbol m_data_end = 0x2001FFFF;
  39. define symbol m_data2_start = 0x20200000;
  40. define symbol m_data2_end = 0x202BFFFF;
  41. define symbol m_qacode_start = 0x00000000;
  42. define symbol m_qacode_end = 0x0001FFFF;
  43. define exported symbol m_boot_hdr_conf_start = 0x60000000;
  44. define symbol m_boot_hdr_ivt_start = 0x60001000;
  45. define symbol m_boot_hdr_boot_data_start = 0x60001020;
  46. define symbol m_boot_hdr_dcd_data_start = 0x60001030;
  47. /* Sizes */
  48. if (isdefinedsymbol(__stack_size__)) {
  49. define symbol __size_cstack__ = __stack_size__;
  50. } else {
  51. define symbol __size_cstack__ = 0x2000;
  52. }
  53. if (isdefinedsymbol(__heap_size__)) {
  54. define symbol __size_heap__ = __heap_size__;
  55. } else {
  56. define symbol __size_heap__ = 0x2000;
  57. }
  58. define exported symbol __NCACHE_REGION_START = m_data2_start;
  59. define exported symbol __NCACHE_REGION_SIZE = 0x0;
  60. define exported symbol __VECTOR_TABLE = m_interrupts_start;
  61. define exported symbol __VECTOR_RAM = isdefinedsymbol(__ram_vector_table__) ? m_interrupts_ram_start : m_interrupts_start;
  62. define exported symbol __RAM_VECTOR_TABLE_SIZE = __ram_vector_table_size__;
  63. define exported symbol __RTT_HEAP_END = m_data2_end;
  64. define memory mem with size = 4G;
  65. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  66. | mem:[from m_text_start to m_text_end];
  67. define region QACODE_region = mem:[from m_qacode_start to m_qacode_end];
  68. define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
  69. define region DATA2_region = mem:[from m_data2_start to m_data2_end];
  70. define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
  71. define block CSTACK with alignment = 8, size = __size_cstack__ { };
  72. define block HEAP with alignment = 8, size = __size_heap__ { };
  73. define block RW { readwrite };
  74. define block ZI { zi };
  75. define block NCACHE_VAR { section NonCacheable , section NonCacheable.init };
  76. define block QACCESS_CODE { section CodeQuickAccess };
  77. define block QACCESS_DATA { section DataQuickAccess };
  78. initialize by copy { readwrite, section .textrw, section CodeQuickAccess, section DataQuickAccess};
  79. do not initialize { section .noinit };
  80. place at address mem: m_interrupts_start { readonly section .intvec };
  81. place at address mem: m_boot_hdr_conf_start { section .boot_hdr.conf };
  82. place at address mem: m_boot_hdr_ivt_start { section .boot_hdr.ivt };
  83. place at address mem: m_boot_hdr_boot_data_start { readonly section .boot_hdr.boot_data };
  84. place at address mem: m_boot_hdr_dcd_data_start { readonly section .boot_hdr.dcd_data };
  85. keep{ section .boot_hdr.conf, section .boot_hdr.ivt, section .boot_hdr.boot_data, section .boot_hdr.dcd_data };
  86. place in TEXT_region { readonly };
  87. place in DATA_region { block RW };
  88. place in DATA_region { block ZI };
  89. place in DATA_region { last block HEAP };
  90. place in DATA_region { block NCACHE_VAR };
  91. place in CSTACK_region { block CSTACK };
  92. place in QACODE_region { block QACCESS_CODE };
  93. place in DATA_region { block QACCESS_DATA };