内存操作
mw 0xc3000000 FF
mw 0xc3000000 FF 1000
md.b
0xe3000000
0x100000
md.w
0xe3000000
0x100000
spi操作 (最小擦除单位为block)
sf read 0xe3000000 0 0x100000
md.b
0xe3000000
0x100000
sf read e30f0000 80000 100
md.w e30f0000 100
sf write e30E0000 0x80000 0x100000
sf erase 80000 10000
sd卡操作
run_command("mmc rescan 0", 0);
run_command("mmcinfo", 0);
run_command("fatls mmc 0", 0);
run_command("fatload mmc 0 0xc3000000 uboot-logo.bmp
", 0);
把cf卡(fat格式)根目录中uboot-logo.bmp(大小142368 bytes)文件拷贝到spi的0x80000开始的地址上并且查看是否写正确:
u-boot>
mmc rescan 0
u-boot>
mmcinfo
u-boot>
fatls mmc 0
u-boot>
fatload mmc 0 0xc3000000 uboot-logo.bmp
u-boot>
sf write
0xc3000000
0x80000 0x22c20
u-boot>
sf read 0xc4000000
0x80000 0x22c20
u-boot>
md.b 0xc4000000
0x22c20