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.

[参考译文] CC2340R5:初始化闪存编程时出错

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1176313/cc2340r5-error-initializing-flash-programming

主题中讨论的其他器件:CC2340R5UNIFLASHCC2652R

你好!

我正在尝试在 LP-EM-CC2340R5上加载和运行简单外设示例、并得到以下错误:

Cortex_M0P:初始化闪存编程时出错:无法加载 C:\ti\ccs1210\ccs\ccs_base\DebugServer\bin\FlashCC23xx.dll:参数不正确。

Cortex_M0P:加载程序:程序的一个或多个部分属于不可写的存储器区域。 这些区域实际上不会写入目标。 检查链接器配置和/或存储器映射。
Cortex_M0P:文件加载程序:验证失败:地址0x00007FF0处的值不匹配请验证目标存储器和存储器映射。
Cortex_M0P:GEL:文件:C:\Users\xxxx\simple_peripheral_LP_EM_CC2340R5_freertos_ticlang\Debug\simple_peripheral_LP_EM_CC2340R5_freertos_ticlang.out:发生数据验证错误、文件加载失败。

我的设置:
主机平台:Windows 11
CC Studio 12.1
SDK 6.30.00.20

我 尝试了主机测试示例、得到的错误完全相同。

但是、当我尝试使用简单的中央示例时、验证在其他地址失败:

Cortex_M0P:文件加载程序:验证失败:地址0x00000001处的值不匹配请验证目标内存和内存映射。

我已经阅读了此页面并查看了链接器命令文件(所有三个工程都具有相同的链接器文件)、但我找不到它们有什么问题。  发生错误的地址位于 CC2340R5的闪存存储器区域内。

https://software-dl.ti.com/ccs/esd/documents/troubleshooting-data_verification_errors.html


我要附加下面的链接器文件。

谢谢!
-Joey



/******************************************************************************

 @file  cc23x0_app_freertos.cmd

 @brief cc23x0R5 linker configuration file for FreeRTOS
        with Code Composer Studio.

        Imported Symbols
        Note: Linker defines are located in the CCS IDE project by placing them
        in
        Properties->Build->Linker->Advanced Options->Command File Preprocessing.

        ICALL_RAM0_START:   RAM start of BLE stack.
        ICALL_STACK0_START: Flash start of BLE stack.
        PAGE_AlIGN:         Align BLE stack boundary to a page boundary.
                            Aligns to Flash word boundary by default.

 Group: WCS, BTS
 Target Device: cc23xx

 ******************************************************************************
 
 Copyright (c) 2017-2022, Texas Instruments Incorporated
 All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:

 *  Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

 *  Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

 *  Neither the name of Texas Instruments Incorporated nor the names of
    its contributors may be used to endorse or promote products derived
    from this software without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 ******************************************************************************
 
 
 *****************************************************************************/

/*******************************************************************************
 * CCS Linker configuration
 */

/* Override default entry point.                                             */
--entry_point=resetISR

/* Retain interrupt vector table variable                                    */
--retain=resetVectors

/* Suppress warnings and errors:                                             */
/* - 10063: Warning about entry point not being _c_int00                     */
/* - 16011, 16012: 8-byte alignment errors. Observed when linking in object  */
/*   files compiled using Keil (ARM compiler)                                */
--diag_suppress=10063,16011,16012
--heap_size=0
--stack_size=800
/* The following command line options are set as part of the CCS project.    */
/* If you are building using the command line, or for some reason want to    */
/* define them here, you can uncomment and modify these lines as needed.     */
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone.              */
/*                                                                           */
/* --heap_size=0                                                             */
/* --stack_size=256                                                          */
/* --library=rtsv7M3_T_le_eabi.lib                                           */

/* The starting address of the application.  Normally the interrupt vectors  */
/* must be located at the beginning of the application. Flash is 128KB, with */
/* sector length of 4KB                                                      */
/*******************************************************************************
 * Memory Sizes
 */
