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: Something wrong when execute DFU command

Part Number: AM62A7

Tool/software:

Hi TI Experts,I get something wrong when flash to eMMC by DFU.

My operation is as follows

1:Reference Documentation

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 Ver

ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05

3.Download necessary software

git clone https://git.ti.com/git/processor-sdk/uboot-flash-writer.git

git checkout master

sudo apt-get install dfu-util

4.The document says that there should be a DFU_flash folder under the SDK path, but it doesn't exist, so I copied the folder from the uboot-flash-writer path to the SDK path

copy dir /home/lihao/uboot-flash-writer/tools/DFU_flash to /home/lihao/ti-processor-sdk-linux-edgeai-am62a-evm-10_01_00_05/bin

5.add code at /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}; dfu 0 ram 0; env import -t ${loadaddr} $filesize; run user_commands;"

CONFIG_ENV_IS_NOWHERE=y

CONFIG_ENV_IS_IN_MMC=y

CONFIG_BOOTDELAY=0

6.Change in Rules.make of SDK

UBOOT_MACHINE_R5=am62ax_evm_r5_defconfig am62x_r5_usbdfu.config

7.I want to flash the system to eMMC first, so I skipped the process of generating binary files and used the default binary files

Skip make u-boot_clean, make u-boot

Now enter the path /home/lihao/uboot-flash-writer/tools/DFU_flash

Copy the default tiboot3.bin, tispl.bin, and u-boot.img to the path specified by

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

8.Run the command python3 dfu_flash.py -d am62axx-evm -t gp -c bin/am62axx-evm/gp/flash-files.cfg

The terminal output is as follows

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: Starting the flashing tool

2025-04-10 20:57:53 INFO: Validating the requirements before flashing...

2025-04-10 20:57:53 INFO: Validated the CLI arguments and the paths to the DFU boot binaries

2025-04-10 20:57:53 INFO: Parsing the flash configuration file {bin/am62axx-evm/gp/flash-files.cfg}...

2025-04-10 20:57:53 INFO: Found 3 flash images

<<DFU_FLASH_CONF

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

Alt Path Size Offset Media Attributes

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

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 INFO: Found 4 boot images

<<DFU_BOOT_CONF

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

Alt Path Size

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

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.It stops here, I don't know what went wrong

The switch status of the development board is as follows, I connected three USB cables: power cable, UART connected to PC, and another data cable connected to PC

  • Hi Meng Ke,

    Skip make u-boot_clean, make u-boot

    You need to rebuild u-boot after changing the Rules.make for DFU boot.

    You can keep 2 sets of images, one for DFU-boot and one for flashing to eMMC, please refer to this: 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

    Best Regards,

    Meet.

  • Hi Meet ,

    Thanks for your suggest,

    I have success transfer first and second set of images.

    Finally,I create .ext4 file and transfer it .

    But terminal get bad and hint :

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

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 0451:6165
    Run-time device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Setting #1 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download [= ] 4% 15147008 bytes failed!
    state(10) = dfuERROR, status(14) = Something went wrong, but the device does not know what it was

    I asked the AI ​​and it told me that DFU is not suitable for transferring larger files?

    my .ext4 files : tisdk-edgeai.ext4(8.6G) tisdk-tiny.ext4(314M)

    Both failed to transfer

    Best Regards,

    Meng.

  • OK,I update dfu-util to v0.11,

    and setenv dfu_alt_info "rootfs part 0 2",it's big enough.
    It works!

    Thank you for your suggest again !

    Best Regards,

    Meng.