Copying object files from ROM to RAM

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

Copying object files from ROM to RAM

923 Views
bjargalsaikhan
Contributor II

Hello,

I am confused on how to copy an object file that contains functions that erase, write, and read flash memory through flexspi. 

I am working with MIMXRT1060-EVK dev-kit. I followed the IAR C/C++ Development Guide for Linking and compiling (http://supp.iar.com/FilesPublic/UPDINFO/013240/arm/doc/EWARM_DevelopmentGuide.ENU.pdf ).

But when check the map file, none of them seems to work with my code. 

I think I am doing something wrong while I am working with the linker file. 

In my linker file, I typed initialize by copy, which copies the file from ROM to RAM. 

initialize by copy {
readwrite,
/* Place in RAM flash and performance dependent functions */
object flexspi_nor_flash_ops.o,
object fsl_flexspi.o,
section .textrw
};

My code is sitting in flash, I just wanted to copy and run the flexspi_erase, write, and read functions from the RAM to erase and write to the Flash memory. 

If it is possible could you help me to tackle the problem?

Thank you. 

Labels (1)
0 Kudos
1 Reply

828 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Baasanjav Jargalsaikhan,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
Maybe you can consider to do that via using the Syntax: __ramfunc.
As the question is mainly about the IAR IDE, you'd better contact the expert of IAR for tech support.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos