How to kill the memory size limit for the variable?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to kill the memory size limit for the variable?

ソリューションへジャンプ
2,380件の閲覧回数
guohuoping
Contributor II

In the KDS IDE, I define a variable as follows:

#define MAX_DATA_LENGTH

(1024*40)

uint8 pic_data[MAX_DATA_LENGTH];

 

When I build the project, compiler push these problem

17070_17070.bmp2014-11-28_153109.bmp

I watch the .map file, I got the message as follow

17071_17071.bmp2014-11-28_153038.bmp

So I think, the compiler have the limitation size of 0x00008000 ,and I define the variable pic_data whitch overlow the limit.

Unfortunately, I have to define this variable which need to have buffer size of 40*1024 byte.

Also, I select the MCU part number MK10DX256VLH7, and it has ram size of 64k byte. I am sure the variable size is in the physical limit.

Can you tell me how to change the memory configuration!

 

消息编辑者为:guo huoping

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
1,915件の閲覧回数
BlackNight
NXP Employee
NXP Employee

See as well the comments section in

http://mcuoneclipse.com/2013/07/10/freertos-heap-with-segmented-kinetis-k-sram/

It would be possible that you combine the two memory areas, as long you do not have misaligned accesses.

Then you can have one piece of 64 KByte memory.

For this, remove the m_data_2000000 from the linker file and just use one 64 KByte data segment.

Erich

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,915件の閲覧回数
BlackNight
NXP Employee
NXP Employee

You can allocate that variable in the m_data_2000000 area:

static uint8 __attribute__((section (".m_data_20000000"))) pic_data[MAX_DATA_LENGTH];

see

http://mcuoneclipse.com/2013/07/10/freertos-heap-with-segmented-kinetis-k-sram/

I hope this helps,

Erich

0 件の賞賛
返信
1,915件の閲覧回数
guohuoping
Contributor II

Hi Erich:

Thank You!

0 件の賞賛
返信
1,916件の閲覧回数
BlackNight
NXP Employee
NXP Employee

See as well the comments section in

http://mcuoneclipse.com/2013/07/10/freertos-heap-with-segmented-kinetis-k-sram/

It would be possible that you combine the two memory areas, as long you do not have misaligned accesses.

Then you can have one piece of 64 KByte memory.

For this, remove the m_data_2000000 from the linker file and just use one 64 KByte data segment.

Erich

0 件の賞賛
返信
1,915件の閲覧回数
guohuoping
Contributor II

Thank you very much!

0 件の賞賛
返信