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.

[参考译文] MSP430FR2111:我想在 FRAM 中的特定地址存储一个变量。

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1029969/msp430fr2111-i-want-to-store-a-variable-at-a-specific-address-in-fram

器件型号:MSP430FR2111

我使用的是 CCS 10.2.0。

我遵循了 slaa628b 文档中的"修改链接器文件示例3"。
下面是我的.cmd 文件的一部分。

当我在构建后查看.map 文件时、它显示为0。
该值似乎未保存。

我有什么问题吗?
请回答。

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

    当然、main.c 也如下所示声明变量。

    #pragma DATA_SECTION (A、".Image")
    unsigned char a;

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

    您好!

    您是否还在 main.c 中为 A 分配了数据、例如 A = 0x01;?

    此致、

    现金 Hao

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

    #pragma RETAIN ("name")
    这是一个问题。
    谢谢您