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.

[参考译文] CCS/MSP430FR2433:为什么中缺少持久性静态变量。 映射文件?

Guru**** 2563960 points


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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/731905/ccs-msp430fr2433-why-is-a-persistent-static-variable-missing-from-map-file

器件型号:MSP430FR2433

工具/软件:Code Composer Studio

// wierd?
//文本"bar"不会出现在.map 中,尽管存储似乎是以匿名方式分配到 TI.persistent 段中的0xC400
#pragma PERSISTENT
STATIC int bar=1;


//正常
//文本"zed"出现在.map 中,存储似乎是在0xC402
#pragma PERSISTENT
INzed=2的 TI.persistent 段中; 

这不是一个大问题。  我在寻找另一个问题时注意到的一点。  符号栏不在.map 文件中是否有原因?

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

    默认情况下、静态变量不会出现在映射文件中。  要查看它们,请将选项 --mapfile_contents=sym_defs 添加到链接命令中。

    谢谢、此致、

    乔治