• 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: auto 變數
#2
管理員
管理員


查看用戶資訊
你好:
這個120Byte 的限制來自於MPLAB C18,詳情可以參考MPLA C18的User's Manual。可以在C:\MCC18\doC\裏面找到;以下是我摘錄下來的片段,在附錄E中:

E.1.1 Stack Frame Size
When the compiler is operating in Extended mode, the total stack frame size (local
variables, parameters and frame pointer preservation) is limited to 96 bytes per
function. In Non-Extended mode, for each function 120 bytes are available for locals
and an additional 120 bytes are available for parameters.

所以啦,只有120Byte的空間可以給Local變數而己。

發表於: 2006/6/8 14:17
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


auto 變數
#1
新會員
新會員


查看用戶資訊
各位前輩:
C18 在.lkr 中 STACK SIZE=0x100 RAM=gpr3
可是在程式呼叫的function中只宣告 auto 變數
char buffer[200];
compile時候 產生size too large 之error
stack size 為256byte 不是可以宣告
char buffer[256]嗎?
如果 char buffer[120];
則compile 正常
請問為何無法大於120 ? 程式中沒再宣告其他變數
何處可以更改此限制?



發表於: 2006/6/6 22:13
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... ]

教育訓練中心

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