当前位置: 首页 > news >正文

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

http://www.mrgr.cn/news/21585.html

相关文章:

  • 文本分类场景下微调BERT
  • 类和对象的概述以及this指针的应用
  • Python基础—Python 中pip的8个必备命令
  • 力扣最热一百题——最大子数组和
  • 最新版 | 深入剖析SpringBoot3源码——分析自动装配原理(面试常考)
  • 超级 密码加密 解密 源码,支持表情,符号,数字,字母,加密
  • SpringBoot登录退出|苍穹外卖登录退出分析
  • yolov8 pt转onnx
  • Java并发:互斥锁,读写锁,Condition,StampedLock
  • 26 线性表 · 顺序表
  • 146. LRU 缓存
  • 11.2.软件系统分析与设计-数据库分析与设计
  • Rust使用之【宏】
  • C# 如何同时Ping多个IP地址
  • STM32 - 笔记4
  • 部落冲突:精通五个流派,部落战传奇杯横着走,但前提是能精通!
  • 最新厦门新能安社招入职Verify测评笔试攻略敬请查收SHL
  • 多机编队—(1)ubuntu 配置Fast_Planner
  • AXI4总线详解
  • Python的math库——常用数学函数全解析