winnie 发表于 2009-4-26 11:47:23

CCS中使用了75%容量,但是再也无法加代码了

芯片是877,它提示ROM满了,可能是某个程序段满了,怎样才能把某些程序放到比较空的程序段里阿?

winnie 发表于 2009-4-26 11:47:38

用 #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
页: [1]
查看完整版本: CCS中使用了75%容量,但是再也无法加代码了