copying code from ROM to RAM on startup on MPC56xx

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

copying code from ROM to RAM on startup on MPC56xx

1,425 Views
AhmadNasser
Contributor I

I am using the MPC5645S. I have some files that need to be located in flash but copied to RAM on startup. The startup code performs the copy by parsing a table __rom_copy_info:

__rom_copy_info *dci;
    __bss_init_info *bii;
    
     /* Copy from ROM to RAM: */

    dci = _rom_copy_info;
    while (1) {
        if (dci->rom == 0 && dci->addr == 0 && dci->size == 0) break;
         __copy_rom_section(dci->addr, dci->rom, dci->size);
         dci++;
    }

My question is how to tell the linker to specify that certain segments/files need to be located in that table so that the code can be copied to RAM on startup?

Labels (1)
0 Kudos
2 Replies

402 Views
stanish
NXP Employee
NXP Employee

Hello,

 

I'd suggest you to see the thread below:

 

https://community.freescale.com/thread/66070

 

Stanish

0 Kudos

402 Views
MPC5646
Contributor I

Hi Ahmed,

I am using the MPC5646C target and I have got your problem, can you tell me how you solved it.

Best regards

 

0 Kudos