ch.lcf 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /*
  2. ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
  3. This file is part of ChibiOS.
  4. ChibiOS is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. ChibiOS is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. /*
  16. * SPC56EC74 memory setup.
  17. */
  18. MEMORY
  19. {
  20. rom : org = 0x00000000, len = 0x00300000
  21. dataflash : org = 0x00800000, len = 0x00010000
  22. ram : org = 0x40000000, len = 0x00030000
  23. }
  24. __irq_stack_size__ = 0;
  25. __process_stack_size__ = 0x1000;
  26. __ram_size__ = SIZEOF(ram);
  27. __ram_start__ = ADDR(ram);
  28. __ram_end__ = ADDR(ram) + SIZEOF(ram);
  29. SECTIONS
  30. {
  31. GROUP:
  32. {
  33. .boot ALIGN(16):
  34. {
  35. __ivpr_base__ = .;
  36. KEEP(*(.boot))
  37. }
  38. .handlers (VLECODE) ALIGN(16):
  39. {
  40. KEEP(*(.handlers))
  41. }
  42. .crt0 (VLECODE) ALIGN(16):
  43. {
  44. KEEP(*(.crt0))
  45. }
  46. .init: {}
  47. .init_vle (VLECODE) ALIGN(4):
  48. {
  49. *(.init)
  50. *(.init_vle)
  51. }
  52. .vectors ALIGN(0x800):
  53. {
  54. KEEP(*(.vectors))
  55. }
  56. .code (VLECODE) ALIGN(16):
  57. {
  58. *(.text)
  59. *(.text_vle)
  60. }
  61. .const (CONST) ALIGN(16):
  62. {
  63. *(.rdata)
  64. *(.rodata)
  65. }
  66. .sdata2 (CONST) ALIGN(16):
  67. {
  68. __sdata2_start__ = . + 0x8000;
  69. *(.sdata2)
  70. *(.sbss2)
  71. }
  72. .ctors: {}
  73. .dtors: {}
  74. extab: {}
  75. extabindex: {}
  76. . = ALIGN(4);
  77. __romdata_start__ = .;
  78. } > rom
  79. GROUP:
  80. {
  81. .stacks:
  82. {
  83. . = ALIGN(8);
  84. __irq_stack_base__ = .;
  85. . = . + __irq_stack_size__;
  86. . = ALIGN(8);
  87. __irq_stack_end__ = .;
  88. __process_stack_base__ = .;
  89. __main_thread_stack_base__ = .;
  90. . = . + __process_stack_size__;
  91. . = ALIGN(8);
  92. __process_stack_end__ = .;
  93. __main_thread_stack_end__ = .;
  94. }
  95. .data (DATA) LOAD(__romdata_start__):
  96. {
  97. . = ALIGN(4);
  98. __data_start__ = .;
  99. *(.data)
  100. . = ALIGN(4);
  101. }
  102. .sdata (DATA) LOAD(ROMADDR(.data) + SIZEOF(.data)):
  103. {
  104. __sdata_start__ = . + 0x8000;
  105. *(.sdata)
  106. __data_end__ = .;
  107. }
  108. .sbss (BSS):
  109. {
  110. __bss_start__ = .;
  111. *(.sbss)
  112. }
  113. .bss (BSS):
  114. {
  115. *(.bss)
  116. __bss_end__ = .;
  117. }
  118. /* The default heap uses the (statically) unused part of a RAM section.*/
  119. .heap:
  120. {
  121. . = ALIGN(8);
  122. __heap_base__ = .;
  123. . = ADDR(ram) + SIZEOF(ram);
  124. __heap_end__ = .;
  125. }
  126. .PPC.EMB.sdata0: {}
  127. .PPC.EMB.sbss0: {}
  128. } > ram
  129. }