Board logo

标题: [求助]flash-programmer下载遇到 No CFI table found at address [打印本页]

作者: yangywxm    时间: 2007-12-19 22:44     标题: [求助]flash-programmer下载遇到 No CFI table found at address

No CFI table found at address 0x0120000

试过网上所说的把外面 的接口改成birdir,不行

请高手帮忙下


作者: caopengly    时间: 2007-12-20 18:23

这是一个比较常见的问题,你的配置targetboard有问题,你可以看看下面的链接:

flash的讨论 http://bbs.eccn.com/ecbbs/dispbbs.asp?boardID=9&ID=36154&page=2

当然也有可能是硬件的问题,你可以试试下面的flash测试程序。

#include <stdio.h>
#include <sys/alt_flash.h>
#include "system.h"
#include <unistd.h>
#define DATA_OFFSET 0x300000

int main(void)
{
alt_flash_fd* flash_handle;
FILE *uart;
char write_data = 0;
char read_data = 0;
write_data = 100;
uart = fopen(UART_NAME,"w");
flash_handle = alt_flash_open_dev(CFI_FLASH_NAME);
fprintf(uart, "open flash device...\n");
usleep(10000);
if (flash_handle)
{
fprintf(uart, "open flash device successed!!!\n");
usleep(10000);
alt_write_flash(flash_handle, DATA_OFFSET, &write_data, 1);
fprintf(uart, "wirte_data = %d\n", write_data);
usleep(10000);
alt_read_flash(flash_handle, DATA_OFFSET, &read_data, 1);
fprintf(uart, "read_data = %d\n", read_data);
usleep(10000);
if(read_data == write_data)
{
fprintf(uart, "flash write and read successed!!!\n");
usleep(10000);
}
else
{
fprintf(uart, "flash write or read failed!!!\n");
usleep(10000);
}
alt_flash_close_dev(flash_handle);
fprintf(uart, "close flash device...\n");
usleep(10000);
}
else
{
fprintf(uart, "open flash device failed!!!\n");
usleep(10000);
}
}






欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0