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.

#pragma SET_DATA_SECTION 无法得到想要的结果

Other Parts Discussed in Thread: MSP430FR6989

你好,

我使用的是CCS v9,MSP430 compiler v18,板子是 MSP430FR6989

我在把变数指定到特定的memory location时,无法得到正确的结果。

以下是我的程式码:

#pragma SET_DATA_SECTION(".infoD")
int x;
#pragma SET_DATA_SECTION()

int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer

x = 5;

return 0;
}

以下时我的hex TI-txt output:

.infoD的位置应该是   

INFOD                   : origin = 0x1800, length = 0x0080

请问这是什么原因?另我更动了 Properties -> Debug -> Erase Options -> Erase main and information memory, 谢谢~