Data will not fit in the region 'SRAM'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data will not fit in the region 'SRAM'

991 Views
SVA-Vending
Contributor I

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

 

Tags (1)
0 Kudos
5 Replies

956 Views
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 Kudos

976 Views
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 Kudos

981 Views
SynBilly
Contributor III

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

0 Kudos

979 Views
SVA-Vending
Contributor I

Hi SynBilly, 
I am not using CAN at all.

Here is what I am getting.

SVAVending_0-1660942753661.png

 

 

Thanks

0 Kudos

987 Views
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 Kudos