copying code from ROM to RAM on startup on MPC56xx

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

copying code from ROM to RAM on startup on MPC56xx

1,503件の閲覧回数
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 返答(返信)

480件の閲覧回数
stanish
NXP Employee
NXP Employee

Hello,

 

I'd suggest you to see the thread below:

 

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

 

Stanish

0 件の賞賛
返信

480件の閲覧回数
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 件の賞賛
返信