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.

[参考译文] LP-EM-CC2340R5:无法使用 CCS 或 Uniflash 对 LP-XDS110ET 的 LP-EM-CC2340R5进行闪存/调试

Guru**** 2538930 points
Other Parts Discussed in Thread: LP-EM-CC2340R5, UNIFLASH, CC2340R5

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1236576/lp-em-cc2340r5-cannot-flash-debug-lp-em-cc2340r5-with-lp-xds110et-using-ccs-or-uniflash

器件型号:LP-EM-CC2340R5
主题中讨论的其他器件: UNIFLASHCC2340R5

带 XDS110ET 调试器的 LP-EM-CC2340R5

Windows 11家庭 x64

CCS v12.3.0

Uniflash v8.3.0

安装了 simplelink_lowpower_f3_SDK_7_10_00_35

我看过这些线程、但无法复制/获得这些解决方案来发挥作用:

文章由 提供: // e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1224456/lp-em-cc2340r5-unable-to-program-cc2340-device-via-xds110-debugger

帖子由 : https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1177752/neither-ccs-nor-uniflash-are-able-to-connect-to-lp-em-cc2340r5-eval-board

如果我尝试在 CCS 中简单地构建和调试示例 mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc、我会收到以下错误:

在弹出窗口中:

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.11.0.00128)

在控制台中:

Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
Cortex_M0P: Image must contain (correctly sized) CCFG section, when erase type is "Chip erase"
Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG. 
Cortex_M0P:     Flash loading is currently not supported if debugging is not allowed. 
Cortex_M0P:     If you are experiencing issues with loading your application, do the following (this will erase the chip): 
Cortex_M0P:      - Code Composer Studio: 
Cortex_M0P:        - End the current debug session (if any is active). 
Cortex_M0P:        - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration. 
Cortex_M0P:        - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG. 
Cortex_M0P:        - You should now be able to load your application to the target. 
Cortex_M0P:      - UniFlash: 
Cortex_M0P:        - Run the following dslite command: 
Cortex_M0P:          dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file] 
Cortex_M0P:        - You should now be able to load your application to the target. 
Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
Cortex_M0P: Running the application, without halting at the entry of the application.
Cortex_M0P: GEL: Error while executing OnRestart( 0 ): Could not read 0x40000034: target is not connected
	 at ('REG'::PMCTL_BOOTSTA==0x80) [cc23xx_xds.gel:99]
	 at OnRestart(0)
Cortex_M0P: AutoRun: Unable to run the target at this time
Cortex_M0P: AutoRun: Target not run as breakpoint could not be set: Cannot enable while the target is disconnected
Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG. 
Cortex_M0P:     Flash loading is currently not supported if debugging is not allowed. 
Cortex_M0P:     If you are experiencing issues with loading your application, do the following (this will erase the chip): 
Cortex_M0P:      - Code Composer Studio: 
Cortex_M0P:        - End the current debug session (if any is active). 
Cortex_M0P:        - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration. 
Cortex_M0P:        - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG. 
Cortex_M0P:        - You should now be able to load your application to the target. 
Cortex_M0P:      - UniFlash: 
Cortex_M0P:        - Run the following dslite command: 
Cortex_M0P:          dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file] 
Cortex_M0P:        - You should now be able to load your application to the target. 
Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
Cortex_M0P: Running the application, without halting at the entry of the application.
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.11.0.00128)

首先、如果我按照控制台中编写的步骤进行操作:

Cortex_M0P:不允许调试。 如果这不是预期结果、请检查您的 CCFG。
Cortex_M0P:如果不允许调试、目前不支持闪存加载。
Cortex_M0P:如果加载应用程序时遇到问题、请执行以下操作(这将擦除芯片):
Cortex_M0P:- Code Composer Studio:
Cortex_M0P:-结束当前调试会话(如果有一个处于活动状态)。
Cortex_M0P:- View -> Target Configurations ->右键点击您的项目的.ccxml 文件-> Launch Selected Configuration。
Cortex_M0P:- Run -> Load -> LoadProgram ->选择包含有效 CCFG 的程序文件。
Cortex_M0P:-您现在应该能够将您的应用加载到目标。
Cortex_M0P:- UniFlash:
Cortex_M0P:-运行以下 dslite 命令:
Cortex_M0P:dslite --mode cc23xx-prog-default-ccfg -c [您的 ccxml 文件的路径]
Cortex_M0P:-您现在应该能够将您的应用加载到目标。

