打印

如何才能把const定义的常量数组定位在FLASH空间?

[复制链接]
4106|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
yzzly|  楼主 | 2009-7-11 10:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我的F2812系统有一些用const定义的字库数组常量,例如:
const        zi[32]={0x00,0x00,0x00,0xF8,0x48,0x48,0x4C,0x4B,0x4A,0x48,0x48,0x48,0xF8,0x00,0x00,0x00,
                    0x00,0x00,0x00,0xFF,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xFF,0x00,0x00,0x00};//自
const      shou[32]={0x00,0x24,0x24,0x24,0x24,0x24,0x24,0xFE,0x22,0x22,0x22,0x22,0x22,0x20,0x00,0x00,
                    0x02,0x02,0x02,0x02,0x02,0x42,0x82,0x7F,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00};//手
const      dong[32]={0x20,0x24,0x24,0xE4,0x24,0x24,0x24,0x20,0x10,0x10,0xFF,0x10,0x10,0xF0,0x00,0x00,
                    0x08,0x1C,0x0B,0x08,0x0C,0x05,0x4E,0x24,0x10,0x0C,0x03,0x20,0x40,0x3F,0x00,0x00};//动
const      kong[32]={0x08,0x08,0x08,0xFF,0x88,0x48,0x00,0x98,0x48,0x28,0x0A,0x2C,0x48,0xD8,0x08,0x00,
                    0x02,0x42,0x81,0x7F,0x00,0x00,0x40,0x42,0x42,0x42,0x7E,0x42,0x42,0x42,0x40,0x00};//控
const       zhi[32]={0x00,0x50,0x4F,0x4A,0x48,0xFF,0x48,0x48,0x48,0x00,0xFC,0x00,0x00,0xFF,0x00,0x00,
                    0x00,0x00,0x3F,0x01,0x01,0xFF,0x21,0x61,0x3F,0x00,0x0F,0x40,0x80,0x7F,0x00,0x00};//制
const       can[32]={0x20,0x20,0x28,0x2C,0xAA,0x6B,0x38,0xAC,0x24,0x64,0xA6,0x2C,0x20,0x20,0x00,0x00,
                    0x02,0x42,0x45,0x55,0x52,0x4A,0x29,0x24,0x24,0x12,0x12,0x09,0x0B,0x06,0x02,0x00};//参
const       shu[32]={0x10,0x92,0x54,0x38,0xFF,0x38,0x54,0x52,0x80,0xF0,0x1F,0x12,0x10,0xF0,0x10,0x00,
                    0x42,0x42,0x2A,0x2E,0x13,0x1A,0x26,0x02,0x40,0x20,0x13,0x0C,0x33,0x60,0x20,0x00};//数
const       she[32]={0x40,0x41,0xCE,0x04,0x00,0x80,0x40,0xBE,0x82,0x82,0x82,0xBE,0xC0,0x40,0x40,0x00,
                    0x00,0x00,0x7F,0x20,0x90,0x80,0x40,0x43,0x2C,0x10,0x10,0x2C,0x43,0xC0,0x40,0x00};//设
const      zhi1[32]={0x00,0x20,0x2F,0xA9,0xA9,0xAF,0xE9,0xB9,0xA9,0xAF,0xA9,0xA9,0x2F,0x20,0x00,0x00,
                    0x80,0x80,0x80,0xFF,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xFF,0x80,0x80,0x80,0x00};//置
等,虽然在CMD外交内加了:
.const              : > FLASHI      PAGE = 0
但是,观察memory是,这些数组还是在RAM区。

相关帖子

沙发
yxwsz| | 2009-7-11 23:26 | 只看该作者

re

把text也加进去试试;
.const              : > FLASHI      PAGE = 0
.text              : > FLASHI      PAGE = 0


BTW, 你定义的数组,没有类型,编译能够通过吗?

使用特权

评论回复
板凳
yzzly|  楼主 | 2009-7-13 09:39 | 只看该作者

编译时没有问题的,并且整个系统可以工作。

使用特权

评论回复
地板
yzzly|  楼主 | 2009-7-13 09:48 | 只看该作者

不管怎么做,我希望把LCD显示字库放在FLASH,该怎么做?谢谢

不管怎么做,我希望把LCD显示字库放在FLASH,该怎么做?谢谢!

使用特权

评论回复
5
yzzly|  楼主 | 2009-7-29 17:21 | 只看该作者

怎么没有人回答呢?难道没有人这么做?

怎么没有人回答呢?难道没有人这么做?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

427

主题

1178

帖子

3

粉丝