This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM62A7:执行 DFU 命令时出现问题

Guru**** 2388540 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1500071/am62a7-something-wrong-when-execute-dfu-command

器件型号:AM62A7

工具/软件:

您好、TI 专家、、通过 DFU 刷写到 eMMC 时遇到问题。

我的操作如下

1:参考文档

https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_01_00/exports/docs/linux/Foundational_Components /Tools/Flash_via_DFU.html

2:SDK 版本

TI-PROCESSOR-SDK-LINUX-edgeai-am62a-EVM-10-01_00_05

3.下载必要的软件

Git 克隆 https://git.ti.com/git/processor-sdk/uboot-flash-writer.git

Git 签出主机

sudo apt-get install dfu-util

该文档说 SDK 路径下应该有一个 dfu_flash 文件夹、但它不存在、因此我将该文件夹从 uboot-flash-writer 路径复制到 SDK 路径

将目录/home/lihao/uboot-flash-writer/tools/DFU_flash 复制/home/lihao/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/bin

添加位于/home/lihao/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/board-support/ti-u-boot-2024.04 + git/configs/am62ax_evm_a53_defconfig 的代码

CONFIG_BOOTCOMMAND="setenv dfu_alt_info_flashenv uEnv.txt ram 0x82000000 0x10000000;setenv dfu_alt_info ${dfu_alt_info_flashenv};env 0 ram 0;env import -t ${loadaddr}$filesize;运行 user_commands;"

CONFIG_ENV_IS_LOS=y

CONFIG_ENV_IS_IN_MMC=y

CONFIG_BOOTDELAY=0

6.更改 SDK 的 Rules.make

UBOOT_MACHINE_R5=am62ax_evm_r5_defconfig am62x_r5_usbdfu.config

7.我想先将系统刷写到 eMMC、因此跳过了生成二进制文件的过程、使用了默认的二进制文件

跳过 make u-boot_clean、make u-boot

现在、输入路径/home/lihao/uboot-flash-writer/tools/DFU_flash

将默认的 tiboot3.bin、tispl.bin 和 u-boot.img 复制到指定的路径

/home/lihao/uboot-flash-writer/tools/DFU_flash/bin/am62axx-evm/gp/flash-files.cfg

运行命令 python3 dfu_flash.py -d am62axx-EVM -t gp -c bin/am62axx-evm/gp/flash-files.cfg

终端输出如下所示

lihao@lihao-B460MAORUSPRO:~/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/bin/dfu_flash$ python3 dfu_flash.py -d am62axx-evm -t gp -c bin/am62axx-evm/gp/flash-files.cfg

2025年04月10日20:57:53 INFO:启动刷写工具

2025年04月10日20:57:53信息:刷写前验证要求...

2025年04月10日20:57:53信息:验证了 CLI 参数和 DFU 引导二进制文件的路径

2025年04月10日20:57:53 INFO:解析闪存配置文件{bin/am62axx-evm/gp/flash-files.cfg}。

2025年04月10日20:57:53信息:找到3个闪存映像

<<DFU_FLASH_CONF

----- ---------------------------------------- ----- ----- ----- -----

Alt 路径大小偏移介质属性

----- ---------------------------------------- ----- ----- ----- -----

tiboot3 bin/am62axx-EVM/gp/images/tiboot3.bin 354558 0x0 EMMC RAW、1、-

tispl bin/am62axx-evm/gp/images/tispl.bin 1207728 0x80000 EMMC RAW、1、-

u-boot bin/am62axx-evm/gp/images/u-boot.img 1012196 0x280000 EMMC RAW、1、-

----- ---------------------------------------- ----- ----- ----- -----

DFU_FLASH_CONF

2025年04月10日20:57:53信息:找到4个引导映像

<<DFU_BOOT_CONF

----- ------------------------------------------------------------------------------------------------------------ -----

Alt 路径大小

----- ------------------------------------------------------------------------------------------------------------ -----

Bootloader /home/lihao/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/bin/DFU_flash/bin/am62axx-evm/gp/tiboot3.bin 354558

tispl.bin /home/lihao/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/bin/DFU_flash/bin/am62axx-evm/gp/tispl.bin 1207728

u-boot.img /home/lihao/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/bin/DFU_flash/bin/am62axx-evm/gp/u-boot.img 1012196

uEnv.txt /home/lihao/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/bin/DFU_flash/bin/am62axx-evm/gp/uEnv.txt 147.

----- ------------------------------------------------------------------------------------------------------------ -----

DFU_BOOT_CONF

9、它停在这里,我不知道出了什么问题

开发板的开关状态如下、我连接了三根 USB 电缆:电源线、连接到 PC 的 UART、以及另一根连接到 PC 的数据线

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Meng Ke、

    Unknown 说:
    跳过 make u-boot_clean、make u-boot

    在更改 Rules.make 以进行 DFU 引导后、您需要重新编译 u-boot。

    您可以保留2组映像、一组用于 DFU-boot、另一组用于刷写到 eMMC、请参阅: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1127618/faq-sk-am62-how-to-flash-emmc-using-usb-dfu-on-am62x-sk-e2

    此致、

    会面。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的会议:

    感谢您的建议,

    我成功地传输了第一 组和第二组图像。

    最后,我创建.ext4文件并 传输它.

    但终端会变得坏和提示:

    lihao@lihao-B460MAORUSPRO:~/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/filesystemsudo dfu-util -a rootfs -D tisdk-tiny.ext4
    dfu-util 0.9

    版权所有2005-2009 Weston Schmidt、Harald Welte 和 OpenMoko Inc.
    版权所有2010-2016 Tormod Volden 和 Stefan Schmidt
    此程序是免费软件、完全没有保修
    请向 sourceforge.net/.../报告错误

    dfu-util:DFU 后缀签名无效
    dfu-util:未来的 dfu-util 版本中将需要有效的 DFU 后缀!!!
    正在打开支持 DFU 的 USB 设备...
    ID 0451:6165
    运行时器件 DFU 版本0110
    正在申请 USB DFU 接口...
    正在设置备用设置#1...
    确定器件状态:STATE = dfuIDLE、STATUS = 0
    dfuIDLE、继续
    DFU 模式器件 DFU 版本0110
    器件返回的传输大小4096
    将数据从 PC 复制到 DFU 器件
    下载[=] 4% 15147008字节失败!
    State (10)= dfuERROR、status (14)=出错了、但器件不知道发生了什么

    我问 AI​​,它告诉我, DFU 不适合传输较大的文件?

    我的.ext4文件: tisdk-edgeai.ext4(8.6G) tisdk-tiny.ext4(314M)

    两者都无法传输

    此致、

    Meng。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    、我将 dfu-util 更新为 v0.11、

     setenv dfu_alt_info "rootfs 部分0 2"、足够大。
    它是有效的!

    再次感谢您的建议!

    此致、

    Meng。