Read direct from a Memory address

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

Read direct from a Memory address

911件の閲覧回数
PEGE
Contributor I

Hello i am using a MCF5282,

 

and i want to buid a loop in C which reads the memorycontent from on adress to another adresse. for example from 0x4000 to 0x8000. in the mcf i have the option to read directly from the sram with RAMBAR_ADDRESS[var] (from 0x20000000).

 

I am interesetd if someone knew an opportunity to read direct from the whole space of memory for example from 0x0 till 0x7FFFFFFF.

 

regards Peter

ラベル(1)
0 件の賞賛
返信
1 返信

737件の閲覧回数
angelo_d
Senior Contributor I

Hi PEGE,

 

i would say this is a simpel C exercise (untested)

 

/* setup your src and dest */

unsigned long volatile * src=(unsigned long volatile *)(RAMBAR+0x4000);

unsigned long volatile * dst =(unsigned long volatile *)(RAMBAR+ ....) ;

 

for ( ; src<0x8000 ; )

      *dst++ = *src++;

 

regards,

angelo

0 件の賞賛
返信