A Error of pointer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,678件の閲覧回数
wackestar
Contributor I
unsigned int FlashBuf[10];
 
#pragma CODE_SEG NON_BANKED
void FlashProg(void)
{
    FSTAT = 0x80;
    while(!FSTAT_CCIF);
}
 
void  FlashInit(void)
{
    unsigned char i;
   unsigned int * far  pSData = (unsigned int * far ) FlashProg;
    
    FCLKDIV = FBUS / 200000;
    pSData     for(i = 0 ; i < 10; i++)
    {
         FlashBuf[i] = *pSData++;
    }
}
I hope to copy FlashProg code in FlashBuf,But the pSData is error.  Why?
 
 
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
837件の閲覧回数
CrasyCat
Specialist III
Hello
 
I am not sure what you are trying to achieve here.
Are you looking for a way to run some code out of RAM?
 
If this is the case I would suggest you to look for FAQ-27682 on Freescale web site.
This FAQ covers exactly that topic.
 
I hope this helps.
 
CrasyCat

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
838件の閲覧回数
CrasyCat
Specialist III
Hello
 
I am not sure what you are trying to achieve here.
Are you looking for a way to run some code out of RAM?
 
If this is the case I would suggest you to look for FAQ-27682 on Freescale web site.
This FAQ covers exactly that topic.
 
I hope this helps.
 
CrasyCat
0 件の賞賛
返信