我用的单片机是PIC30F6014,编程语言是C30的,开始编译程序时成功的,随便增加几条语句后就编译失败,情况如下:
Program Memory Usage
section address length (PC units) length (bytes) (dec)
------- ------- ----------------- --------------------
.reset 0 0x4 0x6 (6)
.ivt 0x4 0x7c 0xba (186)
.aivt 0x84 0x7c 0xba (186)
.text 0x100 0x111c2 0x19aa3 (105123)
.const 0x112c2 0x168a 0x21cf (8655)
.dinit 0x1294c 0x3b8 0x594 (1428)
.isr 0x12d04 0x2 0x3 (3)
Total program memory used (bytes): 0x1c383 (115587) 78%
Data Memory Usage
section address alignment gaps total length (dec)
------- ------- -------------- -------------------
.nbss 0x800 0 0x314 (788)
.ndata 0xb14 0 0x2dc (732)
.nbss 0xdf0 0 0x2aa (682)
.ndata 0x109a 0 0x100 (256)
.nbss 0x119a 0 0xbe (190)
.nbss 0x1258 0 0x8e (142)
.nbss 0x12e6 0 0x72 (114)
.nbss 0x1358 0 0x5a (90)
.nbss 0x13b2 0 0x58 (88)
.nbss 0x140a 0 0x46 (70)
.ndata 0x1450 0 0x28 (40)
.ndata 0x1478 0 0x22 (34)
.nbss 0x149a 0 0x20 (32)
.nbss 0x14ba 0 0x1e (30)
.ndata 0x14d8 0 0x18 (24)
.ndata 0x14f0 0 0x12 (18)
.nbss 0x1502 0 0xe (14)
.ndata 0x1510 0 0xc (12)
.ndata 0x151c 0 0xa (10)
.ndata 0x1526 0 0xa (10)
.ndata 0x1530 0 0x6 (6)
.nbss 0x1536 0 0x6 (6)
.nbss 0x153c 0 0x4 (4)
.ndata 0x1540 0 0x4 (4)
.ndata 0x1544 0 0x2 (2)
.ndata 0x1546 0 0x2 (2)
.nbss 0x1548 0 0x2 (2)
.dconst 0x154a 0 0x8 (8)
Total data memory used (bytes): 0xd52 (3410) 42%
Dynamic Memory Usage
region address maximum length (dec)
------ ------- ---------------------
heap 0 0 (0)
stack 0x1552 0x124e (4686)
Maximum dynamic memory (bytes): 0x124e (4686)
E:\2.12.2\task.o(.text+0x121a): In function `TaskManualCtrlFailed':
E:\2.12.2\task.c:1634: Link Error: relocation truncated to fit: PC RELATIVE BRANCH AppAlarmAdd
Link step failed.
BUILD FAILED: Thu Jan 14 14:21:43 2010
随便删掉几条语句,编译又可以成功了,不知道是什么原因,是不是程序存储空间不够,但上面显示才78%,迷惘中,还请高手赐教! |