uboot下Nor flash的驱动非常简单, 也提供了很好的使用范例 . 可以作为参考.
header = (void *)addr; if (validate_header(header)) {
printf("Image does not have valid header form addr:0x%lx\n", addr); return 1; } if (validate_data(header)) return 1; printf("Image validated. Header size %d, data size %d\n", header->hlen, header->dlen); printf(" Header crc 0x%x, data crc 0x%x\n", header->hcrc, header->dcrc); printf(" Image link address is 0x%llx\n", header->address); printf(" Image address is 0x%lx\n", addr);
printf("\nwrite from addr:0x%lx to addr:0x%lx of size:0x%lx\n\n", addr_first, addr_last, addr_last - addr_first);
//知道了uboot的起始,结束地址, 就可以知道uboot在flash 里要使 用 几个扇区. /* 一, 先取消要使 用的扇区保护, 参数0 表 示取消保护 */ if ((rcode = flash_sect_protect(0, addr_first, addr_last)) != 0) return rcode; //擦除要使 用到的扇区 if ((rcode = flash_sect_erase(addr_first, addr_last)) != 0) return rcode; //向要使 用到的扇区写 入数据 puts ("Copy to Flash... "); if ((rcode = flash_write((char *)addr, addr_first, addr_last - addr_first)) != 0) { flash_perror(rcode); return 1;
} puts ("done\n"); return 0; }
int flash_sect_protect (int p, ulong addr_first, ulong addr_last){ flash_info_t *info; ulong bank; int s_first[CONFIG_SYS_MAX_FLASH_BANKS], s_last[CONFIG_SYS_MAX_FLASH_BANKS]; int protected, i; int planned;
如果烧录到 nandflash 下是不能运行的。 3.参考开发板资料,设置好跳线,从 nor flash 启动。 启动信息如下: U-Boot 1.1.4 (Dec 30 2007 - 23:25:02) ...
用JLINK烧写Uboot到NOR_FLASH配置过程_1_计算机硬件及网络_IT/计算机_专业...J-Link ARM 可以用来进行设置和测试, 下面我们看一下J-LINK 的测试数据双击J...
暂无评价0人阅读0次下载举报文档 用JLINK烧写Uboot到NOR FLASH配置过程_...开发板上面选的 是什么芯片就用什么芯片,我们这里是:EN29LV160AB-70TCP 设置好...
最新Uboot移植步骤 5:NorFlash_生物学_自然科学_专业资料。最新 Uboot 移植... 定义: 声明: 使用: 设置好后,读出来: 再编译下载: 我们可不可以直接下载呢...
暂无评价0人阅读0次下载举报文档 Uboot中nor flash移植_计算机软件及应用...并打印环境变量:printenv。看是否和上面设置的一致 2 今日推荐 ...
Norflash 操作 NorFlash 型号 :AM29LV160DB (1) Nor Flash 工作模式 Nor ... 加入会员!获取文档下载券 登录百度文库,专享文档复制特权,财富值每天免费拿!...
暂无评价0人阅读0次下载举报文档 uboot移植for nor flash_医学_高等教育...CFG_FLASH_READ2 这些是用于查询 Flash 操作状态的,在 datasheet 中有详细地...
FLASH 是否工作.在应用中,也有很多时候需要 对 FLASH 进行写操作.这篇文章简单...在开始之前,先声明一下,这篇文章只是介绍了如何写 NOR FLASH 的烧写驱动,和 ...
7)使能 flash 的写保护://设置 EMIFS_CONFIG 寄存器的最低位为 0(即让 ...称闪存,主要有两种:NorFlash 和 NandFlash,下面我们从多个角度来对比介绍一下...
加入Nand flash 驱动的支持,可以在 uboot 命令行下操作 Nand flash.但还未能从 Nand flash 启动,只能在 Nor flash 内运行.支持从 Nandflash 启动会在下节介绍...
热门文档