Browse Source

Improve C++ STL support on Teensy 4.x

teensy4-core
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

@@ -38,6 +38,12 @@ SECTIONS
. = ALIGN(16);
} > ITCM AT> FLASH

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

.text.itcm.padding (NOLOAD) : {
. = ALIGN(32768);
} > ITCM
@@ -61,7 +67,7 @@ SECTIONS
} > RAM

_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);

_sdata = ADDR(.data);
@@ -74,11 +80,11 @@ SECTIONS
_heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma);
_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);
_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;

.debug_info 0 : { *(.debug_info) }

+ 9
- 3
teensy4/imxrt1062_t41.ld View File

@@ -39,6 +39,12 @@ SECTIONS
. = ALIGN(16);
} > ITCM AT> FLASH

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

.text.itcm.padding (NOLOAD) : {
. = ALIGN(32768);
} > ITCM
@@ -66,7 +72,7 @@ SECTIONS
} > ERAM

_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);

_sdata = ADDR(.data);
@@ -79,11 +85,11 @@ SECTIONS
_heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma);
_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);
_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;

.debug_info 0 : { *(.debug_info) }

Loading…
Cancel
Save