How to automatically link a file to RAM in MCUXPresso IDE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to automatically link a file to RAM in MCUXPresso IDE

Jump to solution
292 Views
Vinos
Contributor III

I know that it is possible to uncheck 'Manage linker script' in the settings, then manually modify the xxxx_Debug.ld file in the directory, use EXCLUDE_FILE to remove the file from the Flash section, and then place it in RAM.

However, I found in the evkmimxrt1170_wifi_webconfig_cm7 SDK example, because some files need to use Flash-related functions, they have to be linked to RAM. But I noticed that in the project, 'Manage linker script' is checked, and the evkmimxrt1170_wifi_webconfig_cm7_Debug.ld generated automatically by the IDE includes some fields that I originally had to manually add using EXCLUDE_FILE.

.text : ALIGN(4)
{
    *(EXCLUDE_FILE(*mflash_drv.o *fsl_flexspi.o) .text*)
    ....
}

.data_RAM3 : ALIGN(4)
{
    ...
    *mflash_drv.o(.text .text* .rodata .rodata*)
    *fsl_flexspi.o(.text .text* .rodata .rodata*)
    ...
} > SRAM_OC1 AT>BOARD_FLASH

Why is it that in this project, some files can be automatically linked to another RAM, and I haven't found relevant settings in MCUXPresso IDE.Does anyone know how this is done?

0 Kudos
1 Solution
263 Views
Vinos
Contributor III

I seem to know how to achieve it. The files in the linkscripts folder under the project directory affect the generation of link scripts.

View solution in original post

0 Kudos
1 Reply
264 Views
Vinos
Contributor III

I seem to know how to achieve it. The files in the linkscripts folder under the project directory affect the generation of link scripts.

0 Kudos