m_data overflow error

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

m_data overflow error

跳至解决方案
2,153 次查看
brycelembke
Contributor III

I am using the K10DX128VFT5 which has 16k of RAM.

 

Upon build, I am getting the error:

'._user_heap_stack' will not fit in region 'm_data'

 

In the map file I see:

 

Name             Origin             Length             Attributes

m_interrupts     0x00000000         0x000000f8         xr

m_text           0x00000410         0x0001fbf0         xr

m_data           0x1fffe000         0x00002000         rw

m_data_20000000  0x20000000         0x00002000         rw

m_cfmprotrom     0x00000400         0x00000010         xr

*default*        0x00000000         0xffffffff

 

I see here that m_data is 8k and m_data_20000000 is 8k. How do I get the linker to use m_data_20000000 as well for the _user_heap_stack segments. I have tried making m_data larger than 8k and m_data_20000000 smaller by the same amount, but I get other errors.

 

Perhaps I should be asking, what is the appropriate way to take advantage of the full 16k of RAM?

 

Bryce

标签 (1)
0 项奖励
回复
1 解答
1,104 次查看
brycelembke
Contributor III

I found the answer, I'll post in case anyone has the same question.

If you disable the m_data_20000000 area, then you can make the m_data area the full 16k.

MemoryAllocation.png

Bryce

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,105 次查看
brycelembke
Contributor III

I found the answer, I'll post in case anyone has the same question.

If you disable the m_data_20000000 area, then you can make the m_data area the full 16k.

MemoryAllocation.png

Bryce

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

Be careful: you need to ensure that no object is crossing that 0x2000'0000 boundary. There are two different memory controllers on the Kinetis K, and access to each section/segment needs to be separate. That's why there are two different sections in the linker file, to ensure that no object (e.g. variable, struct, array) is crossing that 0x2000'0000 border.

See FreeRTOS Heap with Segmented Kinetis K SRAM | MCU on Eclipse

Erich

0 项奖励
回复
1,104 次查看
michaelsteffenf
NXP Employee
NXP Employee

Hi Erich,

I believe this customer is having a similar issue.  Can you confirm?

 

He is using Processor Expert with a MK20DX256LVQ10 target, and have two RAM blocks configured.

What is the optimal FLASH/RM settings to use all of the internal RAM memory.

He has been getting "Overflow in segment : m_data".Each RAM memory page has a size of
0x8000, w
hich gives 64K of RAM space. His project is FLASH based and using the EEPROM

feature of the chip which has a size of 512 bytes.

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

Hi Michael,

Which issue? Which customer?

he needs to find out what is causing this overflow. Obviously, some objects exceed that 32 KByte area. Technically, these devices have two 32 kByte of RAM blocks, not a single 64 KByte of block. So you can make the linker file that way that it has one continuous block, but then he needs to make sure that an object is not crossing that boundary.

0 项奖励
回复