Browsing this Thread:
1 Anonymous Users
Topic options
View mode
舊的在前
Re: auto 變數
管理員
Joined
: 2004/4/28 19:29最後登入時間
: 9/26 23:19
Group:
註冊會員 站務管理者
Level : 18
HP : 0 / 429
MP : 127 / 25647
EXP : 19
你好: 這個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
auto 變數
新會員
Joined
: 2006/2/4 23:50最後登入時間
: 2009/10/23 15:49
Group:
註冊會員
Level : 3
HP : 0 / 52
MP : 6 / 2848
EXP : 9
各位前輩: 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
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.