168_lee
驱动牛犊
驱动牛犊
  • 注册日期2004-06-27
  • 最后登录2006-10-24
  • 粉丝0
  • 关注0
  • 积分15分
  • 威望2点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
阅读:3296回复:3

请教c5510中page boundary的问题

楼主#
更多 发布于:2005-08-04 16:37
  我定义了一个比较大的全局数组 long[128][500] , 编译时显示下面的错误

>>   error: .bss section (0x0) spans page boundary: not allowed in small model
>>   error: errors in input - ./Debug/sample.out not built

我换了large model也显示 error: .bss section (0x0) spans page boundary:
很显然时.bss超过了64k的page容量. 这个问题我在网上找了很长时间都无法解决方法.
有哪位高手能够指点一下吗? 我必须要用这么大的空间存储数据
firegod
驱动牛犊
驱动牛犊
  • 注册日期2005-08-05
  • 最后登录2005-08-05
  • 粉丝0
  • 关注0
  • 积分4分
  • 威望2点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-08-05 17:59
直接这样申明数组,编译器会在.bss段开辟内存空间,通常.bss段没有这样大的空间,因此即使在大模式下仍然会错误。
如果采用将该数组分配到其他足够大的存储段内,
#pragma DATA_SECTION (变量名, ".TestSec$data")
这样编译只会产生一个warning~
 warning: .TestSec$data section (0x60000) spans page boundary
firegod
驱动牛犊
驱动牛犊
  • 注册日期2005-08-05
  • 最后登录2005-08-05
  • 粉丝0
  • 关注0
  • 积分4分
  • 威望2点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2005-08-05 18:02
实际上还有一种方法,直接指定一块存储区,将变量指针指向存储区地址就可以了。
访问时需将数组二维下标映射到存储地址偏移值~
lyingying
驱动牛犊
驱动牛犊
  • 注册日期2003-03-20
  • 最后登录2007-09-12
  • 粉丝0
  • 关注0
  • 积分60分
  • 威望6点
  • 贡献值0点
  • 好评度6点
  • 原创分0分
  • 专家分0分
地板#
发布于:2007-08-31 13:27
TI c55x has a problem that its pointer wrap around over 32k (or 16k, I forget the number) boundary -- therefore, you have to put any of your data section less than a section. Any data structure has to be within that limit as well. Ask TI for this "undocumented feature"

split your array is your best bet.


By the way, you can disable the boundary wrap check in simulator on CCS setup -- I guess you only get this message by using simulator as on board, you get the wrong data without such message
游客

返回顶部