本文主要是介绍sunxi-fel 的相关命令,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
文章目录
- 简介
- 常用命令说明
- 获取flash的相关信息
- 列出所有的FEL设备
- 显示BROM信息
- 烧写程序到内存
- 烧写程序到flash
简介
这个命令是全志芯片的烧写程序。有很多写法。
例如 : F1C100S 、F1C200S
这个命令有很多隐藏的相关问题(这里不讨论)
常用命令说明
获取flash的相关信息
$ ./sunxi-fel.exe -p spiflash-info
Manufacturer: Winbond (EFh), model: 40h, size: 33554432 bytes.
意思是 连接了 32MB 的FLASH,至于是NAND还是NOR。
flash的类型可能对板子有很大的影响。
这是一个 f1c200s开发板(使用了128MB NAND flash)的返回。(应该坏了)
$ ./sunxi-fel.exe -p spiflash-info
Manufacturer: Unknown (00h), model: C8h, size: 131072 bytes.
列出所有的FEL设备
$ ./sunxi-fel.exe -l
USB device 001:006 Allwinner F1C100s
显示BROM信息
这是F1C100S里面的信息
$ ./sunxi-fel.exe ver
AWUSBFEX soc=00001663(F1C100s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
烧写程序到内存
这种方式,板子重启程序就没了。
将程序写到内存中并运行。
有好几中方法
./sunxi-fel.exe uboot ./uboot-with-spl-usb.bin
这里运行uboot对应的bin之后,进入uboot模式,然后就可以执行对应的uboot命令了。
烧写程序到flash
这种方式,板子重启之后程序还在。
./sunxi-fel.exe -p spiflash-write 0x0 "u-boot-sunxi-with-spl.bin"
./sunxi-fel.exe -p spiflash-write 0x6000 "spl-separated.bin"
./sunxi-fel.exe -p spiflash-write 0x400000 "logo.bin"
解释:-p 是为了显示程序进度
0x0 是程序写入的地址
正常情况下写一个bin就好了,有的情况会写两个。写到0地址的负责引导,写到其他地址的是实际的程序。
全部命令
补充:
sunxi-fel.exe [options] command arguments... [command...]-h, --help Print this usage summary and exit-v, --verbose Verbose logging-p, --progress "write" transfers show a progress bar-l, --list Enumerate all (USB) FEL devices and exit-d, --dev bus:devnum Use specific USB bus and device number--sid SID Select device by SID key (exact match)spl file Load and execute U-Boot SPLIf file additionally contains a main U-Boot binary(u-boot-sunxi-with-spl.bin), this command also transfers thatto memory (default address from image), but won't execute it.uboot file-with-spl like "spl", but actually starts U-BootU-Boot execution will take place when the fel utility exits.This allows combining "uboot" with further "write" commands(to transfer other files needed for the boot).hex[dump] address length Dumps memory region in hexdump address length Binary memory dumpexe[cute] address Call function addressreset64 address RMR request for AArch64 warm bootmemmove dest source size Copy <size> bytes within device memoryreadl address Read 32-bit value from device memorywritel address value Write 32-bit value to device memoryread address length file Write memory contents into filewrite address file Store file contents into memorywrite-with-progress addr file "write" with progress barwrite-with-gauge addr file Output progress for "dialog --gauge"write-with-xgauge addr file Extended gauge output (updates prompt)multi[write] # addr file ... "write-with-progress" multiple files,sharing a common progress statusmulti[write]-with-gauge ... like their "write-with-*" counterpart,multi[write]-with-xgauge ... but following the 'multi' syntax:<#> addr file [addr file [...]]echo-gauge "some text" Update prompt/caption for gauge outputver[sion] Show BROM versionsid Retrieve and output 128-bit SID keyclear address length Clear memoryfill address length value Fill memoryspiflash-info Retrieves basic informationspiflash-read addr length file Write SPI flash contents into filespiflash-write addr file Store file contents into SPI flash
这篇关于sunxi-fel 的相关命令的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!