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.

[参考译文] TMDS243EVM:在 Ubuntu 系统上通过 USB (usb_bootloader.py)对 TMDS243EVM 进行编程挂起

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1392358/tmds243evm-program-tmds243evm-via-usb-usb_bootloader-py-on-ubuntu-system-is-hangs

器件型号:TMDS243EVM
主题中讨论的其他器件: UNIFLASH

工具与软件:

我正在尝试 使用运行 Ubuntu 24.04 LTS 的 Raspberry Pi 通过 USB 对 TMDS243EVM 板进行编程。

我已安装 dfu-util 已安装并正常工作。

引导模式开关按如下方式进行设置。

某 同事使用过 usb_bootloader.py 使用一个简单的 hello world 示例在 Windows 系统上成功对 EMV 进行编程、但它正在 等待我。

我使用的映像文件和参数与她在 Windows 系统上使用的相同。 我尚未在 Raspberry Pi 上安装 CCS、但已复制整个 CCS  ~/ti/mcu_plus_sdk_am243x_09_01_00_41/tools/boot 与 Pi 和 hello word 图像相关联。

  

看起来编程是从加载开始的  sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage 但在无法枚举 DFU 后失败。  除非我对 EVM 进行下电上电、否则它会无限期地挂起。

在本例中、我会运行脚本、当脚本挂起"等待枚举 DFU 器件..."时。 我重新启动 EVM、然后继续并完成示例编程会话:

pi@rpi3-desktop-Ubuntu24:~/ccs12-sdk9.01.00.41-tools$ sudo python3 usb_bootloader.py -b sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage -i 0 -f hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs
----------------------------------------------------------------
Sending the SBL DFU bootloader sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage ...
----------------------------------------------------------------------------
Executing DFU command with alt_setting=0 interface=0 transfer_size=512
----------------------------------------------------------------------------
dfu-util 0.11

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

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 512
Warning: Overriding device-reported transfer size
Copying data from PC to DFU device
Download	[=========================] 100%       363845 bytes
Download done.
DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
----------------------------------------------------------------
Sent bootloader sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage of size 363845 bytes in 1.9s.
----------------------------------------------------------------

----------------------------------------------------------------
Sending the application hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs ...
------------------------------------------------------
Waiting for DFU device to be enumerated ....
------------------------------------------------------
------------------------------------------------------
Waiting for DFU device to be enumerated ....
------------------------------------------------------
------------------------------------------------------
Waiting for DFU device to be enumerated ....
------------------------------------------------------
------------------------------------------------------
Waiting for DFU device to be enumerated ....
------------------------------------------------------
------------------------------------------------------
Waiting for DFU device to be enumerated ....
------------------------------------------------------
------------------------------------------------------
Waiting for DFU device to be enumerated ....
------------------------------------------------------
----------------------------------------------------------------------------
Executing DFU command with alt_setting=0 interface=0 transfer_size=512
----------------------------------------------------------------------------
dfu-util 0.11

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

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 512
Warning: Overriding device-reported transfer size
Copying data from PC to DFU device
Download	[=========================] 100%        40298 bytes
Download done.
DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
----------------------------------------------------------------
Sent application hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs of size 40298 bytes in 1.25s.
----------------------------------------------------------------
pi@rpi3-desktop-Ubuntu24:~/ccs12-sdk9.01.00.41-tools$ 

我正在尝试设置一个能够用于我们的目标板(通过 USB 连接的 AM243x)的自动编程工具。 重启 MID 脚本是一个问题。  自动进行下电上电可能会成为一个问题。

