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

 找回密码
 立即注册
搜索
电子烟方案单片机单片机开发深圳单片机开发
单片机方案国产单片机8位单片机电子烟方案开发
查看: 3624|回复: 1
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
1#
发表于 2009-4-26 11:47:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
芯片是877,它提示ROM满了,可能是某个程序段满了,怎样才能把某些程序放到比较空的程序段里阿?
2#
 楼主| 发表于 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 下一条

小黑屋|公司首页|Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 ( 粤ICP备09008620号 )

GMT+8, 2024-5-2 10:52 , Processed in 0.051991 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表