"Code Composer Studio"步骤列表为我提供与上次运行时完全相同的控制台错误、

"Uniflash"步骤列表不会显示任何命令行错误、但即使在使用该命令后、我在尝试使用 CCS 调试程序时也会遇到相同的控制台/弹出窗口错误:

c:\TI\uniflash_8.3.0>dslite --mode cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml
Executing the following command:
> "c:\TI\uniflash_8.3.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml

For more details and examples, please refer to the UniFlash Quick Start guide

如果我尝试通过 Uniflash 加载.out 文件、会得到以下 Uniflash 控制台输出:  

[6/12/2023, 2:53:43 PM] [INFO] Cortex_M0P: Writing Flash @ Address 0x00000000 of Length 0x00006f7c
[6/12/2023, 2:53:43 PM] [INFO] Cortex_M0P: Performing Chip Erase
[6/12/2023, 2:53:44 PM] [ERROR] Cortex_M0P: Image must contain (correctly sized) CCFG section, when erase type is "Chip erase"
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: Flash loading is currently not supported if debugging is not allowed.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: If you are experiencing issues with loading your application, do the following (this will erase the chip):
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - Code Composer Studio:
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - End the current debug session (if any is active).
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - You should now be able to load your application to the target.
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - UniFlash:
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - Run the following dslite command:
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file]
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: - You should now be able to load your application to the target.
[6/12/2023, 2:53:45 PM] [ERROR] Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
[6/12/2023, 2:53:45 PM] [INFO] Cortex_M0P: Running the application, without halting at the entry of the application.
[6/12/2023, 2:53:45 PM] [ERROR] Cortex_M0P: GEL: Error while executing OnRestart( 0 ): Could not read 0x40000034: target is not connected at ('REG'::PMCTL_BOOTSTA==0x80) [cc23xx_xds.gel:99] at OnRestart(0)
[6/12/2023, 2:53:45 PM] [SUCCESS] Program Load completed successfully.

尝试 针对 Joe Gilfilian 的帖子验证的解决方案:

工具团队已确认该问题 很可能是因为在刷写的程序中禁用了调试访问(在 ccfg 内)。  这是由前面所述的硬件/软件不匹配引起的(即、 修订版 B/PG2电路板上的 RevA/PG1 SDK 示例)。   在 RevB/PG2示例中配置 revA/PG1 ccfg、并在 revB/PG2电路板中烧录。

无法从 CCS 或 Uniflash 解锁。 这是设计使然、因为如果开发人员选择、调试接口应该永久关闭。  这在 RevA/PG1中未启用。  下面是一个 可供客户从这种情况中恢复的脚本。

取消阻止_loki_low_plus_Pg2.GEL

  1. 在‘Target Configurations’(目标配置)窗口中使用目标配置文件启动无工程调试会话(View -> Target Configurations)。
  2. 在调试窗口中右键点击 Cortex 内核(View -> Debug)并选择‘SShow All Cores’(显示所有内核)。
  3. 右键点击 DAP 内核并选择‘Open GEL Files View’。
  4. 右键点击‘GEL Files (CS_DAP)'窗口并加载`unlock_loki_low_plus_Pg2.gel`脚本。
    1. 请确保 GEL 脚本的状态为  成功  实际值。
  5. 选择 DAP 内核并运行 GEL 函数‘UnblockLokiLowPlusPG2 '(Scripts -> CC23XX)。

要使用 Uniflash CLI 在空白器件上刷写程序、可以使用以下命令。 这在 Uniflash v8.2或 v8.3上适用。

dslite --mode noConnectFlash cc23xx-prog-default-ccfg -c ccxml_file_path

如果将 Uniflash GUI 用于空白器件、 则可直接从 GUI 对器件进行编程、无需任何特殊测试。  在具有有效 CCFG 的器件上、相同的旧 dslite 命令仍然有效

