Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MKL26Z64.ld 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. * KL25Z64 memory setup.
  17. */
  18. ENTRY(Reset_Handler)
  19. MEMORY
  20. {
  21. flash0 : org = 0x00000000, len = 0xc0
  22. flashcfg : org = 0x00000400, len = 0x10
  23. flash : org = 0x00000410, len = 62k - 0x410
  24. eeprom_emu : org = 0x0000F800, len = 2k
  25. ram : org = 0x1FFFF800, len = 8k
  26. }
  27. __ram_start__ = ORIGIN(ram);
  28. __ram_size__ = LENGTH(ram);
  29. __ram_end__ = __ram_start__ + __ram_size__;
  30. __eeprom_workarea_start__ = ORIGIN(eeprom_emu);
  31. __eeprom_workarea_size__ = LENGTH(eeprom_emu);
  32. __eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__;
  33. SECTIONS
  34. {
  35. . = 0;
  36. .isr : ALIGN(4) SUBALIGN(4)
  37. {
  38. KEEP(*(.vectors))
  39. } > flash0
  40. .cfmprotect : ALIGN(4) SUBALIGN(4)
  41. {
  42. KEEP(*(.cfmconfig))
  43. } > flashcfg
  44. _text = .;
  45. constructors : ALIGN(4) SUBALIGN(4)
  46. {
  47. PROVIDE(__init_array_start = .);
  48. KEEP(*(SORT(.init_array.*)))
  49. KEEP(*(.init_array))
  50. PROVIDE(__init_array_end = .);
  51. } > flash
  52. destructors : ALIGN(4) SUBALIGN(4)
  53. {
  54. PROVIDE(__fini_array_start = .);
  55. KEEP(*(.fini_array))
  56. KEEP(*(SORT(.fini_array.*)))
  57. PROVIDE(__fini_array_end = .);
  58. } > flash
  59. .text : ALIGN(4) SUBALIGN(4)
  60. {
  61. *(.text)
  62. *(.text.*)
  63. *(.rodata)
  64. *(.rodata.*)
  65. *(.glue_7t)
  66. *(.glue_7)
  67. *(.gcc*)
  68. } > flash
  69. .ARM.extab :
  70. {
  71. *(.ARM.extab* .gnu.linkonce.armextab.*)
  72. } > flash
  73. .ARM.exidx : {
  74. PROVIDE(__exidx_start = .);
  75. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  76. PROVIDE(__exidx_end = .);
  77. } > flash
  78. .eh_frame_hdr :
  79. {
  80. *(.eh_frame_hdr)
  81. } > flash
  82. .eh_frame : ONLY_IF_RO
  83. {
  84. *(.eh_frame)
  85. } > flash
  86. .textalign : ONLY_IF_RO
  87. {
  88. . = ALIGN(8);
  89. } > flash
  90. _etext = .;
  91. _textdata = _etext;
  92. .stacks :
  93. {
  94. . = ALIGN(8);
  95. __main_stack_base__ = .;
  96. . += __main_stack_size__;
  97. . = ALIGN(8);
  98. __main_stack_end__ = .;
  99. __process_stack_base__ = .;
  100. __main_thread_stack_base__ = .;
  101. . += __process_stack_size__;
  102. . = ALIGN(8);
  103. __process_stack_end__ = .;
  104. __main_thread_stack_end__ = .;
  105. } > ram
  106. .data :
  107. {
  108. . = ALIGN(4);
  109. PROVIDE(_data = .);
  110. *(.data)
  111. . = ALIGN(4);
  112. *(.data.*)
  113. . = ALIGN(4);
  114. *(.ramtext)
  115. . = ALIGN(4);
  116. PROVIDE(_edata = .);
  117. } > ram AT > flash
  118. .bss :
  119. {
  120. . = ALIGN(4);
  121. PROVIDE(_bss_start = .);
  122. *(.bss)
  123. . = ALIGN(4);
  124. *(.bss.*)
  125. . = ALIGN(4);
  126. *(COMMON)
  127. . = ALIGN(4);
  128. PROVIDE(_bss_end = .);
  129. } > ram
  130. }
  131. PROVIDE(end = .);
  132. _end = .;
  133. __heap_base__ = _end;
  134. __heap_end__ = __ram_end__;