請問C30 attribute的問題
|
||||
---|---|---|---|---|
新會員
|
Dear 版主,
想請問一下attribute的問題 ,這是從203剪下來的 //------------------------------------------------------ Place in a specific section or space int Abc __attribute__((section(“ThePlace”))); int Def __attribute__((space(psv))); New section will be created, if needed ThePlace這section要自己這個名稱,但是要在哪裡建立呢? //------------------------------------------------------ Align begin or end to a multi-byte boundary char __attribute__((aligned(32))) MyArray[18]; int __attribute__((reverse(64))) EndArray[25]; 不太懂aligned和reverse的用法, 用watch windows看過這兩個陣列, 看不出哪裡不同? //------------------------------------------------------ Allow linker to fill memory gaps char __attribute__((unordered)) MidArray[15]; Allows linker to move variable unordered是代表這陣列可以移動嗎???? //------------------------------------------------------ Maintain data through reset int __attribute__((persistent)) PrevData[5]; C30 startup code will not initialize to zero Can maintain state information through reset Not for power cycle persistent在這指的是一開始Inital完會把PrevData陣列都清 為0? //------------------------------------------------------ 還有像boot, packed, noload, weak的用法? 感謝您的撥空回答
發表於: 2007/8/31 23:43
|
|||
|