我想获得一些有关 API 的清晰说明  usb_bootloader.py 和  usb_dfu_uniflash.py 如果这样可以更好地达到我的目的、但我找不到任何这些工具的文档。

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

    您好!

    `了` USB_bootloader.py `和` USB_DFU_uniflash.py 的用法

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/09_02_00_50/exports/docs/api_guide_am243x/TOOLS_BOOT.html#USB_BOOTLOADER

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/09_02_00_50/exports/docs/api_guide_am243x/TOOLS_FLASH.html#TOOLS_FLASH_DFU_UNIFLASH

    简而言之、

    • usb_bootloader.py =>此脚本旨在与 SBL_DFU 一同使用、以直接通过 USB DFU 引导应用程序映像。
    • usb_dfu_uniflash.py =>此脚本旨在与 SBL_DFU_UNIFLASH 配合使用、以定义的偏移量将不同的内容刷写到 OSPI 中。

    此致、

    Prashant

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

    我需要了解在运行上述示例时为什么必须对 EVM 进行下电上电 usb_bootloader.py 执行这些操作、但不需要在 Windows 系统中执行该操作。

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

    您好!

    我需要了解运行上述示例时为什么必须对 EVM 进行下电上电 usb_bootloader.py 从我的 Linux 系统、但不需要在 Windows 系统上执行此操作。[/QUOT]

    您能否捕获并共享两个案例的日志?

    此致、

    Prashant

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

    不带循环通电的 Windows 系统:

    Hong@honzhzha-97VT0T3 MINGW64 /c/ti/mcu_plus_sdk_am243x_09_00_00_35/tools/boot
    $ python usb_bootloader.py -b sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage -i 0 -f sbl_prebuilt/hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs
    dfu-util 0.11Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../Opening DFU capable USB device...
    Device ID 0451:6165
    Device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Interface #0 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 0110
    Device returned transfer size 512
    Warning: Overriding device-reported transfer size
    Copying data from PC to DFU device
    Download        [=========================] 100%       317357 bytes
    Download done.
    DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    Warning: Invalid DFU suffix signature
    A valid DFU suffix will be required in a future dfu-util release
    dfu-util 0.11Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../Opening DFU capable USB device...
    Device ID 0451:6164
    Device DFU version 0101
    Claiming USB DFU Interface...
    Setting Alternate Interface #0 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 0101
    Device returned transfer size 512
    Warning: Overriding device-reported transfer size
    Copying data from PC to DFU device
    Download        [=========================] 100%        40298 bytes
    Download done.
    DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    Warning: Invalid DFU suffix signature
    A valid DFU suffix will be required in a future dfu-util release
    ----------------------------------------------------------------
    Sending the SBL DFU bootloader sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage ...
    ----------------------------------------------------------------------------
    Executing DFU command with alt_setting=0 interface=0 transfer_size=512
    ----------------------------------------------------------------------------
    ----------------------------------------------------------------
    Sent bootloader sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage of size 317357 bytes in 1.87s.
    --------------------------------------------------------------------------------------------------------------------------------
    Sending the application sbl_prebuilt/hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs ...
    ------------------------------------------------------
    Waiting for DFU device to be enumerated ....
    ------------------------------------------------------
    ----------------------------------------------------------------------------
    Executing DFU command with alt_setting=0 interface=0 transfer_size=512
    ----------------------------------------------------------------------------
    ----------------------------------------------------------------
    Sent application sbl_prebuilt/hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs of size 40298 bytes in 2.61s.
    ----------------------------------------------------------------

    Oracle Linux 8系统需要下电上电:

    (p3env) pi@pi4:~/ccs12-sdk9.01.00.41-tools-boot $ sudo python3 usb_bootloader.py -b sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage -i 0 -f hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs
    ----------------------------------------------------------------
    Sending the SBL DFU bootloader sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage ...
    ----------------------------------------------------------------------------
    Executing DFU command with alt_setting=0 interface=0 transfer_size=512
    ----------------------------------------------------------------------------
    dfu-util 0.11
    
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../
    
    dfu-util: Warning: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release
    Opening DFU capable USB device...
    Device ID 0451:6165
    Device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Interface #0 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 0110
    Device returned transfer size 512
    Warning: Overriding device-reported transfer size
    Copying data from PC to DFU device
    Download	[=========================] 100%       363845 bytes
    Download done.
    DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    ----------------------------------------------------------------
    Sent bootloader sbl_prebuilt/am243x-evm/sbl_dfu.debug.hs_fs.tiimage of size 363845 bytes in 1.43s.
    ----------------------------------------------------------------
    
    ----------------------------------------------------------------
    Sending the application hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs ...
    ------------------------------------------------------
    Waiting for DFU device to be enumerated ....
    ------------------------------------------------------
    ------------------------------------------------------
    Waiting for DFU device to be enumerated ....
    ------------------------------------------------------
    ------------------------------------------------------
    Waiting for DFU device to be enumerated ....
    ------------------------------------------------------
    ...

    脚本将无限期等待  

    下电上电后:

    ------------------------------------------------------
    Waiting for DFU device to be enumerated ....
    ------------------------------------------------------
    ----------------------------------------------------------------------------
    Executing DFU command with alt_setting=0 interface=0 transfer_size=512
    ----------------------------------------------------------------------------
    dfu-util 0.11
    
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../
    
    dfu-util: Warning: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release
    Opening DFU capable USB device...
    Device ID 0451:6165
    Device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Interface #0 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 0110
    Device returned transfer size 512
    Warning: Overriding device-reported transfer size
    Copying data from PC to DFU device
    Download [=========================] 100% 40298 bytes
    Download done.
    DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    ----------------------------------------------------------------
    Sent application hello_world_am243x-evm_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs of size 40298 bytes in 1.07s.
    ----------------------------------------------------------------

    是否存在除捕获我可以共享的控制台之外的其他日志?

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

    我看到的问题似乎与 SDK 版本有关。  如果我使用9.01.00.41、则需要 MID 脚本才能进行下电上电。  如果我使用 SDK 9.00.00.35、则无需进行下电上电。

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

    您好!

    我看到的问题似乎与 SDK 的版本有关。

    我从 SDK v09_01_00_41中解决了 SBL_DFU 问题、但在 SDK v09_00_00_35中不解决了这个问题。 这似乎在不同版本之间发生了一些改变、这些版本破坏了功能。 我将创建一个内部错误票证。

    BTW、下电上电不会解决 SDK v09_01_00_41出现的任何问题。 只是"usb_bootloader.py"没有按预期执行。

    如前所述、"usb_bootloader.py"脚本用于通过 USB DFU 引导应用程序映像。 如果脚本成功结束、则 SBL_DFU 和应用程序应该记录在 UART0端口(如果已连接)上。

    您将在  SDK v09_00_00_35下看到这些日志、但在 SDK v09_01_00_41下不会看到这些日志(即使脚本已成功结束)。

    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-1 is initialized to 800000000 Hz !!!
    [BOOTLOADER_PROFILE] Boot Media       : USB DFU
    [BOOTLOADER_PROFILE] Boot Image Size  : 0 KB
    [BOOTLOADER_PROFILE] Cores present    :
    r5f0-0
    r5f0-1
    [BOOTLOADER PROFILE] CPU load                         :      79452us
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :      79452us
    
    Image loading done, switching to application ...
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...
    
    Hello World!

    此致、

    Prashant