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.

[参考译文] TMS320F28P650DK:将代码存储在闪存存储体 2 中时、无法对其进行编程。

Guru**** 2549870 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1564854/tms320f28p650dk-when-the-code-is-stored-in-flash-bank2-it-cannot-be-programmed

器件型号:TMS320F28P650DK


工具/软件:

尊敬的 Champs:

我使用 F28P65 LaunchPad 和 CCS12.8.1 进行测试。  

我在.cmd 文件中将闪存组 1 和 2 定义为 FLASH_BANK_APP、并使用它们。 在我的代码中、我将所有闪存存储体都分配给了 CPU1。

当我的闪存中的代码小于 0x20000 时、我的代码全部存储在闪存组 1 中、并且可以正常编程。 但是、一旦代码大小大于 0x20000、即代码需要存储在闪存组 1 和 2 中、我的编程将失败、错误消息如下所示:

“Console"窗口“窗口显示:

C28xx_CPU1: GEL Output: 
Memory Map Initialization Complete
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ... 
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: GEL Output: 
 CPU2 is out of reset and configured to wait boot.
 (If you connected previously, may have to resume CPU2 to reach wait boot loop.)
C28xx_CPU1: If erase/program (E/P) operation is being done on one core, the other core should not execute from shared-RAM (SR) as they are used for the E/P code. User code execution from SR could commence after the selected flash banks are programmed.
C28xx_CPU1: Only CPU1 on-chip Flash Plugin can configure clock for CPU1, and CPU2 Flash operations. Plugin automatically configures PLL when CPU1 Flash operations are invoked. However, if users want to do only CPU2 Flash operations without doing a prior CPU1 operation in the current session, they should click on 'Configure Clock' button in CPU1's on-chip Flash Plugin before invoking CPU2 Flash operations. When this button is used, Flash Plugin will configure the clock for CPU1/CPU2 at 200MHz using INTOSC as the clock source. Plugin will leave PLL config like this and user application should configure the PLL as required by application.
C28xx_CPU1: Before doing any flash operations using the flash plugin, (a) Please select which flash banks should be mapped to which CPU (CPU1 vs CPU2) - This selection should be done in CPU1 flash plugin GUI. (b) Please select the flash banks that the user would like the flash plugin to erase (in the CPU1 flash plugin GUI and the CPU2 flash plugin GUI)
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ... 
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: GEL Output: 
 CPU2 is out of reset and configured to wait boot.
 (If you connected previously, may have to resume CPU2 to reach wait boot loop.)
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ... 
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: GEL Output: 
 CPU2 is out of reset and configured to wait boot.
 (If you connected previously, may have to resume CPU2 to reach wait boot loop.)
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ... 
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: GEL Output: 
 CPU2 is out of reset and configured to wait boot.
 (If you connected previously, may have to resume CPU2 to reach wait boot loop.)
C28xx_CPU1: GSxMSEL register configured correctly
C28xx_CPU1: BankMuxSel register configured correctly
C28xx_CPU1: Error during Flash Programming. Address 0x000C0000, FMSTAT (STATCMD on some devices) 0x00000101
C28xx_CPU1: File Loader: Memory write failed: Unknown error
C28xx_CPU1: GEL: File: C:\ti\1281workspace\adc_ex13_soc_oversampling\CPU1_LAUNCHXL_FLASH\adc_ex13_soc_oversampling.out: Load failed.

您可以直接使用下面的项目重现此问题、 我在项目中使用了大量重复的代码、这增加了闪存代码的大小。

e2e.ti.com/.../adc_5F00_ex13_5F00_soc_5F00_oversampling.zip

谢谢!

 

此致、

