CC430中使用const将数组定义到FLASH中的问题?

2019-08-05 16:19发布

CC430F5137的RAM很小,一些大的数组需要定义到flash中,以节省RAM的空间,使用const关键字可以将数组定义到flash中,sin_tab[512]和cos_tab[512]两个数组,按照此种方法操作,
const float sin_tab[512]=
{
0, 0.0061, 0.0123, 0.0184, 0.0245, 0.0307, 0.0368, 0.0429, 0.0491, 0.0552,
0.0613, 0.0674, 0.0736};
但是编译报错
Error[e16]: Segment DATA16_Z (size: 0x20df align: 0x1) is too long for segment definition. At least 0x10e1 more bytes  needed. The problem occurred while processing the segment placement command"-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,TLS16_I,DATA16_HEAP+_DATA16_HEAP_SIZE=1C00-2BFD", where at the moment of placement the available memory ranges were "CODE:1c00-2bfd"    Reserved ranges relevant to this placement: 1c00-2bfd            DATA16_I
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。