can't declare a static matrix bigger than 49x16

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

can't declare a static matrix bigger than 49x16

跳至解决方案
982 次查看
juanignaciotroi
Contributor III

Hello. I am developing using the FRDM KE02 and I have the following problem. In my project, I have a printer in which I need the ascii characters from the 0x20 (space) to the 0x7A (z). This is a total of 91 characters. In orden to print them correctly, each character is a vector of 16 bytes. This is why I need a 91x16 matrix to describe all the characters I need.

 

However, when I want to declare this static matrix as:

 

unsigned int MATRIX_CHARACTERS[91][16 ] = {{},{},...,.{}}; as a global variable, it doesn't compile.

 

The error is: "c:/freescale/cw mcu v10.6/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: region `m_data' overflowed by 2660 bytes"

 

How can I solve this problem?

 

I need this matrix to be static and to be in memory code.

 

Thank you, Juan Ignacio Troisi

标签 (1)
0 项奖励
回复
1 解答
907 次查看
BlackNight
NXP Employee
NXP Employee

Hi Juan,

the error means that you are using more RAM than you have available.

Why is your array an array of int? char should be enough? that would be 4 times less memory :-)

Erich

在原帖中查看解决方案

0 项奖励
回复
1 回复
908 次查看
BlackNight
NXP Employee
NXP Employee

Hi Juan,

the error means that you are using more RAM than you have available.

Why is your array an array of int? char should be enough? that would be 4 times less memory :-)

Erich

0 项奖励
回复