|
IAR FOR AVR编译时候出现错误
错误提示如下:
Error[e16]: Segment CSTACK (size: 0x20 align: 0) is too long for segment definition. At least 0x2 more bytes needed. The problem occurred while processing the segment placement command "-Z(DATA)CSTACK+_..X_CSTACK_SIZE=_..X_SRAM_TBASE:+_..X_SRAM_TSIZE", where at the moment of placement the available memory ranges were "DATA:e2-ff"
Reserved ranges relevant to this placement:
DATA:60-e1 TINY_Z
DATA:e2-ff CSTACK
网上找了下,说是数据堆栈太小,于是呼找到这个地方
->Sub-tree of type: Interrupt function tree that does not make
: indirect calls
RSTACK CSTACK
| Stack used (prev) : 00000000 00000000
01 Timer0_Ovf
| Stack used (prev) : 00000000 00000000
| + function block : 00000002 00000005
<-Sub-tree of type: Interrupt function tree that does not make
: indirect calls
| Stack used : 00000002 00000005
->Sub-tree of type: Function tree
RSTACK CSTACK
| Stack used (prev) : 00000002 00000005
04 GetVariable
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
04 SetVariable
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
05 GetVariable
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
| Already listed
05 SetVariable
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
| Already listed
04 IO_RQF
| Stack used (prev) : 00000004 00000005
| + function block : 00000002 00000002
03 GPIO_OUT
| Stack used (prev) : 00000006 00000007
| + function block : 00000002 00000002
03 GPIO_InputManage
| Stack used (prev) : 00000002 00000005
| + function block : 00000004 00000004
04 GetVariable
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
| Already listed
04 SetVariable
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
| Already listed
04 AVR16A_ADCChange
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
03 GPIO_Input
| Stack used (prev) : 00000004 00000005
| + function block : 00000002 00000004
02 App2forIO
| Stack used (prev) : 00000008 00000009
| + function block : 00000002 00000000
03 GetVariable
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
| Already listed
03 SetVariable
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
| Already listed
02 App1forLed
| Stack used (prev) : 00000004 00000005
| + function block : 00000002 00000000
02 AVR16A_Time0Init
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
02 AVR16A_ADCInit
| Stack used (prev) : 00000002 00000005
| + function block : 00000002 00000000
01 main
| Stack used (prev) : 0000000A 00000009
| + function block : 00000002 00000000
<-Sub-tree of type: Function tree
| Stack used : 0000000C 00000009
->Sub-tree of type: Function tree
RSTACK CSTACK
| Stack used (prev) : 0000000C 00000009
01 __low_level_init
| Stack used (prev) : 0000000C 00000009
| + function block : 00000002 00000000
<-Sub-tree of type: Function tree
| Stack used : 0000000E 00000009
->Sub-tree of type: Function tree
RSTACK CSTACK
| Stack used (prev) : 0000000E 00000009
02 __flashcpy
| Stack used (prev) : 0000000E 00000009
| + function block : 00000002 00000000
02 __memclr
| Stack used (prev) : 0000000E 00000009
| + function block : 00000002 00000000
01 __segment_init
| Stack used (prev) : 00000010 00000009
| + function block : 00000002 00000000
<-Sub-tree of type: Function tree
| Stack used : 00000012 00000009
****************************************
* *
* SEGMENTS IN ADDRESS ORDER *
* *
****************************************
SEGMENT SPACE START ADDRESS END ADDRESS SIZE TYPE ALIGN
======= ===== ============= =========== ==== ==== =====
INTVEC CODE 00000000 - 00000027 28 com 1
?FILL1 CODE 00000028 - 00000053 2C rel 0
CODE CODE 00000054 - 00000A13 9C0 rel 1
INITTAB CODE 00000A14 - 00000A19 6 rel 0
ABSOLUTE DATA 0000001C rel 0
DATA 0000001D
DATA 0000001E
DATA 0000001F
DATA 00000024 - 00000027 4
DATA 00000031 - 0000003B B
DATA 00000052 - 00000053 2
DATA 00000059 - 00000059 1
DATA 0000005F - 0000005F 1
TINY_I DATA 00000060 dse 0
TINY_Z DATA 00000060 - 000000E1 82 rel 0
CSTACK DATA 000000E2 - 000000F1 10 dse 0
RSTACK DATA 000000F2 - 00000111 20 dse 0
****************************************
* *
* END OF CROSS REFERENCE *
* *
****************************************
2 542 bytes of CODE memory (+ 44 range fill )
178 bytes of DATA memory (+ 19 absolute )
Errors: none
Warnings: none
将data stack 改为0x80 尝试后不行,改为0x10却能正常编译。。。。。。datastack 这里到底需要多大?另外map文件里 用到的data stack也不多嘛,
怎么会报这个错误。。。。。。各位莫友麻烦指导下。。。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|