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.

TMS320F28335: CMD文件怎么添加一段CONST 数据,到指定的FLASH空间中

Part Number: TMS320F28335

在自己做bootloader时,需要在APP程序的开头和结尾写固定指纹信息,这个怎么通过CMD文件配置写入呢

  • 你好,抱歉没有接触过这方面的操作。

    不知道你的指纹信息是在程序运行过程中进行写入的,还是在boot的时候就要写入?

  • 我是想通过APP程序,写一个CONST 数据在一个特定地址,比如如果是ARM 处理器就可以在程序中这么写

    const APP_FingerStartPrintType SW_Infor __attribute__((at(0x08008100))) ={
    .Version[0] = 0x01,
    .Version[1] = 0x01,
    .ConstantVal1 = Fingerprint_Constant1,
    .APPFigerEndAddr = 0x08014800
    };

    这个结构体数据就会放在0x8008100的Flash地址下

  • 问题解决了 使用

    #pragma DATA_SECTION(AppSt_Infor,"FingerPrint");
    const APP_FingerStartPrintType AppSt_Infor ={
    .Version[0] = 0x01,
    .Version[1] = 0x01,
    .ConstantVal1 = Fingerprint_Constant1,
    .APPFigerEndAddr = 0x00327f00
    };

    实际感觉const不用也没问题 cmd PAGE 0 增加

    PAGE 0: /* Program Memory */

    FLASHD : origin = 0x320000, length = 0x007F00 /* APP */
    FLASHC : origin = 0x328030, length = 0x007FD0 /* APP */
    FLASHA : origin = 0x338000, length = 0x007F80 /*  reserved  for boot */

    BEGIN       : origin = 0x328020, length = 0x000002     /* APP ENTRY. */

    START_FINGER : origin = 0x328000, length = 0x000020 /* App StartFinger */
    END_FINGER : origin = 0x327f00, length = 0x000060 /* App EndFinger */

    SECTIONS 增加

    FingerPrint : > START_FINGER, PAGE = 0
    FingerPrint_ed : > END_FINGER, PAGE = 0

  • 开始编译有问题 是#pragma DATA_SECTION(AppSt_Infor,"FingerPrint");

    FingerPrint必须用引号