Data will not fit in the region 'SRAM'

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

Data will not fit in the region 'SRAM'

2,419 次查看
SVA-Vending
Contributor II

Getting this compiler error.  Data will not fit in the region 'SRAM' 
How can I correct this or increase the SRAM size.

SVAVending_0-1660915233724.png

 

标记 (1)
0 项奖励
回复
5 回复数

2,384 次查看
frank_m
Senior Contributor III

The error message suggests you are declaring huge arrays in RAM. Such a strategy works on PCs with virtually unlimited memory, but not microcontrollers.

Change the used algorithms to get along with the resources the MCU has.

I never once had an embedded project were the project management picked the largest and most expensive controller, just to allow for simplest coding.

0 项奖励
回复

2,404 次查看
SynBilly
Contributor III

Ok, sorry. I just thought it might be related to that.
I had a similar "RAM overflow" problem (but which ended up being related to CAN) and the following posts helped me:

https://community.nxp.com/t5/LPC-Microcontrollers/Linker-fail-LPC55/m-p/1355863#M46793 

https://community.nxp.com/t5/LPC-Microcontrollers/CAN-base-address-align-restriction-in-LPC55/m-p/14... 

0 项奖励
回复

2,409 次查看
SynBilly
Contributor III

Dear SVA-Vending, are you using CAN and have you used the CONFIG TOOL to initialize the CAN module?

0 项奖励
回复

2,407 次查看
SVA-Vending
Contributor II

Hi SynBilly, 
I am not using CAN at all.

Here is what I am getting.

SVAVending_0-1660942753661.png

 

 

Thanks

0 项奖励
回复

2,415 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

HI SVA-Vending 

Please go to project setting to increase RAM size

ZhangJennie_0-1660919499672.png

 

Please make sure the new defined range is inside the legal RAM memory.

Best Regards

Jennie

0 项奖励
回复