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.

87 lines
1.9KB

  1. MEMORY
  2. {
  3. ITCM (rwx): ORIGIN = 0x00000000, LENGTH = 128K
  4. DTCM (rwx): ORIGIN = 0x20000000, LENGTH = 128K
  5. RAM (rwx): ORIGIN = 0x20200000, LENGTH = 256K
  6. FLASH (rwx): ORIGIN = 0x60000000, LENGTH = 1536K
  7. }
  8. ENTRY(ImageVectorTable)
  9. SECTIONS
  10. {
  11. .text.progmem : {
  12. KEEP(*(.flashconfig))
  13. FILL(0xFF)
  14. . = ORIGIN(FLASH) + 0x1000;
  15. KEEP(*(.ivt))
  16. KEEP(*(.bootdata))
  17. KEEP(*(.vectors))
  18. KEEP(*(.startup))
  19. *(.progmem*)
  20. . = ALIGN(4);
  21. /*
  22. TODO: how much of this C++ stuff is really needed?
  23. KEEP(*(.init))
  24. . = ALIGN(4);
  25. __preinit_array_start = .;
  26. KEEP (*(.preinit_array))
  27. __preinit_array_end = .;
  28. __init_array_start = .;
  29. KEEP (*(SORT(.init_array.*)))
  30. KEEP (*(.init_array))
  31. __init_array_end = .;
  32. */
  33. . = ALIGN(16);
  34. } > FLASH
  35. .text : {
  36. . = . + 32; /* MPU to trap NULL pointer deref */
  37. *(.fastrun)
  38. *(.text*)
  39. . = ALIGN(16);
  40. } > ITCM AT> FLASH
  41. .data : {
  42. *(.rodata*)
  43. *(.data*)
  44. . = ALIGN(16);
  45. } > DTCM AT> FLASH
  46. .bss : {
  47. *(.bss*)
  48. *(COMMON)
  49. . = ALIGN(32);
  50. . = . + 32; /* MPU to trap stack overflow */
  51. } > DTCM
  52. .bss.dma : {
  53. *(.dmabuffers)
  54. . = ALIGN(16);
  55. } > RAM
  56. _stext = ADDR(.text);
  57. _etext = ADDR(.text) + SIZEOF(.text);
  58. _stextload = LOADADDR(.text);
  59. _sdata = ADDR(.data);
  60. _edata = ADDR(.data) + SIZEOF(.data);
  61. _sdataload = LOADADDR(.data);
  62. _estack = ORIGIN(DTCM) + LENGTH(DTCM);
  63. _sbss = ADDR(.bss);
  64. _ebss = ADDR(.bss) + SIZEOF(.bss);
  65. _flashimagelen = SIZEOF(.text.progmem) + SIZEOF(.text) + SIZEOF(.data);
  66. _teensy_model_identifier = 0x23;
  67. .debug_info 0 : { *(.debug_info) }
  68. .debug_abbrev 0 : { *(.debug_abbrev) }
  69. .debug_line 0 : { *(.debug_line) }
  70. .debug_frame 0 : { *(.debug_frame) }
  71. .debug_str 0 : { *(.debug_str) }
  72. .debug_loc 0 : { *(.debug_loc) }
  73. }