link.icf 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 = 0x60002000;
  28. define symbol m_interrupts_end = 0x600023FF;
  29. define symbol m_text_start = 0x60002400;
  30. define symbol m_text_end = 0x63FFFFFF;
  31. define symbol m_data_start = 0x20000000;
  32. define symbol m_data_end = 0x2001FFFF;
  33. define symbol m_data2_start = 0x20200000;
  34. define symbol m_data2_end = 0x2023FFFF;
  35. define exported symbol m_boot_hdr_conf_start = 0x60000000;
  36. define symbol m_boot_hdr_ivt_start = 0x60001000;
  37. define symbol m_boot_hdr_boot_data_start = 0x60001020;
  38. define symbol m_boot_hdr_dcd_data_start = 0x60001030;
  39. /* Sizes */
  40. if (isdefinedsymbol(__stack_size__)) {
  41. define symbol __size_cstack__ = __stack_size__;
  42. } else {
  43. define symbol __size_cstack__ = 0x0400;
  44. }
  45. if (isdefinedsymbol(__heap_size__)) {
  46. define symbol __size_heap__ = __heap_size__;
  47. } else {
  48. define symbol __size_heap__ = 0x0400;
  49. }
  50. define exported symbol __VECTOR_TABLE = m_interrupts_start;
  51. define exported symbol __VECTOR_RAM = m_interrupts_start;
  52. define exported symbol __RAM_VECTOR_TABLE_SIZE = 0x0;
  53. define exported symbol __RTT_HEAP_END = m_data2_end;
  54. define memory mem with size = 4G;
  55. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  56. | mem:[from m_text_start to m_text_end];
  57. define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
  58. define region DATA2_region = mem:[from m_data2_start to m_data2_end];
  59. define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
  60. define block CSTACK with alignment = 8, size = __size_cstack__ { };
  61. define block HEAP with alignment = 8, size = __size_heap__ { };
  62. define block RW { readwrite };
  63. define block ZI { zi };
  64. define block NCACHE_VAR { section NonCacheable , section NonCacheable.init };
  65. initialize by copy { readwrite, section .textrw };
  66. do not initialize { section .noinit };
  67. place at address mem: m_interrupts_start { readonly section .intvec };
  68. place at address mem:m_boot_hdr_conf_start { section .boot_hdr.conf };
  69. place at address mem:m_boot_hdr_ivt_start { section .boot_hdr.ivt };
  70. place at address mem:m_boot_hdr_boot_data_start { readonly section .boot_hdr.boot_data };
  71. place at address mem:m_boot_hdr_dcd_data_start { readonly section .boot_hdr.dcd_data };
  72. keep{ section .boot_hdr.conf, section .boot_hdr.ivt, section .boot_hdr.boot_data, section .boot_hdr.dcd_data };
  73. place in TEXT_region { readonly };
  74. place in DATA_region { block RW };
  75. place in DATA_region { block ZI };
  76. place in DATA_region { last block HEAP };
  77. place in DATA_region { block NCACHE_VAR };
  78. place in CSTACK_region { block CSTACK };