LPC55S28_flash.icf 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. ** ###################################################################
  3. ** Processors: LPC55S28JBD100_cm33_core0
  4. ** LPC55S28JBD64_cm33_core0
  5. ** LPC55S28JEV98_cm33_core0
  6. **
  7. ** Compiler: IAR ANSI C/C++ Compiler for ARM
  8. ** Reference manual: LPC55S6x/LPC55S2x/LPC552x User manual(UM11126) Rev.1.3 16 May 2019
  9. ** Version: rev. 1.1, 2019-05-16
  10. ** Build: b200722
  11. **
  12. ** Abstract:
  13. ** Linker file for the IAR ANSI C/C++ Compiler for ARM
  14. **
  15. ** Copyright 2016 Freescale Semiconductor, Inc.
  16. ** Copyright 2016-2020 NXP
  17. ** All rights reserved.
  18. **
  19. ** SPDX-License-Identifier: BSD-3-Clause
  20. **
  21. ** http: www.nxp.com
  22. ** mail: support@nxp.com
  23. **
  24. ** ###################################################################
  25. */
  26. /* USB BDT size */
  27. define symbol usb_bdt_size = 0x0;
  28. /* Stack and Heap Sizes */
  29. if (isdefinedsymbol(__stack_size__)) {
  30. define symbol __size_cstack__ = __stack_size__;
  31. } else {
  32. define symbol __size_cstack__ = 0x0400;
  33. }
  34. if (isdefinedsymbol(__heap_size__)) {
  35. define symbol __size_heap__ = __heap_size__;
  36. } else {
  37. define symbol __size_heap__ = 0x0400;
  38. }
  39. define symbol m_interrupts_start = 0x00000000;
  40. define symbol m_interrupts_end = 0x000001FF;
  41. define symbol m_text_start = 0x00000200;
  42. define symbol m_text_end = 0x0007FFFF;
  43. define symbol m_data_start = 0x20000000;
  44. define symbol m_data_end = 0x2002FFFF;
  45. define symbol m_usb_sram_start = 0x40100000;
  46. define symbol m_usb_sram_end = 0x40103FFF;
  47. define memory mem with size = 4G;
  48. define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
  49. | mem:[from m_text_start to m_text_end];
  50. define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
  51. define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
  52. if (isdefinedsymbol(__use_shmem__)) {
  53. define region rpmsg_sh_mem_region = mem:[from rpmsg_sh_mem_start to rpmsg_sh_mem_end];
  54. }
  55. define block CSTACK with alignment = 8, size = __size_cstack__ { };
  56. define block HEAP with alignment = 8, size = __size_heap__ { };
  57. define block RW { readwrite };
  58. define block ZI { zi };
  59. /* regions for USB */
  60. define region USB_BDT_region = mem:[from m_usb_sram_start to m_usb_sram_start + usb_bdt_size - 1];
  61. define region USB_SRAM_region = mem:[from m_usb_sram_start + usb_bdt_size to m_usb_sram_end];
  62. place in USB_BDT_region { section m_usb_bdt };
  63. place in USB_SRAM_region { section m_usb_global };
  64. initialize by copy { readwrite, section .textrw };
  65. if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
  66. {
  67. /* Required in a multi-threaded application */
  68. initialize by copy with packing = none { section __DLIB_PERTHREAD };
  69. }
  70. do not initialize { section .noinit, section m_usb_bdt, section m_usb_global };
  71. if (isdefinedsymbol(__use_shmem__)) {
  72. do not initialize { section rpmsg_sh_mem_section };
  73. }
  74. place at address mem: m_interrupts_start { readonly section .intvec };
  75. place in TEXT_region { readonly };
  76. place in DATA_region { block RW };
  77. place in DATA_region { block ZI };
  78. place in DATA_region { last block HEAP };
  79. place in CSTACK_region { block CSTACK };