dslite 闪存 cc23xx-prog-default-ccfg -c ccxml_file_path  

此致、
瑞安

在步骤5中运行脚本后、我会在控制台中得到以下命令:

然后、当我使用 dslite 命令转到下一步时、可以看到:

c:\TI\uniflash_8.3.0>dslite --mode noConnectFlash cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml
Executing the following command:
> "c:\TI\uniflash_8.3.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" noConnectFlash cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml

For more details and examples, please refer to the UniFlash Quick Start guide.

info: Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
Failed: Unable to open file: cc23xx-prog-default-ccfg

如果我使用该解决方案下一行中的命令,则会有类似的处理:

dslite 闪存 cc23xx-prog-default-ccfg -c ccxml_file_path  

c:\TI\uniflash_8.3.0>dslite flash cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml
Executing the following command:
> "c:\TI\uniflash_8.3.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" flash flash cc23xx-prog-default-ccfg -c C:\TI\Workspaces\WS2\mcuboot_blinky_LP_EM_CC2340R5_nortos_gcc\targetConfigs\CC2340R5.ccxml

For more details and examples, please refer to the UniFlash Quick Start guide.

info: Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
Cortex_M0P: GEL Output: Memory Map Initialization Complete.
Failed: Unable to open file: flash

接下来介绍 Simbasoft 的解决方案:

如果刷写空白器件或已被批量擦除的器件、则应遵循以下详细过程。 如果在非空白器件上执行该过程、则该过程不会有任何负面影响。 以下步骤可用于解决"Error -1274 @ 0x0"闪烁错误。  (在开始之前、我进行了 UniFLASH 芯片擦除)

  1. 在 CCS 中、通过点击 View→Target Configurations 打开 Target Configuration 视图。

  2. 在 Target Configuration 窗口中、单击并展开"Projects"文件夹。

  3. 在"Projects"文件夹中、点击并展开您的项目。

  4. 单击并展开 targetConfigs 文件夹。

  5. 在此阶段、您应该会看到该 CC2340R5.ccxml 文件。 右键点击并点击"Launch Selected Configuration"

  6. 几秒钟后、CCS 视图应该切换到 Debug 视图、目标配置应该启动。 如果"Debug (调试)"窗口中显示"Texas Instruments XDS110 USB Debug Probe/Cortex_M0P"内核、则目标配置已完成启动。

  7. 点击"Scripts"→"CC23xx"→"ProgramDefaultCcfg"。  这就是我被卡住的地方-这里没有 ProgramDefaultCcfg 选项。

  8. 之后、您应该会在"Console"中看到一条成功消息。 现在可以刷写该器件。

下一组步骤:

  1. 打开 Uniflash

  2. 打开 CC2340R5配置。

  3. 单击"Standalone Command line"

  4. 单击"生成软件包"

  5. 生成软件包后,将 zip 文件保存到 C:\ti\uniflash_7.1.0

  6. 将 uniflash_windows.zip 存档内容提取到  C:\ti\uniflash_7.1.0\uniflash_windows

  7. 打开 Windows 命令提示符

  8.  C:\ti\uniflash_7.1.0 通过运行以下命令导航到命令提示符中的目录  cd C:\ti\uniflash_7.1.0

  9. 运行以下命令:  dslite.bat --mode cc23xx-prog-default-ccfg -c C:\ti\uniflash_7.1.0\uniflash_windows\user_files\configs\cc2340r5.ccxml

  10. 之后、您应该会在"Console"中看到一条成功消息。 现在可以刷写该器件。

我得到以下 CMD 响应:

c:\TI\uniflash_8.3.0>dslite.bat --mode cc23xx-prog-default-ccfg -c C:\ti\uniflash_8.3.0\uniflash_windows\user_files\configs\cc2340r5.ccxml
Executing the following command:
> "c:\TI\uniflash_8.3.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" cc23xx-prog-default-ccfg -c C:\ti\uniflash_8.3.0\uniflash_windows\user_files\configs\cc2340r5.ccxml

