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.

TMS320F28377D: 烧录时在FLASH特定地址上写如标志符

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

STM的ARM 可采用如下语句const char Version[4] __attribute__ ((at (FLASH_RUN_PROGRAM_MARK_ADDR))) = {'T','a','i','n'};  烧录时在FLASH_RUN_PROGRAM_MARK_ADDR地址位上写入Tian

DSP通过什么语句实现

  • 你好,如果您是要在flash中写入数据的话,TI提供有API专门用于flash管理。下面是指南和相关例程:

    TMS320F2837xD Flash API Version 1.54 Reference Guide (Rev. A)

    在C2000ware中我们提供有相关例程:

    C:\ti\c2000\C2000Ware_4_02_00_00\device_support\f2837xd\examples\dual\flash_programming

  • 你看不懂我说的是什么?能不能认真看,不是去写FLASH,是定义的时候直接定义再固定的FLASH位置,编译器编译出来的bin文件在固定的FLASH地址就有这个标志!不是用程序去写!!!

  • 好的,我询问下资深工程师,一旦有回复立即回复您。

  • 你好,如果要将 OTP 中的任何内容(如 BOOTCTRL)作为可执行文件的一部分进行编程,可以使用#pragma DATA_SECTION 指令定义常量变量(如下面显示的 Z1_BOOTCTRL_VALUE)并将该变量分配到段(如下面显示的 Z1_BOOTCTRL_SECTION)。 

    #pragma DATA_SECTION (Z1_BOOTCTRL_value, "Z1_BOOTCTRL_section");
    volatile const long Z1_BOOTCTRL_value = 0x00000C5A;

    在链接器命令文件中,应使用源地址和长度(如下面显示的 Z1_BOOTCTRL_OTP)定义存储器映射段,以便映射到该段。 
    MEMORY
    {
    PAGE 1 :
    Z1_BOOTCTRL_OTP  : origin = 0x7801E, length = 0x2
    }
    SECTIONS
    {
    Z1_BOOTCTRL_section : > Z1_BOOTCTRL_OTP, PAGE = 1
    }
    如果您希望在开发过程中对其进行一次编程,但还不需要将其作为可执行文件的一部分,则可以使用 CCS 片上闪存插件 GUI (CCS 调试视图->工具->片上闪存)对用户 OTP 字段进行编程。
     
    请告诉我这否有帮到您。