Teensy 4.1 core updated for C++20
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.

88 lines
2.0KB

  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 = 1984K
  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. *(.flashmem*)
  20. *(.progmem*)
  21. . = ALIGN(4);
  22. KEEP(*(.init))
  23. __preinit_array_start = .;
  24. KEEP (*(.preinit_array))
  25. __preinit_array_end = .;
  26. __init_array_start = .;
  27. KEEP (*(.init_array))
  28. __init_array_end = .;
  29. . = ALIGN(16);
  30. } > FLASH
  31. .text.itcm : {
  32. . = . + 32; /* MPU to trap NULL pointer deref */
  33. *(.fastrun)
  34. *(.text*)
  35. . = ALIGN(16);
  36. } > ITCM AT> FLASH
  37. .data : {
  38. *(.rodata*)
  39. *(.data*)
  40. . = ALIGN(16);
  41. } > DTCM AT> FLASH
  42. .bss ALIGN(4) : {
  43. *(.bss*)
  44. *(COMMON)
  45. . = ALIGN(32);
  46. . = . + 32; /* MPU to trap stack overflow */
  47. } > DTCM
  48. .bss.dma (NOLOAD) : {
  49. *(.dmabuffers)
  50. . = ALIGN(16);
  51. } > RAM
  52. _stext = ADDR(.text.itcm);
  53. _etext = ADDR(.text.itcm) + SIZEOF(.text.itcm);
  54. _stextload = LOADADDR(.text.itcm);
  55. _sdata = ADDR(.data);
  56. _edata = ADDR(.data) + SIZEOF(.data);
  57. _sdataload = LOADADDR(.data);
  58. _sbss = ADDR(.bss);
  59. _ebss = ADDR(.bss) + SIZEOF(.bss);
  60. _heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma);
  61. _heap_end = ORIGIN(RAM) + LENGTH(RAM);
  62. _itcm_block_count = (SIZEOF(.text.itcm) + 0x7FFE) >> 15;
  63. _flexram_bank_config = 0xAAAAAAAA | ((1 << (_itcm_block_count * 2)) - 1);
  64. _estack = ORIGIN(DTCM) + ((16 - _itcm_block_count) << 15);
  65. _flashimagelen = SIZEOF(.text.progmem) + SIZEOF(.text.itcm) + SIZEOF(.data);
  66. _teensy_model_identifier = 0x24;
  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. }