主题中讨论的其他器件: UNIFLASH、 CC2340R5
带 XDS110ET 调试器的 LP-EM-CC2340R5
Windows 11家庭 x64
CCS v12.3.0
Uniflash v8.3.0
安装了 simplelink_lowpower_f3_SDK_7_10_00_35
我看过这些线程、但无法复制/获得这些解决方案来发挥作用:
文章由 Joe Gilfillan提供: // e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1224456/lp-em-cc2340r5-unable-to-program-cc2340-device-via-xds110-debugger
帖子由 Simbasoft: 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.
尝试 Ryan Brown1针对 Joe Gilfilian 的帖子验证的解决方案:
工具团队已确认该问题 很可能是因为在刷写的程序中禁用了调试访问(在 ccfg 内)。 这是由前面所述的硬件/软件不匹配引起的(即、 修订版 B/PG2电路板上的 RevA/PG1 SDK 示例)。 或 在 RevB/PG2示例中配置 revA/PG1 ccfg、并在 revB/PG2电路板中烧录。
无法从 CCS 或 Uniflash 解锁。 这是设计使然、因为如果开发人员选择、调试接口应该永久关闭。 这在 RevA/PG1中未启用。 下面是一个 可供客户从这种情况中恢复的脚本。
- 在‘Target Configurations’(目标配置)窗口中使用目标配置文件启动无工程调试会话(View -> Target Configurations)。
- 在调试窗口中右键点击 Cortex 内核(View -> Debug)并选择‘SShow All Cores’(显示所有内核)。
- 右键点击 DAP 内核并选择‘Open GEL Files View’。
- 右键点击‘GEL Files (CS_DAP)'窗口并加载`unlock_loki_low_plus_Pg2.gel`脚本。
- 请确保 GEL 脚本的状态为 成功 实际值。
- 选择 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 芯片擦除)
-
在 CCS 中、通过点击 View→Target Configurations 打开 Target Configuration 视图。
-
在 Target Configuration 窗口中、单击并展开"Projects"文件夹。
-
在"Projects"文件夹中、点击并展开您的项目。
-
单击并展开 targetConfigs 文件夹。
-
在此阶段、您应该会看到该
CC2340R5.ccxml文件。 右键点击并点击"Launch Selected Configuration" -
几秒钟后、CCS 视图应该切换到 Debug 视图、目标配置应该启动。 如果"Debug (调试)"窗口中显示"Texas Instruments XDS110 USB Debug Probe/Cortex_M0P"内核、则目标配置已完成启动。
-
点击"Scripts"→"CC23xx"→"ProgramDefaultCcfg"。 这就是我被卡住的地方-这里没有 ProgramDefaultCcfg 选项。
-
之后、您应该会在"Console"中看到一条成功消息。 现在可以刷写该器件。
下一组步骤:
-
打开 Uniflash
-
打开 CC2340R5配置。
-
单击"Standalone Command line"
-
单击"生成软件包"
-
生成软件包后,将 zip 文件保存到
C:\ti\uniflash_7.1.0。 -
将
uniflash_windows.zip存档内容提取到C:\ti\uniflash_7.1.0\uniflash_windows -
打开 Windows 命令提示符
-
C:\ti\uniflash_7.1.0通过运行以下命令导航到命令提示符中的目录cd C:\ti\uniflash_7.1.0 -
运行以下命令:
dslite.bat --mode cc23xx-prog-default-ccfg -c C:\ti\uniflash_7.1.0\uniflash_windows\user_files\configs\cc2340r5.ccxml -
之后、您应该会在"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.
感谢任何帮助

