MIMXRT1052xxx6A_ram.icf 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. ** ###################################################################
  3. ** Processor: MIMXRT1052DVL6A
  4. ** Compiler: IAR ANSI C/C++ Compiler for ARM
  5. ** Reference manual: IMXRT105XRM Rev.A, 04/2017
  6. ** Version: rev. 0.1, 2017-01-10
  7. ** Build: b170705
  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_interrupts_start = 0x00000000;
  45. define symbol m_interrupts_end = 0x000003FF;
  46. define symbol m_text_start = 0x00000400;
  47. define symbol m_text_end = 0x0001FFFF;
  48. define symbol m_data_start = 0x20000000;
  49. define symbol m_data_end = 0x2001FFFF;
  50. define symbol m_data_2_start = 0x20200000;
  51. define symbol m_data_2_end = 0x2023FFFF;
  52. /* Sizes */
  53. if (isdefinedsymbol(__stack_size__)) {
  54. define symbol __size_cstack__ = __stack_size__;
  55. } else {
  56. define symbol __size_cstack__ = 0x0400;
  57. }
  58. if (isdefinedsymbol(__heap_size__)) {
  59. define symbol __size_heap__ = __heap_size__;
  60. } else {
  61. define symbol __size_heap__ = 0x0400;
  62. }
  63. define exported symbol __VECTOR_TABLE = m_interrupts_start;
  64. define exported symbol __VECTOR_RAM = m_interrupts_start;
  65. define exported symbol __RAM_VECTOR_TABLE_SIZE = 0x0;
  66. define memory mem with size = 4G;
  67. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  68. | mem:[from m_text_start to m_text_end];
  69. define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
  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. initialize by copy { readwrite, section .textrw };
  76. do not initialize { section .noinit };
  77. place at address mem: m_interrupts_start { readonly section .intvec };
  78. place in TEXT_region { readonly };
  79. place in DATA_region { block RW };
  80. place in DATA_region { block ZI };
  81. place in DATA_region { last block HEAP };
  82. place in CSTACK_region { block CSTACK };