Reported available RAM

Sysprogs forums Forums VisualGDB Reported available RAM

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29078
    Jose Cazarin
    Participant

    Hello! I don’t know if that’s a question I should ask here or at the Nordic forum, so I’ll ask on both

    I’m working with a NRF52840 that has 256KB of RAM

    At the end of the compilation process, Visual Studio reports that I’m using 200K of the 250 KB of RAM available (256K/1024)
    Does that value already include the size that was set aside for the stack and heap? In my case, they are 16K each (so it actually has 218K of available RAM)
    I’m asking this now because it looks like that we cant go over the 200ish K limit of reported used RAM, after that the code still compiles fine, but we start to see weird memory problems
    It looks like a specific call in our code is overwriting the heap/stack and that’s causing undefined behaviours and/or a reboot of the board.
    Even if that’s true, we should be able to go to around 218K of used RAM with no problems

    How is that reported generated? Does it take into account the size for the stack/heap? One other thing that it could be is that this report doesn’t that into account the RAM used by the NRF soft device

     

    Any input will be greatly appreciated

    #29134
    support
    Keymaster

    No problem, we have published detailed documentation on the Memory Explorer window here: https://visualgdb.com/documentation/embedded/memoryexplorer/. It also explains where VisualGDB takes the list of symbols, memories, and how stack/heap are typically placed.

    Note that the nRF5x linker scripts (that control the stack/heap placement) come directly from the Nordic SDK, so please refer to its documentation for details specific to Nordic devices.

    #29185
    Jose Cazarin
    Participant

    Thanks for the answer. I was referring to the report in the screenshot attached. It doesn’t take into account the size of the heap and stack. So I don’t actually have 250KB of RAM available, it’s 250 – stack_size – heap_size.
    Is there any way I can print that value taking into account the size of the stack and the heap?

    Thanks again!

    Attachments:
    You must be logged in to view attached files.
    #29187
    support
    Keymaster

    This report uses the same data source as the Embedded Memory Explorer. Please try searching for “stack” and “heap” in the memory explorer documentation for an explanation how they are handled.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.