Julia

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

    此外、我使用的输出格式为 COFF

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

    尊敬的 Julia:

    专家目前是 OOO、因此请等待 1-2 天让他们返回。

    此外、您是在加载前擦除闪存吗? 请确保在片上闪存工具的下载设置中选择了 Erase and Program 选项。

    此致、

    Skyler

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

    您好、Skyler、

    是、这已启用。

    谢谢!

     

    此致、

    Julia

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

    尊敬的 Julia:

    最新版本的 CCS 是否解决了该问题?

    谢谢。此致、

    Charles

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

     尊敬的 Charles:

    现在我们使用的是 CCS12.8.1、存在这个问题。  

    由于我今天没有在出差时携带 EVM、因此我可能无法立即使用 CCS20 进行测试、并且客户也不熟悉 CCS20 环境。 您能否使用 CCS12.8.1 和 CCS20 进行测试、看看是否会重现此问题?

    谢谢!

     

    此致、

    Julia

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

    尊敬的 Julia:

    已根据 CCS12.8.1 进行了检查、并能够将代码加载到器件中。

    还能够加载到 CCS 20.3.0。

    因此、无法重新创建问题。 您收到的 FMSTAT 错误表明已达到 FAILINVDATA 结果、这意味着已尝试将 0 编程为 1。

    在 CCS 12.8.1 与 CCS 20.3.0 中、内存浏览器在 0xC0000 地址处的外观是什么?

    谢谢。此致、

    Charles

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

     尊敬的 Charles:

    我使用 CCS12.8.1 和 CCS20 进行了测试、结果都失败了。

    使用 CCS12.8.1 时、在我刷写工程之前、我检查 0xC0000 地址、它不是 0xFFFF。 然后刷写代码、 收到与之前相同的错误。 刷写后检查 0xC0000 的存储器、结果是相同的

    我怀疑闪存存储体 2 尚未成功擦除。 因此、我尝试擦除片上闪存中的闪存组 2。 控制台窗口显示成功、但我检查内存浏览器、它现在已被擦除

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000-microcontrollers---internal/f/c2000-microcontrollers---internal-forum/1465703/tms320f28p650dk-flash-bank-2-cannot-be-erased-in-ccsv12-8-1-but-can-be-erased-in-ccsv12-6-0/5629466#5629466

    我在这个问题上找到了类似的案例、但也没有解决办法。

    如果我使用 CCS20、在构建工程时直接收到错误、因为客户的代码和 cmd 文件是 COFF 格式、我找不到从 EABI 切换到 COFF 的位置。  您能告诉我您如何在 CCS20 中成功编译此工程吗? 我也会在我的最后尝试它。

    谢谢!

     

    此致、

    Julia

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

    尊敬的 Julia:

    我还在 CCS20 中尝试编译此 COFF 工程时遇到了相同的编译问题。 我加载的是一个 LED 闪烁示例、它涵盖了问题的“银行擦除“部分所需的银行。 我现在已经 在 CCS 12.8.1 中继续生成 EABI 版本的工程、然后将 .out 加载 到器件中。 客户是否有必要坚持使用 COFF 来生成示例?

    对于 CCS 12.8-1 中的闪存组 2 擦除问题、建议从较新的 CCS 20.3.0 版本更新 CCS_BASE 文件夹:

    e2e.ti.com/.../ccs_5F00_base.7z

    在 CCS 12.8.1 中提取文件夹并将其复制到此路径:

    ccs1281\ccs

    这样它将覆盖 CCS 12.8.1 闪存插件版本。 CCS 12.8.1 在 CCS 20 版本之后无法接收更多补丁。

    谢谢。此致、

    Charles

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

     尊敬的 Charles:

    客户在生成示例时是否必须坚持使用 COFF?

    是、客户需要使用 COFF。

    我建议客户替换该文件。  谢谢!

     

    此致、

    Julia

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

    好的、Julia、期待他们如何使用软件包更新。

    谢谢。此致、

    Charles

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

     尊敬的 Charles:

     

    此致、

    Julia

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

    好的、感谢 Julia 确认了这个!

    此致、

    Charles