How to move code from flash to sram

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

How to move code from flash to sram

Jump to solution
646 Views
Wayne2
Contributor II

Hi NXP team

I want to move some high frequency functions from flash to the sram, in order to running in the sram which can reduce the cpu loading.

But I found it only can modify it in the settings, if I choose the "Link application to RAM", it will push all the flash code to the ram.

If I use the "Extra linker script input sections", I don't know how to specify a cpp file and then compile .o file move it to the sram.

I also found the .ld file was generated, and couldn't edit.

Could you tell me how to modify the code?

 

Wayne2_0-1670850485385.png

Thanks!

Tags (1)
0 Kudos
1 Solution
621 Views
jay_heng
NXP Employee
NXP Employee

You can try MCUX FreeMarker, it can help you relocate part of object files to any RAM

MCUXpresso IDE下高度灵活的FreeMarker链接文件模板机制

View solution in original post

0 Kudos
2 Replies
622 Views
jay_heng
NXP Employee
NXP Employee

You can try MCUX FreeMarker, it can help you relocate part of object files to any RAM

MCUXpresso IDE下高度灵活的FreeMarker链接文件模板机制

0 Kudos
624 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Wayne2 

Please look into the following community post: https://community.nxp.com/t5/i-MX-RT/Relocating-code-from-FLASH-to-RAM-All-file/td-p/1220584

I believe it will prove very useful for your inquiry.

 

BR,

Edwin.

0 Kudos