2026-02-05 11:44 PM - last edited on 2026-02-06 12:04 AM by mƎALLEm
Hello,
Using controller: STM32F767BIT6
External SRAM: SRAM-1x16M-48TSOPI
Interface SRAM via FMC is successful, currently using heap_4 and tried to work with moving variables & complete heap to external SRAM and it works.
But I want to use external RAM as extended RAM if internal RAM get exhaust.
I have seen some examples in Keil which allow to do the same by using .ANY
.ANY (+RW +ZI)
So, this will allow to use runtime RAM if it is free, so just for thoughts, if I define .ANY in internal and external RAM then in runtime it will decide where to go based the available size.
But in STM32CubeIde, not sure how it can be done.
So, I need help or examples to understand how we can actually use external SRAM as extended RAM.
Thanks,
Nitin
2026-02-06 1:07 AM
CubeIDE uses gcc and AFAIK there's no such automatic rearrangement of variables location in gcc, so you'd need to allocate "excessive" variables to the external RAM manually.
JW