[讨论] 12864液晶取模的问题?

成都回锅肉   2014-8-7 12:25 楼主
const unsigned char codenBitmapDot[] =                  // 数据表
{
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x01,0x10,0x00,0x02,0x00,0x80,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x01,0x14,0x0F,0xFF,0x00,0x40,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x0F,0xFE,0x08,0x42,0x1F,0xFF,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
。。。。。。。。。
如果第一句不加const就会出现:
error #10099-D: program will not fit into available memory.  run placement with alignment fails for section "DATA_GROUP" size 0x403 .  Available memory ranges:
   RAM          size: 0x200        unused: 0x1ac        max hole: 0x1ac     
error #10010: errors encountered during linking; "CESHI.out" not built
为啥?

回复评论 (2)

const在430头文件中是定义成了read only ,加const 之后会将数组存入ROM中
点赞  2014-8-7 15:04
过来看看   没有看懂
点赞  2014-8-7 15:57
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复