A Error of pointer

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

A Error of pointer

跳至解决方案
1,673 次查看
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 解答
832 次查看
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 回复
833 次查看
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 项奖励
回复