For more details and examples, please refer to the UniFlash Quick Start guide.

但是、当我尝试刷写 uniflash_windows 文件夹中的映像(使用与 uniflash_windows 文件夹中相同的目标配置)时、会遇到同样的错误:

回到 CCS 中、我仍然无法刷写/调试任何内容。

[6/12/2023, 3:36:01 PM] [INFO] Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 3.17.09.20
[6/12/2023, 3:36:02 PM] [ERROR] Cortex_M0P: Image must contain (correctly sized) CCFG section, when erase type is "Chip erase"
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: Flash loading is currently not supported if debugging is not allowed.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: If you are experiencing issues with loading your application, do the following (this will erase the chip):
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - Code Composer Studio:
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - End the current debug session (if any is active).
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - You should now be able to load your application to the target.
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - UniFlash:
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - Run the following dslite command:
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file]
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: - You should now be able to load your application to the target.
[6/12/2023, 3:36:03 PM] [ERROR] Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
[6/12/2023, 3:36:03 PM] [INFO] Cortex_M0P: Running the application, without halting at the entry of the application.
[6/12/2023, 3:36:04 PM] [ERROR] Cortex_M0P: GEL: Error while executing OnRestart( 0 ): Could not read 0x40000034: target is not connected at ('REG'::PMCTL_BOOTSTA==0x80) [cc23xx_xds.gel:99] at OnRestart(0)
[6/12/2023, 3:36:04 PM] [SUCCESS] Program Load completed successfully.

感谢任何帮助

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

    尊敬的 EMC_Vish:

    感谢您提供如此详细的调试信息。  您使用的处理取决于您的器件是 PG1.0器件还是 PG2.0器件。  您能否连接到 SmartRF Studio 8 并读出芯片信息?  此外、您在何时/从何处获得 LaunchPad 之前是否使用过 PG1.0资源(TI 安全资源门户中的 CC2340RX-PREVIEW)?

    此致、
    瑞安

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

    感谢您的回复、Ryan。

    - LaunchPad 和调试器是从 DigiKey 获得的,大约3天前。

    -我正在使用的 PC 是全新的 Windows 安装、因此在此计算机上使用的第一个 TI 安装版本一直是 TI 站点上提供的 CC2340R5支持版本-从未看到任何显示 CC2340RX-PREVE 的版本

    -我不确定具体如何使用 SmartRF Studio 读取芯片信息。 无论主板是否连接到我的 PC、主页都显示了2.4GHz 下方的 CC2340R5。 如果我双击 CC2340R5并单击"代码导出"、代码会在注释中显示 PG2.0。 如果我连接 USB、窗口如下所示:

    谢谢。

    维沙尔

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

    抱歉、是从 Uniflash v8.3读取芯片信息

    您的描述表明它应该是 PG2.0硬件、它的声音不像您已经下载了任何 PG 1.0软件。  虽然这令人鼓舞、但很奇怪、您在使用新的 LaunchPad 和最新资源时遇到了这个问题。  此外、Smart RF Studio 8的屏幕截图显示了该设备可以进行通信。   您是否能够在故障开始之前对器件进行一次编程?  您能否尝试不同的示例工程、例如 gpiostandby 、并报告行为是否有不同?

    此致、
    瑞安

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

    读取 UniFLASH 上 的器件信息、并实际上返回修订版 A、看起来我们正在探讨

    我试图闪存许多不同的示例、但都有相同的失败结果。

    维沙尔

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

    然后、您已获得预制版本 A/PG 1.0器件、该器件仅受弃用的私有软件资源支持、不应再出售。  CC2340R5于2023年5月上旬正式向市场发布、并且不再向开发人员提供所有的预生产软件解决方案。  在线公开的资源仅支持 修订版 B/PG 2.0芯片。  请联系 Digikey 以让他们更正问题。  TI 发货的所有 CC2340R5样片和评估模块现在都是修订版 B (PG2.0)材料。

    此致、
    瑞安

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

    您好、Ryan、

    一位产品经理联系了我、他将给我发送一个 V2板-我已将此问题标记为已解决。 感谢您的帮助;祝您愉快!