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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com
  3. * (C) 2016 flabbergast <[email protected]>
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining
  6. * a copy of this software and associated documentation files (the "Software"),
  7. * to deal in the Software without restriction, including without limitation
  8. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9. * and/or sell copies of the Software, and to permit persons to whom the
  10. * Software is furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in
  13. * all copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  16. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  21. * SOFTWARE.
  22. */
  23. /*
  24. * KL26Z64 memory setup.
  25. */
  26. MEMORY
  27. {
  28. flash0 : org = 0x00000000, len = 0x100
  29. flash1 : org = 0x00000400, len = 0x10
  30. flash2 : org = 0x00000410, len = 62k - 0x410
  31. flash3 : org = 0x0000F800, len = 2k
  32. flash4 : org = 0x00000000, len = 0
  33. flash5 : org = 0x00000000, len = 0
  34. flash6 : org = 0x00000000, len = 0
  35. flash7 : org = 0x00000000, len = 0
  36. ram0 : org = 0x1FFFF800, len = 8k
  37. ram1 : org = 0x00000000, len = 0
  38. ram2 : org = 0x00000000, len = 0
  39. ram3 : org = 0x00000000, len = 0
  40. ram4 : org = 0x00000000, len = 0
  41. ram5 : org = 0x00000000, len = 0
  42. ram6 : org = 0x00000000, len = 0
  43. ram7 : org = 0x00000000, len = 0
  44. }
  45. /* Flash region for the configuration bytes.*/
  46. SECTIONS
  47. {
  48. .cfmprotect : ALIGN(4) SUBALIGN(4)
  49. {
  50. KEEP(*(.cfmconfig))
  51. } > flash1
  52. }
  53. /* For each data/text section two region are defined, a virtual region
  54. and a load region (_LMA suffix).*/
  55. /* Flash region to be used for exception vectors.*/
  56. REGION_ALIAS("VECTORS_FLASH", flash0);
  57. REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
  58. /* Flash region to be used for constructors and destructors.*/
  59. REGION_ALIAS("XTORS_FLASH", flash2);
  60. REGION_ALIAS("XTORS_FLASH_LMA", flash2);
  61. /* Flash region to be used for code text.*/
  62. REGION_ALIAS("TEXT_FLASH", flash2);
  63. REGION_ALIAS("TEXT_FLASH_LMA", flash2);
  64. /* Flash region to be used for read only data.*/
  65. REGION_ALIAS("RODATA_FLASH", flash2);
  66. REGION_ALIAS("RODATA_FLASH_LMA", flash2);
  67. /* Flash region to be used for various.*/
  68. REGION_ALIAS("VARIOUS_FLASH", flash2);
  69. REGION_ALIAS("VARIOUS_FLASH_LMA", flash2);
  70. /* Flash region to be used for RAM(n) initialization data.*/
  71. REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2);
  72. /* RAM region to be used for Main stack. This stack accommodates the processing
  73. of all exceptions and interrupts.*/
  74. REGION_ALIAS("MAIN_STACK_RAM", ram0);
  75. /* RAM region to be used for the process stack. This is the stack used by
  76. the main() function.*/
  77. REGION_ALIAS("PROCESS_STACK_RAM", ram0);
  78. /* RAM region to be used for data segment.*/
  79. REGION_ALIAS("DATA_RAM", ram0);
  80. REGION_ALIAS("DATA_RAM_LMA", flash2);
  81. /* RAM region to be used for BSS segment.*/
  82. REGION_ALIAS("BSS_RAM", ram0);
  83. /* RAM region to be used for the default heap.*/
  84. REGION_ALIAS("HEAP_RAM", ram0);
  85. __eeprom_workarea_start__ = ORIGIN(flash3);
  86. __eeprom_workarea_size__ = LENGTH(flash3);
  87. __eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__;
  88. /* Generic rules inclusion.*/
  89. INCLUDE rules.ld