LPC54114J256_cm0plus.icf 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. ** ###################################################################
  3. ** Processors: LPC54114J256BD64_M0P
  4. ** LPC54114J256UK49_M0P
  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 = 0x20010000;
  52. define symbol m_interrupts_end = 0x200100BF;
  53. define symbol m_text_start = 0x200100C0;
  54. define symbol m_text_end = 0x2001FFFF;
  55. if (isdefinedsymbol(__use_shmem__)) {
  56. define symbol m_data_start = 0x20020000;
  57. define symbol m_data_end = 0x200267FF;
  58. define exported symbol rpmsg_sh_mem_start = 0x20026800;
  59. define exported symbol rpmsg_sh_mem_end = 0x20027FFF;
  60. } else {
  61. define symbol m_data_start = 0x20020000;
  62. define symbol m_data_end = 0x20027FFF;
  63. }
  64. define symbol m_sramx_start = 0x04000000;
  65. define symbol m_sramx_end = 0x04007FFF;
  66. /* Sizes */
  67. if (isdefinedsymbol(__stack_size__)) {
  68. define symbol __size_cstack__ = __stack_size__;
  69. } else {
  70. define symbol __size_cstack__ = 0x0400;
  71. }
  72. if (isdefinedsymbol(__heap_size__)) {
  73. define symbol __size_heap__ = __heap_size__;
  74. } else {
  75. define symbol __size_heap__ = 0x0800;
  76. }
  77. define memory mem with size = 4G;
  78. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  79. | mem:[from m_text_start to m_text_end];
  80. define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
  81. define region SRAMX_region = mem:[from m_sramx_start to m_sramx_end];
  82. define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
  83. if (isdefinedsymbol(__use_shmem__)) {
  84. define region rpmsg_sh_mem_region = mem:[from rpmsg_sh_mem_start to rpmsg_sh_mem_end];
  85. }
  86. define block CSTACK with alignment = 8, size = __size_cstack__ { };
  87. define block HEAP with alignment = 8, size = __size_heap__ { };
  88. define block RW { readwrite };
  89. define block ZI { zi };
  90. initialize by copy { readwrite };
  91. if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
  92. {
  93. // Required in a multi-threaded application
  94. initialize by copy with packing = none { section __DLIB_PERTHREAD };
  95. }
  96. do not initialize { section .noinit };
  97. if (isdefinedsymbol(__use_shmem__)) {
  98. do not initialize { section rpmsg_sh_mem_section };
  99. }
  100. place at address mem: m_interrupts_start { readonly section .intvec };
  101. place in TEXT_region { readonly };
  102. place in DATA_region { block RW };
  103. place in DATA_region { block ZI };
  104. place in DATA_region { last block HEAP };
  105. place in SRAMX_region { section sramx };
  106. place in CSTACK_region { block CSTACK };
  107. if (isdefinedsymbol(__use_shmem__)) {
  108. place in rpmsg_sh_mem_region { section rpmsg_sh_mem_section };
  109. }