diff --git a/ports/mimxrt/boards/common.ld b/ports/mimxrt/boards/common.ld index 5dd7097fab..7aee66e2e8 100644 --- a/ports/mimxrt/boards/common.ld +++ b/ports/mimxrt/boards/common.ld @@ -96,7 +96,7 @@ SECTIONS .text : { . = ALIGN(4); - *(EXCLUDE_FILE(*fsl_flexspi.o) .text*) /* .text* sections (code) */ + *(EXCLUDE_FILE(*fsl_flexspi.o *gc*.o *vm.o *parse.o *runtime*.o *mpirq.o *map.o) .text*) /* .text* sections (code) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ *(.glue_7) /* glue arm to thumb code */ @@ -200,8 +200,9 @@ SECTIONS { . = ALIGN(4); __ram_function_start__ = .; - *fsl_flexspi.o(.text*) *(.ram_functions*) + /* remaining .text and .rodata; i.e. stuff we exclude above because we want it in RAM */ + *(.text*) . = ALIGN(4); __ram_function_end__ = .; } > m_itcm diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h index 1d487fb541..35ee9eb648 100644 --- a/ports/mimxrt/mpconfigport.h +++ b/ports/mimxrt/mpconfigport.h @@ -43,7 +43,9 @@ uint32_t trng_random_u32(void); #define MICROPY_EMIT_THUMB (1) #define MICROPY_EMIT_INLINE_THUMB (1) -// Compiler configuration +// Optimisations +#define MICROPY_OPT_LOAD_ATTR_FAST_PATH (1) +#define MICROPY_OPT_MAP_LOOKUP_CACHE (1) // Python internal features #define MICROPY_READER_VFS (1)