imxrt1052_sdram.icf 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. ** ###################################################################
  3. ** Processor: MIMXRT1052DVL6A
  4. ** Compiler: IAR ANSI C/C++ Compiler for ARM
  5. ** Reference manual: i.MX 6RT for ROM
  6. ** Version: rev. 0.1, 2017-01-10
  7. ** Build: b170608
  8. **
  9. ** Abstract:
  10. ** Linker file for the IAR ANSI C/C++ Compiler for ARM
  11. **
  12. ** Copyright 2016 Freescale Semiconductor, Inc.
  13. ** Copyright 2016-2017 NXP
  14. ** Redistribution and use in source and binary forms, with or without modification,
  15. ** are permitted provided that the following conditions are met:
  16. **
  17. ** 1. Redistributions of source code must retain the above copyright notice, this list
  18. ** of conditions and the following disclaimer.
  19. **
  20. ** 2. Redistributions in binary form must reproduce the above copyright notice, this
  21. ** list of conditions and the following disclaimer in the documentation and/or
  22. ** other materials provided with the distribution.
  23. **
  24. ** 3. Neither the name of the copyright holder nor the names of its
  25. ** contributors may be used to endorse or promote products derived from this
  26. ** software without specific prior written permission.
  27. **
  28. ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  29. ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  30. ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31. ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  32. ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  33. ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  34. ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  35. ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  36. ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  37. ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. **
  39. ** http: www.nxp.com
  40. ** mail: support@nxp.com
  41. **
  42. ** ###################################################################
  43. */
  44. define symbol m_base_addr = 0x00000000;
  45. define symbol m_interrupts_start = 0x00000000 + m_base_addr;
  46. define symbol m_interrupts_end = 0x000003FF + m_base_addr;
  47. define symbol m_text_start = 0x00000400 + m_base_addr;
  48. define symbol m_text_end = 0x0007FFFF + m_base_addr;
  49. define symbol m_data_start = 0x80000000;
  50. define symbol m_data_end = 0x81DFFFFF;
  51. define symbol m_ncache_start = 0x81E00000;
  52. define symbol m_ncache_end = 0x81FFFFFF;
  53. /* Sizes */
  54. if (isdefinedsymbol(__stack_size__)) {
  55. define symbol __size_cstack__ = __stack_size__;
  56. } else {
  57. define symbol __size_cstack__ = 0x0400;
  58. }
  59. if (isdefinedsymbol(__heap_size__)) {
  60. define symbol __size_heap__ = __heap_size__;
  61. } else {
  62. define symbol __size_heap__ = 0x0400;
  63. }
  64. define exported symbol __VECTOR_TABLE = m_interrupts_start;
  65. define exported symbol __VECTOR_RAM = m_interrupts_start;
  66. define exported symbol __RAM_VECTOR_TABLE_SIZE = 0x0;
  67. define memory mem with size = 4G;
  68. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  69. | mem:[from m_text_start to m_text_end];
  70. define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
  71. define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
  72. define region NCACHE_region = mem:[from m_ncache_start to m_ncache_end];
  73. define block CSTACK with alignment = 8, size = __size_cstack__ { };
  74. define block HEAP with alignment = 8, size = __size_heap__ { };
  75. define block RW { readwrite };
  76. define block ZI { zi };
  77. define block RTT_INIT_FUNC with fixed order { readonly section .rti_fn* };
  78. define block NCACHE_VAR with size = 0x200000 , alignment = 0x100000 { section NonCacheable , section NonCacheable.init };
  79. initialize by copy { readwrite, section .textrw };
  80. do not initialize { section .noinit };
  81. keep { section FSymTab };
  82. keep { section VSymTab };
  83. keep { section .rti_fn* };
  84. place at address mem: m_interrupts_start { readonly section .intvec };
  85. place in TEXT_region { readonly, block RTT_INIT_FUNC };
  86. place in DATA_region { block RW };
  87. place in DATA_region { block ZI };
  88. place in DATA_region { last block HEAP };
  89. place in CSTACK_region { block CSTACK };
  90. place in NCACHE_region { block NCACHE_VAR };