Browse Source

Improve C++ STL support on Teensy 4.x

main
PaulStoffregen 4 years ago
parent
commit
2f8568659c
2 changed files with 18 additions and 6 deletions
  1. +9
    -3
      teensy4/imxrt1062.ld
  2. +9
    -3
      teensy4/imxrt1062_t41.ld

+ 9
- 3
teensy4/imxrt1062.ld View File

. = ALIGN(16); . = ALIGN(16);
} > ITCM AT> FLASH } > ITCM AT> FLASH


.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} > ITCM AT> FLASH

.text.itcm.padding (NOLOAD) : { .text.itcm.padding (NOLOAD) : {
. = ALIGN(32768); . = ALIGN(32768);
} > ITCM } > ITCM
} > RAM } > RAM


_stext = ADDR(.text.itcm); _stext = ADDR(.text.itcm);
_etext = ADDR(.text.itcm) + SIZEOF(.text.itcm);
_etext = ADDR(.text.itcm) + SIZEOF(.text.itcm) + SIZEOF(.ARM.exidx);
_stextload = LOADADDR(.text.itcm); _stextload = LOADADDR(.text.itcm);


_sdata = ADDR(.data); _sdata = ADDR(.data);
_heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma); _heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma);
_heap_end = ORIGIN(RAM) + LENGTH(RAM); _heap_end = ORIGIN(RAM) + LENGTH(RAM);


_itcm_block_count = (SIZEOF(.text.itcm) + 0x7FFF) >> 15;
_itcm_block_count = (SIZEOF(.text.itcm) + SIZEOF(.ARM.exidx) + 0x7FFF) >> 15;
_flexram_bank_config = 0xAAAAAAAA | ((1 << (_itcm_block_count * 2)) - 1); _flexram_bank_config = 0xAAAAAAAA | ((1 << (_itcm_block_count * 2)) - 1);
_estack = ORIGIN(DTCM) + ((16 - _itcm_block_count) << 15); _estack = ORIGIN(DTCM) + ((16 - _itcm_block_count) << 15);


_flashimagelen = SIZEOF(.text.progmem) + SIZEOF(.text.itcm) + SIZEOF(.data);
_flashimagelen = SIZEOF(.text.progmem) + SIZEOF(.text.itcm) + SIZEOF(.ARM.exidx) + SIZEOF(.data);
_teensy_model_identifier = 0x24; _teensy_model_identifier = 0x24;


.debug_info 0 : { *(.debug_info) } .debug_info 0 : { *(.debug_info) }

+ 9
- 3
teensy4/imxrt1062_t41.ld View File

. = ALIGN(16); . = ALIGN(16);
} > ITCM AT> FLASH } > ITCM AT> FLASH


.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} > ITCM AT> FLASH

.text.itcm.padding (NOLOAD) : { .text.itcm.padding (NOLOAD) : {
. = ALIGN(32768); . = ALIGN(32768);
} > ITCM } > ITCM
} > ERAM } > ERAM


_stext = ADDR(.text.itcm); _stext = ADDR(.text.itcm);
_etext = ADDR(.text.itcm) + SIZEOF(.text.itcm);
_etext = ADDR(.text.itcm) + SIZEOF(.text.itcm) + SIZEOF(.ARM.exidx);
_stextload = LOADADDR(.text.itcm); _stextload = LOADADDR(.text.itcm);


_sdata = ADDR(.data); _sdata = ADDR(.data);
_heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma); _heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma);
_heap_end = ORIGIN(RAM) + LENGTH(RAM); _heap_end = ORIGIN(RAM) + LENGTH(RAM);


_itcm_block_count = (SIZEOF(.text.itcm) + 0x7FFF) >> 15;
_itcm_block_count = (SIZEOF(.text.itcm) + SIZEOF(.ARM.exidx) + 0x7FFF) >> 15;
_flexram_bank_config = 0xAAAAAAAA | ((1 << (_itcm_block_count * 2)) - 1); _flexram_bank_config = 0xAAAAAAAA | ((1 << (_itcm_block_count * 2)) - 1);
_estack = ORIGIN(DTCM) + ((16 - _itcm_block_count) << 15); _estack = ORIGIN(DTCM) + ((16 - _itcm_block_count) << 15);


_flashimagelen = SIZEOF(.text.progmem) + SIZEOF(.text.itcm) + SIZEOF(.data);
_flashimagelen = SIZEOF(.text.progmem) + SIZEOF(.text.itcm) + SIZEOF(.ARM.exidx) + SIZEOF(.data);
_teensy_model_identifier = 0x25; _teensy_model_identifier = 0x25;


.debug_info 0 : { *(.debug_info) } .debug_info 0 : { *(.debug_info) }

Loading…
Cancel
Save