cancel
Showing results for 
Search instead for 
Did you mean: 

SDRAM overflowed

idrissmc
Associate III

Hello everyone,

I faced an error with my .ld file. the .sdram_section will not fit into the SDRAM (8MB)

how to solve this?

thanks

0693W000003POpFQAW.png

18 REPLIES 18

> I faced an error with my .ld file. the .sdram_section will not fit into the SDRAM (8MB)

That's not problem with the .ld file, it's a problem with your program. You try to put too many things into the SDRAM.

JW

How to solve it then?

Reduce the number of data you are trying to put it in there.

How do you solve if the files won't fit onto your USB FLASH stick?

How do you solve, if the baggage won't fit into your car?

JW

Yes but I can’t, If i do so, I’ll lose data and then the image on screen will be whatever

Figure out why you need 12MB+ of RAM

What are you using it for?

Can you fold any of the usage? ie does it all need to be used concurrently, or could it be shared or allocated dynamically.

Put static images into QSPI Flash.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Try write here declaration of sdram arrays or check if you use proper types.

Example: RGB888 need unsigned char fb[WxHx3], when you write only unsigned you reserve 4xbigger buffer as you need.

those data will go into SDRAM0693W000003PP2TQAW.png0693W000003PP2OQAW.png0693W000003PP2JQAW.png0693W000003PP2EQAW.png0693W000003PP29QAG.png0693W000003PP24QAG.png0693W000003PP1zQAG.png

@clive1​ I tried but it breaks at some address. How can I see the code of a given address? @Community member​ 

Look in the .MAP file for the function nearest to the failure

You can also generate a listing file (.LST or .LSS type thing), and find the address/code in there.

If the SDRAM can't hold all the data you either need to make smaller demands on it, or get a board with more memory

When the Linker fails, you could make the SDRAM size larger in the linker script, you'd do this temporarily so you can see who is eating all the resources in the .MAP file.

You're not going to be able to hold millions of floats, each takes 4 bytes

Going to need to be realistic about the constraints of the embedded system. You don't have GB's of space to work with

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..