ch.lcf 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. * SPC560D40 memory setup.
  17. */
  18. MEMORY
  19. {
  20. rom : org = 0x00000000, len = 0x00040000
  21. dataflash : org = 0x00800000, len = 0x00010000
  22. ram : org = 0x40000000, len = 0x00004000
  23. }
  24. __irq_stack_size__ = 0;
  25. __process_stack_size__ = 0x0400;
  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. KEEP(*(.boot))
  36. }
  37. .handlers (VLECODE) ALIGN(4): {
  38. KEEP(*(.handlers))
  39. }
  40. .crt0 (VLECODE) ALIGN(4): {
  41. *(.crt0)
  42. }
  43. .init: {}
  44. .init_vle (VLECODE) ALIGN(4):
  45. {
  46. *(.init)
  47. *(.init_vle)
  48. }
  49. .vectors ALIGN(0x800):
  50. {
  51. KEEP(*(.vectors))
  52. }
  53. .ivors (VLECODE) ALIGN(0x1000):
  54. {
  55. __ivpr_base__ = .;
  56. KEEP(*(.ivors))
  57. }
  58. .code (VLECODE) ALIGN(16):
  59. {
  60. *(.text)
  61. *(.text_vle)
  62. }
  63. .const (CONST) ALIGN(16):
  64. {
  65. *(.rdata)
  66. *(.rodata)
  67. }
  68. .sdata2 (CONST) ALIGN(16):
  69. {
  70. __sdata2_start__ = . + 0x8000;
  71. *(.sdata2)
  72. *(.sbss2)
  73. }
  74. .ctors: {}
  75. .dtors: {}
  76. extab: {}
  77. extabindex: {}
  78. . = ALIGN(4);
  79. __romdata_start__ = .;
  80. } > rom
  81. GROUP:
  82. {
  83. .stacks:
  84. {
  85. . = ALIGN(8);
  86. __irq_stack_base__ = .;
  87. . = . + __irq_stack_size__;
  88. . = ALIGN(8);
  89. __irq_stack_end__ = .;
  90. __process_stack_base__ = .;
  91. __main_thread_stack_base__ = .;
  92. . = . + __process_stack_size__;
  93. . = ALIGN(8);
  94. __process_stack_end__ = .;
  95. __main_thread_stack_end__ = .;
  96. }
  97. .data (DATA) LOAD(__romdata_start__):
  98. {
  99. . = ALIGN(4);
  100. __data_start__ = .;
  101. *(.data)
  102. . = ALIGN(4);
  103. }
  104. .sdata (DATA) LOAD(ROMADDR(.data) + SIZEOF(.data)):
  105. {
  106. __sdata_start__ = . + 0x8000;
  107. *(.sdata)
  108. __data_end__ = .;
  109. }
  110. .sbss (BSS):
  111. {
  112. __bss_start__ = .;
  113. *(.sbss)
  114. }
  115. .bss (BSS):
  116. {
  117. *(.bss)
  118. __bss_end__ = .;
  119. }
  120. /* The default heap uses the (statically) unused part of a RAM section.*/
  121. .heap:
  122. {
  123. . = ALIGN(8);
  124. __heap_base__ = .;
  125. . = ADDR(ram) + SIZEOF(ram);
  126. __heap_end__ = .;
  127. }
  128. .PPC.EMB.sdata0: {}
  129. .PPC.EMB.sbss0: {}
  130. } > ram
  131. }