• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問C30 attribute的問題
#2
版主
版主


查看用戶資訊
參照:
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?
//------------------------------------------------------

有些知道的先回: 剛好相反,persistent 是告訴C30的啟動模組不要對 PrevData[5]作任何的清除或初始值的設定動作。一般是作為 Warm Start 的變數區域。

參照:
Align begin or end to a multi-byte boundary
char __attribute__((aligned(32))) MyArray[18];
int __attribute__((reverse(64))) EndArray[25];

aligned(32) 是臨界位址的界定,(32)的意思為2的5次方等於32, 也就是說本變數的起始位址必須為 B0~b4 為零的邊界位址開始,如界定 Self-Programming 的 Block start Address.
reserve(64) 是保留 64 Bytes 位址給 EndArray 陣列。

發表於: 2007/9/3 10:57
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問C30 attribute的問題
#1
新會員
新會員


查看用戶資訊
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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------