#define FLASH_BASE   0x00000000
#define RAM_BASE     0x20000000

#define FLASH_SIZE   0x00080000
#define RAM_SIZE     0x00009000

#define CCFG_BASE    0x4E020000
#define CCFG_SIZE    0x800

/*******************************************************************************
 * Memory Definitions
 ******************************************************************************/

/*******************************************************************************
 * RAM
 */
#define RAM_START      (RAM_BASE)
#ifdef ICALL_RAM0_START
  #define RAM_END      (ICALL_RAM0_START - 1)
#else
  #define RAM_END      (RAM_BASE + RAM_SIZE - 1)
#endif /* ICALL_RAM0_START */

/*******************************************************************************
 * Flash
 */

#define FLASH_START                FLASH_BASE
#define WORD_SIZE                  4

#define PAGE_SIZE                  0x2000

#ifdef PAGE_ALIGN
  #define FLASH_MEM_ALIGN          PAGE_SIZE
#else
  #define FLASH_MEM_ALIGN          WORD_SIZE
#endif /* PAGE_ALIGN */

#define PAGE_MASK                  0xFFFFE000

/* The last Flash page is reserved for the application. */
#define NUM_RESERVED_FLASH_PAGES   1
#define RESERVED_FLASH_SIZE        (NUM_RESERVED_FLASH_PAGES * PAGE_SIZE)

/* Check if page alingment with the Stack image is required.  If so, do not link
 * into a page shared by the Stack.
 */
#ifdef ICALL_STACK0_START
  #ifdef PAGE_ALIGN
    #define ADJ_ICALL_STACK0_START (ICALL_STACK0_START * PAGE_MASK)
  #else
    #define ADJ_ICALL_STACK0_START ICALL_STACK0_START
  #endif /* PAGE_ALIGN */

  #define FLASH_END                (ADJ_ICALL_STACK0_START - 1)
#else
  #define FLASH_END                (FLASH_BASE + FLASH_SIZE - RESERVED_FLASH_SIZE - 1)
#endif /* ICALL_STACK0_START */

#define FLASH_LAST_PAGE_START      (FLASH_SIZE - PAGE_SIZE)

/*******************************************************************************
 * Stack
 */

/* Create global constant that points to top of stack */
/* CCS: Change stack size under Project Properties    */
__STACK_TOP = __stack + __STACK_SIZE;

/*******************************************************************************
 * ROV
 * These symbols are used by ROV2 to extend the valid memory regions on device.
 * Without these defines, ROV will encounter a Java exception when using an
 * autosized heap. This is a posted workaround for a known limitation of
 * RTSC/rta. See: bugs.eclipse.org/.../show_bug.cgi
 *
 * Note: these do not affect placement in RAM or FLASH, they are only used
 * by ROV2, see the BLE Stack User's Guide for more info on a workaround
 * for ROV Classic
 *
 */
__UNUSED_SRAM_start__ = RAM_BASE;
__UNUSED_SRAM_end__ = RAM_BASE + RAM_SIZE;

__UNUSED_FLASH_start__ = FLASH_BASE;
__UNUSED_FLASH_end__ = FLASH_BASE + FLASH_SIZE;

/*******************************************************************************
 * Main arguments
 */

/* Allow main() to take args */
/* --args 0x8 */

/*******************************************************************************
 * System Memory Map
 ******************************************************************************/
MEMORY
{
  /* EDITOR'S NOTE:
   * the FLASH and SRAM lengths can be changed by defining
   * ICALL_STACK0_START or ICALL_RAM0_START in
   * Properties->ARM Linker->Advanced Options->Command File Preprocessing.
   */

  /* Application stored in and executes from internal flash */
  FLASH (RX) : origin = FLASH_START, length = (FLASH_END - FLASH_START + 1)

  /* contains some application code. */
  FLASH_LAST_PAGE (RX) :  origin = FLASH_LAST_PAGE_START, length = PAGE_SIZE

  /* Application uses internal RAM for data */
  SRAM (RWX) : origin = RAM_START, length = (RAM_END - RAM_START + 1)

  CCFG (RW) : origin = CCFG_BASE, length = CCFG_SIZE
}

