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.

[参考译文] 编译器/MSP430F5418A:关于优化和"volatil"

Guru**** 2535750 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/855405/compiler-msp430f5418a-about-the-optimization-and-volatile

器件型号:MSP430F5418A

工具/软件:TI C/C++编译器

您好!

我的客户使用 MSP430。
他们对优化以及如何编写代码有疑问。

写入如下时、Timer1和 Timer2是否设置为"易失性"?
------------------------
静态易失性
Dstatus Stat = STA_NOINIT;  
 
int Timer1、Timer2;
------------------------
这是一个一般的软件问题、但如果您知道、请告诉我。

(客户使用的编译器版本未知、假设 MSP430 C / C ++ Compiler v18.1.0.LTS。)

此致、Rei

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

    不、它们不是;只有 Stat 是。 它们必须单独指定、例如

    > volatile int Timer1、Timer2;