Quantcast
Channel: 数字信号处理器 (DSP) & ARM® 微处理器
Viewing all articles
Browse latest Browse all 21822

帖子: RE: 求助关于6455的8位flash读写问题

$
0
0

您能帮忙看一下我烧录的程序哪里有问题吗?用NORFLASH 8位的做boot

fp = fopen(fileName, "rb");

fseek(fp,0,SEEK_END);
fileSize = ftell(fp);

fread(&buf,1,fileSize,fp);
printf("Programming Begin Start From 0xB0000000, Length = 0x%x; Please Wait Again......\n", fileSize );
for(i=0;i<fileSize;i++)
{
if(Write_Byte(Address++, buf[i]) == -1)
{
printf("Write error at Address: 0x%x\n", Address-1);
return;
}
}

printf("Write Complete Flag\n");

for (i= 0; i<4; i++)
Write_Byte(Address++, 0); // Write complete flag;

printf("Flash Burn End, Reset Flash to Normal Mode.\n");
*(unsigned char *)FlashBaseAddr = 0xF0; // Reset Flash to Normal Mode;

printf("Re-Power On the Board.\n");
while(1);

生成cmd 

DSP_TP_C6455.out

-a

-memwidth 8

-map post_hex.map

-boot

-bootorg 0xB0000400

-bootsection .boot_load 0xB0000000

ROMS

{

FLASH: org = 0xB0000000, len = 0x80000, romwidth = 8, files = {test_io.hex}

}


Viewing all articles
Browse latest Browse all 21822

Trending Articles