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.

[参考译文] TMS320F28379D:如何在闪存中查找.out 文件的位置

Guru**** 2562120 points
Other Parts Discussed in Thread: TMS320F28379D

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1271359/tms320f28379d-how-to-find-the-location-of-out-file-in-flash

器件型号:TMS320F28379D

您好、Geeks:

我目前正在研发 TMS320F28379D 控制器。我目前正在研发用于闪存的 POST。 我正在使用 CRC (_CCS_FLASH_CHECKSUM、ALSTICM=CRC32_PRIME)。 我有一个带有参数起始地址和结束地址的函数、该函数计算多项式 0x04C11DB7的 CRC。 我需要找到存储在闪存(FYI 映像)中的.out 文件的起始地址和结束地址。 我不清楚.out 文件在闪存扇区中的位置。 是否可以找到.out 文件的起始地址 和  结束地址、以便我可以计算 CRC 并根据生成的 CRC (仅供参考的图像)进行检查。  我还将从 CCS 内存浏览器中添加闪存利用率。

/resized-image/__size/640x480/__key/communityserver-discussions-components-files/171/07447.png

/resized-image/__size/640x480/__key/communityserver-discussions-components-files/171/167120.png

谢谢。此致、

Denzil Rhodes。

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

    Denzil,

    我想了解 汇编工具指南是否 解答了您的问题、请查看第263页、我们在其中介绍了如何为特定范围的存储器生成校验和。

    相反、您也可以查看生成的.map 文件以确认不同代码段的代码范围。  此文件将与.out 文件位于同一目录中。  但是、如果您更改代码、这些代码可能会增长或收缩、如上所述的分配将更加动态。

    此致!
    马修

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

    您好 MatthewRate

    我已经阅读了《指南》、并了解了 CRC 和 crc_table 之间的区别。 我的任务是为整个闪存开发一个 CRC 生成函数、并在运行时将其与构建环境生成的 CRC 匹配。 是否有任何示例程序来了解编译所用的算法和方法来生成 CRC、以便我可以使用它们来开发我的函数。   

    谢谢。

    Denzil Rhodes。

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

    校验和算法如下所示:

    void main(void)
    
    {
    
          uint16 checksum = 0;
    
     
    
          presult[0] = 0;
    
                      pstatus = 1;
    
     
    
                      /* Flush Flash wrapper pipeline to ensure no stale data exists */
    
          Fapi_flushPipeline();
    
     
    
                      /* Calculate checksum for the address range provided */
    
          for(; param1 <= param2; param1+=1)
    
          {
    
                checksum += *(unsigned int*)param1;
    
          }
    
     
    
                      presult[0] = checksum;
    
    }
    
     
    
    param1 and param2 are the start and end addresses of the memory range considered for the checksum calculation.

    此致!
    马修