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/MSP430G2553:如何使用小数位数#Pragma向量

Guru**** 2535750 points
Other Parts Discussed in Thread: MSP430G2553

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/580756/ccs-msp430g2553-how-to-pragma-vector-using-decimals

部件号:MSP430G2553

工具/软件:Code Composer Studio

我正在使用具有CCS最新版本的MSP430G2553 MCU。 我的SW1 (WFP 1.3)触发一个中断,LED指示灯将在该事件中闪烁。

我有兴趣编程 #Pragma Vector = Port1_Vector,而不使用" Port1_Vector ",而是使用给定地址0FFE4的数据表。  

我写道:

#Pragma矢量= 0FFE4

__interrupt void Port1_ISR (void){

//闪烁LED

}  

但这并不奏效。

这个问题是为了教育目的。 我希望得到一个解释性的答复。  

非常感谢。

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

    Port1_vector是一个普通的预处理程序符号。 要查看其实际值,请查看MSP430‍g2553.h文件。

    #‍pragma引导程序需要引导程序编号,而不是地址。 编译器将指向中断函数的指针放置在名为"_interrupT_vector_x"的节中;然后,链接程序脚本负责将这些节放置在正确的地址。