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.

[参考译文] TMS320F2800157:是否可以实现 LFU(实时固件更新)?

Guru**** 2524550 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1546717/tms320f2800157-is-lfu-live-firmware-update-possible

器件型号:TMS320F2800157


工具/软件:

您好!

我与链接到此主题的论坛有相同的问题。


有 针对 F28003x/4x 的 LFU 演示设计 (https://www.ti.com/tool/TIDM-02011)、但可以在 F280015x 电路板上实现吗?  
我想使用它来实现 F2800157。


您能否为两种用例提供答案(有和没有器件复位,如果两者都可以)?

(当问题在另一个论坛上得到回答时,他们收到了一封解决方案的电子邮件,这就是为什么我再次询问该问题,道歉)

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

    有关详细信息、请参阅此处。

    e2e.ti.com/.../faq-faq-on-live-firmware-update-lfu-and-firmware-over-the-air-fota-for-ti-c2000-mcus

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

    大家好、感谢提供的指导、因此我看到、最好遵循一个示例、即使用为 f28002x 版本提供的 LFU 单组演示。 那么、为了澄清一下、id 要使其在  F280015x 上工作、唯一需要更改的 是引脚/LED 的配置吗?

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

    Zara、

    您将需要使用 F280015x SCI 闪存内核 — 创建其闪存构建配置,然后从 F28002x 实现复制 LFU 功能。

    然后是、您还需要处理硬件更改。

    谢谢、

    Sira

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

    您好、

    我刷写了 SCI 生成程序、获取了 build config .txt 文件、并将其用在串行编程器中、就像示例所说的那样。 但每次我运行串行编程器的 kernal 它卡在 kernal 下载的开始。 它甚至不会出现错误代码或任何卡滞的内容、就好像它仍在加载、并且不允许输入到终端。 有什么想法,为什么?

    它的屏幕截图。 我尝试运行命令没有应用程序“-A"命令“命令,以及看看 它是不加载或应用程序,但它也是错误的方式,所以我假设它的 kernal 因为它只是不能完成 下载.

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

    Zara、

    如果您将 SCI 内核刷写到 MCU、这意味着闪存的前几个扇区包含内核。 现在,您想使用该内核和主机编程器对应用程序进行编程 — 为此,闪存 API 库和一些特定的内核函数(如 F28002x 示例中所示)需要从 RAM 运行。 我希望您已正确整合所有这些功能。  

    假设您有,那么您可以继续 — 现在设置应为闪存引导模式(我相信您正在使用该模式)、您需要使用 serial_flash_programr_appln.exe(而不是 serial_flash_programmer.exe)。serial_flash_programr.exe 将尝试下载闪存内核并将其编程到此器件。 您已完成此操作!

    谢谢、

    Sira

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

    你好,感谢澄清,自述文件说使用  serial_flash_programr.exe 文件的程序,所以我没有意识到! 我重新刷新了 SCI kernal 重新启动过程,并运行正确的.exe 程序,因为你已经指示,它允许我选择我想要选择的操作,我选择了 DFU ,它开始安装应用程序,但当它完成了错误,我不知道错误意味着什么。 IVE 尝试重试几次、此时会弹出相同的错误。  



    我非常确定 0x8eff0 是存储体 0 应用根据链接器文件启动的位地址、以及源文件中提供的信息中描述的内容。 显示链接器文件的屏幕截图



    我尝试了在闪存 API 文档中查找错误代码、但一直找不到任何内容。   不过、我在串行闪存编程文档中找到了这一点。



    不确定这对我的案例意味着什么、因为我尚未在项目中编辑任何内容、但 FMSTAT 寄存器确实在错误返回中显示了其内容、因此这可能意味着存在问题? 您认为此错误的原因可能是什么?

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

    Zara、

    您需要对目标 MCU 进行一些调试、以找出根本原因。

    一些指针:

    1.检查闪存(“View"->"Memory")“)以“ 以查看“查看闪存内核是否存在于闪存中(看起来像这样,因为您能够发送命令来对应用程序进行编程,实际上会执行一些操作)

    2.检查闪存以查看应用程序是否已编程到闪存中应位于的位置(如链接器文件中指定)。

    我重复 — 强调-我的消息从以前,这是,我期望 闪存的前几个扇区包含内核。 我期望闪存 API 库和一些特定的内核函数(如 F28002x 示例中所示)从 RAM 运行。 我希望您已正确整合所有这些功能。  

    3.检查反汇编以查看 0x8eff0 处的内容。

    4.在 0x8eff0 处放置一个断点(您可以通过打开“Disassembly"视“视图视图并双击地址左侧来在该处设置断点)。

    查看执行是否在对应用进行编程后到达该断点。 如果是、它会做什么。 如果没有,它将在哪里 — 您可能需要提前放置断点(可能在内核中)来跟踪执行情况。

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

    尊敬的 Sira:

    感谢您的指导。 我使用您所说的内容进行了一堆调试、发现 lfu_singlebank 工程中的闪存 API 目录指向 f28002x 库、因此、将其更改为 f20015x 后、它能够成功上传应用程序。 但我现在有一个问题。 我让应用程序上传并执行运行命令、但 LED 指示灯没有发生任何变化。 我确保 GPIO 引脚指向适合我的特定电路板及所有内容的引脚。 演示应用程序是否是为刷写 LED 而构建的? 或者、它应该会发生其他情况来触发 LED、因为在源文件中这是它所说的应该发生的情况。


     

    Keep the terminal open until the file is done
    //!        being loaded to the device, indicated by an "Application load successful!" message.
    //!        Once the program is done loading, the bank 1 build configuration of the example
    //!        will be running on the device.
    //!     7. Exit the terminal and edit the command line arguments of the Serial Flash
    //!        Programmer's debug properties so that it contains the path to the hex formatted
    //!        file for the bank 0 build configuration of this example.
    //!     8. Run the Serial Flash Programmer again in order to perform an autobaud lock
    //!        and view the menu in the terminal. LED2 should be blinking to indicate
    //!        that code is running on bank 1.
     

    因此、如果它说要再次运行程序、那么在我首次使用串行程序初始化后、它如何运行命令并通过 SCI 连接、这没有问题、但当我退出程序时、它不再连接到串行端口、并卡在“调整端口设置“处、直到我再次将内核刷写到 MCU 上。 它应该像这样工作,还是在上传应用程序后切断 SCI 连接?  


    也在源文件中它描述了使用组 0 和组 1、但在这种情况下、只有使用组 0 的可能性、因为我使用单个组设备权限? 对不起,如果问题听起来混乱让我知道,如果你理解我的意思,感谢所有的帮助到目前为止! ILL 将以下保留源文件指令描述的内容以提供完整的上下文。

    //#############################################################################
    //
    // FILE:   lfu_singlebank.c
    //
    // TITLE:  Live Firmware Update Example - Single Flash Bank
    //
    //! \addtogroup driver_example_list
    //! <h1> Live Firmware Update Example </h1>
    //!
    //! This example demonstrates how to perform a live firmware update with use
    //! of the Live Device Firmware Update (Live DFU or LDFU) command; it is to
    //! be used with the Serial Flash Programmer as well as the SCI Flash Kernel.
    //!
    //! In the example, an SCI autobaud lock is performed and the byte used for autobaud
    //! lock is echoed back. Two interrupts are initialized and enabled: SCI Rx FIFO
    //! interrupt and CPU Timer 0 interrupt. The CPU Timer 0 interrupt occurs every 1
    //! second; the interrupt service routine (ISR) for CPU Timer 0 toggles an LED
    //! based on the build configuration that is running. LED1 is toggled for the
    //! BANK0_FLASH build configuration and LED2 is toggled for the
    //! BANK1_FLASH and configuration. The SCI Rx FIFO interrupt is set
    //! for a FIFO interrupt level of 10 bytes. The number of bytes in a packet from the
    //! Serial Flash Programmer (when using the LDFU command) is 10. When a command is
    //! sent to the device from the Serial Flash Programmer, the SCI Rx FIFO ISR receives
    //! a command from the 10 byte packet in the FIFO. If the command matches the Live
    //! Device Firmware Update (Live DFU) command, then the code branches to the Live DFU
    //! function located inside of the SCI Flash Kernel for the corresponding bank.
    //!
    //! The project contains the following build configuration:
    //!     - BANK0_FLASH: Links the program sections to the appropriate locations
    //!                    in Bank 0 of flash and uses the Flash API library that
    //!                    links the Flash API functions to flash. The 'codestart'
    //!                    section is linked to the alternative flash entry point
    //!                    for Bank 0 (0x8EFF0) and the rest of the sections are
    //!                    linked to 0x082008 or above. Bank 0 configurations of
    //!                    the flash kernel reserve sector 0, sector 1, and the
    //!                    first 128 bits of sector 2 of Bank 0; therefore, sections
    //!                    must be linked to 0x082008 or higher. After building the
    //!                    configuration, the C2000 Hex Utility will output the
    //!                    program in the appropriate SCI boot hex format for the
    //!                    flash kernel and serial flash programmer in a file named
    //!                    'flashapi_ex2_liveFirmwareUpdateBANK0FLASH.txt'.
    //!
    //!
    //! To use the example, make sure line 867 is commented in the Serial Flash Programmer 
    //! project in order to be able to load the kernel through CCS. Configure the device to boot to
    //! flash at 0x80000 and follow the steps below:
    //!     1. Place the output files of the C2000 Hex Utility tool for
    //!        the build configurations to be used (one for each bank) in the 'hex' directory
    //!        of the Serial Flash Programmer project.
    //!     2. Load LDFU build configurations of the SCI Flash Kernel (one for each bank)
    //!        to flash through CCS. If a debug session is launched in order to load a build
    //!        configuration of the flash kernel to flash, go to Tools -> On-Chip Flash -> Erase Settings
    //!        in order to ensure that 'Necessary Sectors Only (for Program Load)' is selected.
    //!        This allows only the sectors where the flash kernel is linked to be erased when it is loaded.
    //!        If 'Entire Flash' was selected, ensure that both build configurations are in flash.
    //!     3. Run the bank 0 build configuration of the flash kernel in CCS, ensuring that the bank 1 build
    //!        configuration is not erased.
    //!     4. In the Serial Flash Programmer project, make sure the command arguments of
    //!        the debug properties (Debug -> serial_flash_programmer Properties -> Debugging -> Command Arguments)
    //!        contains the path to the hex formatted file of the bank 1 configuration of this
    //!        example. Refer to the 'README.txt' file in the Serial Flash Programmer project to understand
    //!        the command arguments of the debug properties. Verify that the correct COM port is selected.
    //!     5. Run the Serial Flash Programmer project. A menu should appear inside a terminal.
    //!     6. In the terminal, enter '8' to send the Live DFU command. The bank 1 build
    //!        configuration of the example will start loading to the device and each byte that
    //!        is sent will show in the terminal. Keep the terminal open until the file is done
    //!        being loaded to the device, indicated by an "Application load successful!" message.
    //!        Once the program is done loading, the bank 1 build configuration of the example
    //!        will be running on the device.
    //!     7. Exit the terminal and edit the command line arguments of the Serial Flash
    //!        Programmer's debug properties so that it contains the path to the hex formatted
    //!        file for the bank 0 build configuration of this example.
    //!     8. Run the Serial Flash Programmer again in order to perform an autobaud lock
    //!        and view the menu in the terminal. LED2 should be blinking to indicate
    //!        that code is running on bank 1.
    //!     8. Enter '8' in the terminal to send the Live DFU command to the device. The bank 0
    //!        build configuration of the example will start loading to the device. Again, each
    //!        byte that is sent will be shown in the terminal; the end of the loading is marked
    //!        by an "Application load successful!" message. When the program is done loading,
    //!        the bank 0 build configuration of this example should be running on the device.
    //!     9. Exit the terminal and edit the command arguments of Serial Flash Programmer's
    //!        debug properties so that it includes the path to the hex formatted file of the
    //!        bank 1 configuration of this example.
    //!    10. Run the Serial Flash Programmer to perform an autobaud lock and view the menu. LED1
    //!        should be blinking to indicate that code is running on bank 0.
    //!    11. Restart from step 6.
    //!
    //! If BANK1_FLASH and BANK0_FLASH build configurations are used for the example, then the
    //! corresponding build configurations of the flash kernel must be loaded to flash: BANK1_LDFU
    //! and BANK0_LDFU respectively. 
    //!
    //! \b External \b Connections \n
    //!  - Connect GPIO28 (SCI Rx) and GPIO29 (SCI Tx) to a COM port of the computer
    //!    running the Serial Flash Programmer project

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

    尊敬的 Zara:

    可能不遵循源文件中的注释。 它们可能不完全是最新的。

    若要使 LED 闪烁、您应该让一个 ISR 在 ISR 根据一个计时器频率(可能设置为 100 或 200kHz)运行时递减计数器。 您是否有这样的 ISR、如果有、它是否运行?