英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流

标题: CCS中使用了75%容量,但是再也无法加代码了 [打印本页]

作者: winnie    时间: 2009-4-26 11:47
标题: CCS中使用了75%容量,但是再也无法加代码了
芯片是877,它提示ROM满了,可能是某个程序段满了,怎样才能把某些程序放到比较空的程序段里阿?
作者: winnie    时间: 2009-4-26 11:47
用 #separate 切割程序,放到不同的 page 去
#SEPARATE


Syntax:
#separate



Elements:
None



Purpose:
Tells the compiler that the procedure IMMEDIATELY following the directive is to be implemented SEPARATELY.  This is useful to prevent the compiler from automatically making a procedure INLINE. This will save ROM space but it does use more stack space. The compiler will make all procedures marked SEPARATE, separate, as requested, even if there is not enough stack space to execute.



Examples:
#separate

swapbyte (int *a, int *b) {

int t;

   t=*a;

   *a=*b;

   *b=t;

}



Example Files:
ex_cust.c



Also See:
#inline




欢迎光临 英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 (http://enroobbs.com/) Powered by Discuz! X3.2