Skip to main content
mikkel nielsen
Associate II
Sep 18, 2018 2:34 PM UTC
Question

`RAM' overflowed by 2544 bytes

hi

i have got a problem, i never have seen before, the errors is showed on image

hope some have an idea have to solve this problem.

i use atollic truestudio

    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    Sep 18, 2018 2:36 PM UTC

    Use less RAM?

    Avoid huge static allocation or global variables.

    Tables that never change? Keep in flash and use "static const" prefix

    Check your .MAP file to find biggest offenders.

    Check your linker script adequately describes the part you're actually using.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Jeroen3
    Senior
    Sep 19, 2018 9:29 AM UTC

    @Community member​ note that the static keyword does not define how const something is. Static applies to the scope or lifetime of an object.

    Tesla DeLorean
    Guru
    Sep 19, 2018 1:11 PM UTC

    Believe me, it is a very effective method across many toolchains/platforms to ensure, for example, a table in a function isn't copied to RAM, and at a linker level it prevents the symbol from being overloaded/overridden. So at worst the use of "static const" is harmless, and in the usual cases it ensures desired behaviour.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    mikkel nielsen
    Associate II
    Sep 24, 2018 8:13 AM UTC

    i have check my .MAP but i did not find anything that was so big, so do you have another idea, but thanks