This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请问存在flash中的数据如何初始化?

我想在2812的flash里存比较大的数组,程序运行时查询数组里的值。于是定义了.tired类型,存储在FLASHB中,map里显示FLASHB中确实被占用。

-------cmd指令----------------------------- 

 .tired       : > FLASHB      PAGE = 1

-----------主函数开头方式1-------------------

#pragma DATA_SECTION(tiredata1,".tired");

const int tiredata1[1000]={5255,55525};

结果数组的前两个元素可以赋值为整数,但不能赋值为Q格式数。

-----------主函数开头方式2-------------------

#pragma DATA_SECTION(tiredata1,".tired");

_iq15 tiredata1[1000]={5255.6,55525.6};

结果数组的前两个元素没有赋初值,均为flash擦写后的0XFFFFFFFF

1请问用CCS烧程序时给flash赋值,需不需要在声明的数组前面加const?

2请问声明变量的时候可不可以用Q格式数据?