link.icf 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. ** ###################################################################
  3. ** Processors: MIMXRT1052CVJ5B
  4. ** MIMXRT1052CVL5B
  5. ** MIMXRT1052DVJ6B
  6. ** MIMXRT1052DVL6B
  7. **
  8. ** Compiler: IAR ANSI C/C++ Compiler for ARM
  9. ** Reference manual: IMXRT1050RM Rev.1, 03/2018
  10. ** Version: rev. 1.0, 2018-09-21
  11. ** Build: b180921
  12. **
  13. ** Abstract:
  14. ** Linker file for the IAR ANSI C/C++ Compiler for ARM
  15. **
  16. ** Copyright 2016 Freescale Semiconductor, Inc.
  17. ** Copyright 2016-2018 NXP
  18. ** All rights reserved.
  19. **
  20. ** SPDX-License-Identifier: BSD-3-Clause
  21. **
  22. ** http: www.nxp.com
  23. ** mail: support@nxp.com
  24. **
  25. ** ###################################################################
  26. */
  27. define symbol m_interrupts_start = 0x30002000;
  28. define symbol m_interrupts_end = 0x300023FF;
  29. define symbol m_text_start = 0x30002400;
  30. define symbol m_text_end = 0x30FBFFFF;
  31. define symbol m_data_start = 0x20000000;
  32. define symbol m_data_end = 0x2003FFFF;
  33. define symbol m_data2_start = 0x202C0000;
  34. define symbol m_data2_end = 0x2033FFFF;
  35. define exported symbol __NCACHE_REGION_START = m_data2_start;
  36. define exported symbol __NCACHE_REGION_SIZE = 0x0;
  37. define exported symbol m_boot_hdr_conf_start = 0x30000400;
  38. define symbol m_boot_hdr_ivt_start = 0x30001000;
  39. define symbol m_boot_hdr_boot_data_start = 0x30001020;
  40. define symbol m_boot_hdr_dcd_data_start = 0x30001030;
  41. /* Sizes */
  42. if (isdefinedsymbol(__stack_size__)) {
  43. define symbol __size_cstack__ = __stack_size__;
  44. } else {
  45. define symbol __size_cstack__ = 0x0400;
  46. }
  47. if (isdefinedsymbol(__heap_size__)) {
  48. define symbol __size_heap__ = __heap_size__;
  49. } else {
  50. define symbol __size_heap__ = 0x0400;
  51. }
  52. define exported symbol __VECTOR_TABLE = m_interrupts_start;
  53. define exported symbol __VECTOR_RAM = m_interrupts_start;
  54. define exported symbol __RAM_VECTOR_TABLE_SIZE = 0x0;
  55. define exported symbol __RTT_HEAP_END = m_data2_end;
  56. define memory mem with size = 4G;
  57. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  58. | mem:[from m_text_start to m_text_end];
  59. define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
  60. define region DATA2_region = mem:[from m_data2_start to m_data2_end];
  61. define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
  62. define block CSTACK with alignment = 8, size = __size_cstack__ { };
  63. define block HEAP with alignment = 8, size = __size_heap__ { };
  64. define block RW { readwrite };
  65. define block ZI { zi };
  66. define block NCACHE_VAR { section NonCacheable , section NonCacheable.init };
  67. initialize by copy { readwrite, section .textrw };
  68. do not initialize { section .noinit };
  69. place at address mem: m_interrupts_start { readonly section .intvec };
  70. place at address mem:m_boot_hdr_conf_start { section .boot_hdr.conf };
  71. place at address mem:m_boot_hdr_ivt_start { section .boot_hdr.ivt };
  72. place at address mem:m_boot_hdr_boot_data_start { readonly section .boot_hdr.boot_data };
  73. place at address mem:m_boot_hdr_dcd_data_start { readonly section .boot_hdr.dcd_data };
  74. keep{ section .boot_hdr.conf, section .boot_hdr.ivt, section .boot_hdr.boot_data, section .boot_hdr.dcd_data };
  75. place in TEXT_region { readonly };
  76. place in DATA_region { block RW };
  77. place in DATA_region { block ZI };
  78. place in DATA_region { last block HEAP };
  79. place in DATA_region { block NCACHE_VAR };
  80. place in CSTACK_region { block CSTACK };