2023-04-14 01:07 PM
Hi,
is it possible to use the external RAM as a heap. I would like to do malloc and free on it. I was able to set an huge array on it by little modifying the linkerscript, but that is not really handy because than you have to do the mem managing.
Have seen some description, which basically changes the _sbrk file but not able to get it work.
2023-04-14 01:54 PM
The way ST uses the GNU/GCC compiler it kind of assumes the stack and heap are in the same region, and bound each other. You really don't want the stack in "slow" memory as it impedes everything the processor does.
You'd need to bring up the external RAM, notionally with code in SystemInit(), or called by, that initializes the pins and FSMC, etc. Otherwise the MCU will fault. I might recommend looking at the earlier SPL examples which were contemporaneous with the release of the board.