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.

97 lines
2.2KB

  1. MEMORY
  2. {
  3. ITCM (rwx): ORIGIN = 0x00000000, LENGTH = 512K
  4. DTCM (rwx): ORIGIN = 0x20000000, LENGTH = 512K
  5. RAM (rwx): ORIGIN = 0x20200000, LENGTH = 512K
  6. FLASH (rwx): ORIGIN = 0x60000000, LENGTH = 7936K
  7. ERAM (rwx): ORIGIN = 0x70000000, LENGTH = 16384K
  8. }
  9. ENTRY(ImageVectorTable)
  10. SECTIONS
  11. {
  12. .text.progmem : {
  13. KEEP(*(.flashconfig))
  14. FILL(0xFF)
  15. . = ORIGIN(FLASH) + 0x1000;
  16. KEEP(*(.ivt))
  17. KEEP(*(.bootdata))
  18. KEEP(*(.vectors))
  19. KEEP(*(.startup))
  20. *(.flashmem*)
  21. *(.progmem*)
  22. . = ALIGN(4);
  23. KEEP(*(.init))
  24. __preinit_array_start = .;
  25. KEEP (*(.preinit_array))
  26. __preinit_array_end = .;
  27. __init_array_start = .;
  28. KEEP (*(.init_array))
  29. __init_array_end = .;
  30. . = ALIGN(16);
  31. } > FLASH
  32. .text.itcm : {
  33. . = . + 32; /* MPU to trap NULL pointer deref */
  34. *(.fastrun)
  35. *(.text*)
  36. . = ALIGN(16);
  37. } > ITCM AT> FLASH
  38. .text.itcm.padding (NOLOAD) : {
  39. . = ALIGN(32768);
  40. } > ITCM
  41. .data : {
  42. *(.rodata*)
  43. *(.data*)
  44. . = ALIGN(16);
  45. } > DTCM AT> FLASH
  46. .bss ALIGN(4) : {
  47. *(.bss*)
  48. *(COMMON)
  49. . = ALIGN(32);
  50. . = . + 32; /* MPU to trap stack overflow */
  51. } > DTCM
  52. .bss.dma (NOLOAD) : {
  53. *(.dmabuffers)
  54. . = ALIGN(32);
  55. } > RAM
  56. .bss.extram (NOLOAD) : {
  57. *(.externalram)
  58. } > ERAM
  59. _stext = ADDR(.text.itcm);
  60. _etext = ADDR(.text.itcm) + SIZEOF(.text.itcm);
  61. _stextload = LOADADDR(.text.itcm);
  62. _sdata = ADDR(.data);
  63. _edata = ADDR(.data) + SIZEOF(.data);
  64. _sdataload = LOADADDR(.data);
  65. _sbss = ADDR(.bss);
  66. _ebss = ADDR(.bss) + SIZEOF(.bss);
  67. _heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma);
  68. _heap_end = ORIGIN(RAM) + LENGTH(RAM);
  69. _itcm_block_count = (SIZEOF(.text.itcm) + 0x7FFF) >> 15;
  70. _flexram_bank_config = 0xAAAAAAAA | ((1 << (_itcm_block_count * 2)) - 1);
  71. _estack = ORIGIN(DTCM) + ((16 - _itcm_block_count) << 15);
  72. _flashimagelen = SIZEOF(.text.progmem) + SIZEOF(.text.itcm) + SIZEOF(.data);
  73. _teensy_model_identifier = 0x25;
  74. .debug_info 0 : { *(.debug_info) }
  75. .debug_abbrev 0 : { *(.debug_abbrev) }
  76. .debug_line 0 : { *(.debug_line) }
  77. .debug_frame 0 : { *(.debug_frame) }
  78. .debug_str 0 : { *(.debug_str) }
  79. .debug_loc 0 : { *(.debug_loc) }
  80. }