copying code from ROM to RAM on startup on MPC56xx

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

copying code from ROM to RAM on startup on MPC56xx

1,448 次查看
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?

标签 (1)
标记 (1)
0 项奖励
2 回复数

425 次查看
stanish
NXP Employee
NXP Employee

Hello,

 

I'd suggest you to see the thread below:

 

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

 

Stanish

0 项奖励

425 次查看
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 项奖励