为什么keil用__at()在固定地址定义const常量时RO-data数量会增加?
[复制链接]
const u8 HZK16[] /*__at(0x08020000)*/ ={ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
#ifdef FONTS
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,48,0,30,0,15,0,7,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,60,0,102,0,102,0,102,0,60,0,0,0,
............................
}//此为字库
此时编译
Program Size: Code=47628 RO-data=131344 RW-data=548 ZI-data=21228
FromELF: creating hex file...
".\out\Center.axf" - 0 Error(s), 0 Warning(s).
然后
const u8 HZK16[] __at(0x08020000) = {
..............................
}和上面为同一字库
此时编译
Program Size: Code=47628 RO-data=212628 RW-data=548 ZI-data=21228
FromELF: creating hex file...
".\out\Center.axf" - 0 Error(s), 0 Warning(s).
其中两次RO-data差距很大.基本上差了一个字库的数据量,这是为什么呢?
|