This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Address of end of RAM section

How can I get the address of the first unused location in RAM to use in my application? My scatter file is below. I have tried using "Image$$RW_IRAM1$$Limit", but this returns the end of initialized data. The zero data is allocated from RAM after this, and I have not been able to find a way to get the end of that address. Is there a way to do this?

Processor: STM32L552

Tools: uVision 5

Scatter file:

; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************


; Vector table
LR_VECTOR_TABLE 0x08000000 0x00000200
{
    ER_VECTOR_TABLE 0x20000000 0x00000200
    {
        *.o (RESET, +First) ; Vector table location in RAM.
    }
}


; load region size_region
LR_IROM1 (0x08000000 + 0x00000200) (0x00080000 - 0x00000200)
{
    ; load address = execution address
    ER_IROM1 (0x08000000 + 0x00000200) (0x00080000 - 0x00000200)
    {
        *(InRoot$$Sections)
        .ANY (+RO)
        .ANY (+XO)
    }

    ; RW data
    RW_IRAM1 (0x20000000 + 0x00000200) (0x00040000 - 0x00000200)
    {
            .ANY (+RW +ZI)
    }
}