/*******************************************************************************
 * Section Allocation in Memory
 ******************************************************************************/
SECTIONS
{

  .resetVecs      :   >  FLASH_START
  .text           :   >> FLASH | FLASH_LAST_PAGE
  .const          :   >> FLASH | FLASH_LAST_PAGE
  .constdata      :   >> FLASH | FLASH_LAST_PAGE
  .rodata         :   >> FLASH | FLASH_LAST_PAGE
  .cinit          :   >  FLASH | FLASH_LAST_PAGE
  .pinit          :   >> FLASH | FLASH_LAST_PAGE
  .init_array     :   >  FLASH | FLASH_LAST_PAGE
  .emb_text       :   >> FLASH | FLASH_LAST_PAGE
  .ccfg           :   >  CCFG


  .vtable         :   > SRAM
  .vtable_ram     :   > SRAM
  vtable_ram      :   > SRAM
  .data           :   > SRAM
  .bss            :   > SRAM
  .sysmem         :   > SRAM
  .nonretenvar    :   > SRAM
  .heap           :   > SRAM
  .stack          :   > SRAM (HIGH)

}

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

    您好!

    感谢您的参与。

    请允许我询问您是否遵循了快速入门指南中的以下章节:

    -"启用 CC23xx LaunchPad 调试功能"

    -"刷新空白器件"

    如果在执行这些操作后问题仍然存在、请尝试是否使用 UniFlash 刷写器件?

    我希望这将有所帮助、

    此致、

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

    我多玩了一点

    SmartRF 闪存编程器可以看到 XDS110、但无法识别器件。  显示"未知"

    UniFlash 显示"连接到目标时出错:(错误-2131 @ 0x0)无法访问设备寄存器..."

    MCU 仍在工作、因为当我复位电路板时、我在串行终端上看到了这一点。
    信息:欢迎!
    信息:您现在可以打开 BLE Scanner 应用并连接到"LP-EM-CC2340R5"
    INFO:自有地址0x806FB01E3505

    我认为这是工厂加载的 simple_serial_socket_server。   

    在某种程度上、两个板之间的 SWD 接口会损坏。

    BR、
    Joey

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

    您好、Joey、

    目前(这将在将来发生变化)、器件发货为空白(即没有任何程序)。

    因此、您似乎已成功在器件上刷写 simple_serial_socket_server。

    是否可以确认所有连接都是 crrect? (并提供设置的图片)

    此致、

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

    您好 Clement、

    不、我认为加载串行套接字服务器的不是我、因为 UniFlash 无法检测 MCU。  

    只是为了确保我尝试使用 相同的过程加载 simple_peripheral_LP_EM_CC2340R5_freertos_ticlang.hex。  我遇到了相同的错误、可以在终端中看到串行套接字服务器仍在加载。

    这是我的设置

      

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

    我还尝试了 SWD 线缆、并使用另一个 Launchpad 的3.3V 为 CC2340R5供电。   仍然无法检测到 MCU。



    为了确保 LP-XDS110ET 正常工作、我将 CC2652R 连接到它。   


    检测到 CC2652R


    那么、CC2340R5似乎有一个错误的 SWD 接口?   这可以是固定的、还是必须获得新电路板?

    BR、
    Joey

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

    您好、Joey、

    您是对的、此电路板随附了预刷写软件。

    我正在我们的工具团队的帮助下审查您的案例。 我希望我明天可以发表评论。

    此致、

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

    您好、Joey、

    在工具团队的帮助下、我运行了一些测试、但没有设法重现问题。

    以下是您可以考虑验证的两个元素:

    -闪存属性设置:确保选择``Chip Erase``。 必须在相关的调试配置中检查此设置。 (查看调试->选择 CPU 内核->右键单击 CPU 内核->打开 GEL 视图->片上闪存)

    -首先执行芯片擦除->在``片上闪存``中可用。 成功擦除芯片后,您可以尝试通过在无项目调试会话中运行->加载二进制文件。

    请告诉我们您的结果。

    此致、

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

    您好 Clement、

    [引用 userid="370266" URL"~/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1176313/cc2340r5-error-initializing-flash-programming/4431163 #4431163"]

    以下是您可以考虑验证的两个元素:

    -闪存属性设置:确保选择``Chip Erase``。 必须在相关的调试配置中检查此设置。 (查看调试->选择 CPU 内核->右键单击 CPU 内核->打开 GEL 视图->片上闪存)

    -首先执行芯片擦除->在``片上闪存``中可用。 成功擦除芯片后,您可以尝试通过在无项目调试会话中运行->加载二进制文件。

    [/报价]

    这是什么工具?

    [引用 userid="370266" URL"~/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1176313/cc2340r5-error-initializing-flash-programming/4427576 #4427576"]

    请允许我询问您是否遵循了快速入门指南中的以下章节:

    -"启用 CC23xx LaunchPad 调试功能"

    -"刷新空白器件"

    [/报价]

    在哪里 可以找到此快速入门指南?


    BR、

    Joey

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

    您好、Joey、

    此处提到的工具是 CCS -但我也建议尝试使用 Uniflash。

    下面的屏幕截图显示了一种类似但不同的方法来验证工具团队建议的配置。 右键点击工程> Properties、然后按如下方式进行配置:

    快速入门指南是用户指南的一部分。 它包含在的 SDK 中 \docs\ble5stack\ble_user_guide

    我希望这将有所帮助、

    此致、

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

    您好 Clement、

    感谢你的帮助。   xdsdfu 实用程序实现了这一目的。  现在、我可以使用 CCS 加载和调试示例项目。

    这种预硅平台与我目前使用的成熟 LaunchPad 非常不同。

    此致、
    Joey

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

    我在 CCS 12.1的项目首选项(高级设置)中没有此闪存设置选项、并且我遵循了快速入门指南中的所有说明和步骤、并在我的安全资源(日期12/217)中使用了所有最新版本的文件。 我已经发布了有关闪烁问题的另一个主题(如果这被视为交叉发布、很抱歉)、但有不同的错误:

    https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1181154/can-t-flash-examples-to-lp-em-cc2340r5-with-lp-xds110-using-ccs-12-1

    如何启用此设置以尝试此操作?

    另一个报告不同错误的 e2er 声称 TI FAE 状态在 CCS 12.1中存在阻止刷写空白器件的错误:

    https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1179784/cc2340r5-flashing-issue

    是否确认了这一点、并且是否使用 cc23xx_device_support_0.01.08.221_linux.zip 将建议的权变措施降级到 CCS 12.0?

    感谢您的帮助!

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

    您好、Stefano、

    我是否可以请您打开一个新话题来讨论您的问题?

    感谢您的理解、

    此致、

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

    您好、Cl é ment、

    感谢您的回复。 正如我之前的帖子中提到的、我已经就我的特定问题打开了另一个主题:

    https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1181154/can-t-flash-examples-to-lp-em-cc2340r5-with-lp-xds110-using-ccs-12-1

    我在这里也发布了另一个(尽管类似)问题的唯一原因是、鉴于器件的预发布状态和所讨论的多个工具版本、我认为比较这些问题非常有用。 我的问题与您在此主题上建议的 CCS 中缺少闪存选项设置有关、以及 CCS 12.1与12.10之间的区别。 抱歉、如果我交叉发布、请随时删除我之前的帖子和此帖子。

    此致、节日季快乐、

    Stefano