LPC55S16_flash.icf 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. ** ###################################################################
  3. ** Processors: LPC55S16JBD100
  4. ** LPC55S16JBD64
  5. ** LPC55S16JEV59
  6. ** LPC55S16JEV98
  7. **
  8. ** Compiler: IAR ANSI C/C++ Compiler for ARM
  9. ** Reference manual: LPC55S1x/LPC551x User manual Rev.0.6 15 November 2019
  10. ** Version: rev. 1.1, 2019-12-03
  11. ** Build: b220622
  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-2022 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. /* USB BDT size */
  28. define symbol usb_bdt_size = 0x0;
  29. /* Stack and Heap Sizes */
  30. if (isdefinedsymbol(__stack_size__)) {
  31. define symbol __size_cstack__ = __stack_size__;
  32. } else {
  33. define symbol __size_cstack__ = 0x0400;
  34. }
  35. if (isdefinedsymbol(__heap_size__)) {
  36. define symbol __size_heap__ = __heap_size__;
  37. } else {
  38. define symbol __size_heap__ = 0x0400;
  39. }
  40. define symbol m_interrupts_start = 0x00000000;
  41. define symbol m_interrupts_end = 0x000001FF;
  42. define symbol m_text_start = 0x00000200;
  43. define symbol m_text_end = 0x0003CFFF;
  44. define symbol m_data_start = 0x20000000;
  45. define symbol m_data_end = 0x2000FFFF;
  46. define symbol m_sramx_start = 0x04000000;
  47. define symbol m_sramx_end = 0x04003FFF;
  48. define symbol m_usb_sram_start = 0x20010000;
  49. define symbol m_usb_sram_end = 0x20013FFF;
  50. define memory mem with size = 4G;
  51. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  52. | mem:[from m_text_start to m_text_end];
  53. define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
  54. define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
  55. if (isdefinedsymbol(__use_shmem__)) {
  56. define region rpmsg_sh_mem_region = mem:[from rpmsg_sh_mem_start to rpmsg_sh_mem_end];
  57. }
  58. define block CSTACK with alignment = 8, size = __size_cstack__ { };
  59. define block HEAP with alignment = 8, size = __size_heap__ { };
  60. define block RW { readwrite };
  61. define block ZI { zi };
  62. /* regions for USB */
  63. define region USB_BDT_region = mem:[from m_usb_sram_start to m_usb_sram_start + usb_bdt_size - 1];
  64. define region USB_SRAM_region = mem:[from m_usb_sram_start + usb_bdt_size to m_usb_sram_end];
  65. place in USB_BDT_region { section m_usb_bdt };
  66. place in USB_SRAM_region { section m_usb_global };
  67. initialize by copy { readwrite, section .textrw };
  68. if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
  69. {
  70. /* Required in a multi-threaded application */
  71. initialize by copy with packing = none { section __DLIB_PERTHREAD };
  72. }
  73. do not initialize { section .noinit, section m_usb_bdt, section m_usb_global };
  74. if (isdefinedsymbol(__use_shmem__)) {
  75. do not initialize { section rpmsg_sh_mem_section };
  76. }
  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 };