LPC54114J256_cm4_ram.icf 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. ** ###################################################################
  3. ** Processors: LPC54114J256BD64_M4
  4. ** LPC54114J256UK49_M4
  5. **
  6. ** Compiler: IAR ANSI C/C++ Compiler for ARM
  7. ** Reference manual: LPC5411x User manual Rev. 1.1 25 May 2016
  8. ** Version: rev. 1.0, 2016-04-29
  9. ** Build: b161227
  10. **
  11. ** Abstract:
  12. ** Linker file for the IAR ANSI C/C++ Compiler for ARM
  13. **
  14. ** The Clear BSD License
  15. ** Copyright 2016 Freescale Semiconductor, Inc.
  16. ** Copyright 2016-2017 NXP
  17. ** All rights reserved.
  18. **
  19. ** Redistribution and use in source and binary forms, with or without modification,
  20. ** are permitted (subject to the limitations in the disclaimer below) provided
  21. ** that the following conditions are met:
  22. **
  23. ** 1. Redistributions of source code must retain the above copyright notice, this list
  24. ** of conditions and the following disclaimer.
  25. **
  26. ** 2. Redistributions in binary form must reproduce the above copyright notice, this
  27. ** list of conditions and the following disclaimer in the documentation and/or
  28. ** other materials provided with the distribution.
  29. **
  30. ** 3. Neither the name of the copyright holder nor the names of its
  31. ** contributors may be used to endorse or promote products derived from this
  32. ** software without specific prior written permission.
  33. **
  34. ** NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
  35. ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  36. ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  37. ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  38. ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  39. ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  40. ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  41. ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  42. ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  43. ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  44. ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  45. **
  46. ** http: www.nxp.com
  47. ** mail: support@nxp.com
  48. **
  49. ** ###################################################################
  50. */
  51. define symbol m_interrupts_start = 0x20000000;
  52. define symbol m_interrupts_end = 0x200000DF;
  53. define symbol m_text_start = 0x200000E0;
  54. define symbol m_text_end = 0x20020000;
  55. define symbol m_data_start = 0x20020000;
  56. define symbol m_data_end = 0x20008000;
  57. define symbol m_stack_start = 0x04000000;
  58. define symbol m_stack_end = 0x04007FFF;
  59. /* Sizes */
  60. if (isdefinedsymbol(__stack_size__)) {
  61. define symbol __size_cstack__ = __stack_size__;
  62. } else {
  63. define symbol __size_cstack__ = 0x0400;
  64. }
  65. if (isdefinedsymbol(__heap_size__)) {
  66. define symbol __size_heap__ = __heap_size__;
  67. } else {
  68. define symbol __size_heap__ = 0x0800;
  69. }
  70. define memory mem with size = 4G;
  71. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  72. | mem:[from m_text_start to m_text_end];
  73. define region DATA_region = mem:[from m_data_start to m_data_end];
  74. define region CSTACK_region = mem:[from m_stack_start to m_stack_end];
  75. define block CSTACK with alignment = 8, size = __size_cstack__ { };
  76. define block HEAP with alignment = 8, size = __size_heap__ { };
  77. define block RW { readwrite };
  78. define block ZI { zi };
  79. initialize by copy { readwrite };
  80. do not initialize { section .noinit };
  81. place at address mem: m_interrupts_start { readonly section .intvec };
  82. place in TEXT_region { readonly };
  83. place in DATA_region { block RW };
  84. place in DATA_region { block ZI };
  85. place in DATA_region { last block HEAP };
  86. place in CSTACK_region { block CSTACK };