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.

[参考译文] UNIFLASH:使用独立命令行的闪存 CC2340R5

Guru**** 2553260 points
Other Parts Discussed in Thread: CC2340R5, UNIFLASH

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1340015/uniflash-flash-cc2340r5-using-standalone-command-line

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

您好!

对于某些项目、需要使用 CC2340R5芯片刷写器件。 将 Uniflash GUI 与 Launchpad XDS110S 配合使用时工作正常、我能够刷写.hex 文件。

但我需要通过命令行进行刷写、以便从 Uniflash 的"Standalone Command Line"字段生成包、并运行脚本"one_time_setup.bat"。

对于已使用 Uniflash GUI 刷写的器件、以下命令也可以正常使用:"./dslite-Cortex_M0P.bat --config=./user_files/configs/cc2340r5.ccxml --flash ./user_files/image/ --详细

我首先要指出的是、默认命令"./dslite-Cortex_M0P.bat"会返回以下错误:

error: Cortex_M0P: File Loader: Verification failed: Values at address 0x4E02000C do not match Please verify target memory and memory map.
        Finished: 99%
Failed: File: user_files/images/pf2_superhex_v1.8.1.hex: a data verification error occurred, file load failed.

第二点是、我无法使用命令行刷写新器件(尚未编程)。 它将返回以下错误:

DSLite version 12.5.888.714
Configuring Debugger (may take a few minutes on first launch)...
        Initializing Register Database...
        Initializing: CS_DAP_0
        Executing Startup Scripts: CS_DAP_0
        Initializing: Cortex_M0P
        Executing Startup Scripts: Cortex_M0P
        Initializing: SEC_AP
        Executing Startup Scripts: SEC_AP
info: Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.10.24
Connecting...
info: Cortex_M0P: Debugging is not allowed. If this is not expected, check your CCFG.
info: Cortex_M0P:     If you are experiencing issues with loading your application, do the following (this will erase the chip):
info: Cortex_M0P:      - Code Composer Studio:
info: Cortex_M0P:        - End the current debug session (if any is active).
info: Cortex_M0P:        - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration.
info: Cortex_M0P:        - Right click on the 'Debug Probe/Cortex_M0P' and select 'Show all cores'.
info: Cortex_M0P:        - Select the 'Debug Probe/CS_DAP0' item after expanding the 'Non Debuggable Devices' item.
info: Cortex_M0P:        - Scripts -> CC23xx -> ChipErase  to start Chip erase.
info: Cortex_M0P:        - You should now be able to load your application to the target.
error: Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
info: Cortex_M0P: Running the application, without halting at the entry of the application.
fatal: Cortex_M0P: Error connecting to the target: (Error -1274 @ 0x0) Error encountered during connect sequence.  The specific reason is unknown but may be the result of trying to access a Core or logic that is inaccessible due to a lack of Power, Clocks, or Authentication (i.e. Security is preventing).  If blocked by security, and if supported, access may be allowed after following the Authentication process. (Emulation package 9.13.0.00201)
Failed: Operation was aborted

有人已经遇到了这个问题? 为什么只能使用命令行来刷写已编程的设备?

注意:使用 Uniflash v8.5.0.4593和芯片 CC2340R5

此致、

安托万

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

    您好 Antoine:

    Unknown 说:
    我的第一点是默认命令"./dslite-Cortex_M0P.bat"返回以下错误:

    如果您使用下列步骤,而不是使用独立软件包,您是否有相同的问题?

    dev.ti.com/.../command-line-flashing-cc23xx.html

    Unknown 说:
    第二点是我无法使用命令行来刷新设备(尚未编程)。 它返回以下错误:

    似乎 CCFG 信息丢失(对于新器件很有意义)。

    Unknown 说:
    有人已经遇到了这个问题? 为什么只能使用命令行刷写已编程的设备?

    可以。 我做了。 我的新 CC2340R5遇到类似的问题。 查看我的主题:

    https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1289579/lp-em-cc2340r5-error-when-trying-to-connect-to-target-debugging-is-not-allowed-if-this-is-not-expected-check-your-ccfg 

    我提供了该主题中未提及的有关该问题的更多详细信息。 显然、对于未配置 CCFG 的新器件(或者已完成芯片擦除)、您需要用 CCFG 信息刷写一个程序、而无需首先显式连接至目标。 它听起来与直觉相反、但这就是它应该如何工作的。 无工程 CCS 调试的问题是、我在尝试闪存之前手动连接到内核。 在刷写之前、CCS 工程调试器将知道不连接。  

    我认为 UniFlash 的问题在于、UniFlash 每次在刷写之前都会尝试连接到目标。 这会导致与无工程调试类似的问题。 我们需要调查是否有办法指示 UniFlash 不首先连接这些无干扰器件。

    谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我认为 UniFlash 的问题是 UniFlash 每次在刷写之前都会尝试连接到目标。 这会导致与无工程调试类似的问题。 我们需要调查是否有办法指示 UniFlash 不首先连接这些干净设备。[/引号]

    我错了。 UniFlash GUI 在连接前会执行正确操作并刷写。 它包含有关器件的相关信息、可用于执行此操作。

    我认为问题在于独立的套件。 它无法正确调用命令。

    请参阅我之前提到的以下文档:

    dev.ti.com/.../command-line-flashing-cc23xx.html

     从命令行运行时、有一个"-mode noConnectFlash"选项需要用于该器件。 从 UniFlash 生成的独立软件包似乎没有这个功能。 这会导致问题。

    我不会为 CC2340R5使用独立的软件包。 使用上述文档中的命令。 这是官方支持的方法。 它还可以解决您的其他数据验证问题。

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

    Ki、您好!

    非常感谢您提供的所有详细信息和文档。

    使用文档中提到的带参数的命令 noConnectFlash 解决了我的问题。

    此致、

    安托万