I am working with IAR’s STM32F746 development board where I have 3 regions of RAM: 64k very fast access internal RAM (for internal variables and structures), 256k of fast access internal RAM (defined as heap as of now) and 32M of external SDRAM which is big but quite slow (currently taking 22 clock cycles at 216MHz for a 32-bit read operation as the board connects the SDRAM chip to the uC via a 16-bit data bus and bursts are not supported by the SDRAM controller). I want to have my heap extended in SDRAM, too, and this would actually be quite straightforward with heap regions introduced in heap_5.c… The problem is that i want to control at run time whether internal RAM or external RAM gets allocated when malloc is called (I need dynamic allocation for fast as well as for slow memories).
Is it planned to have such a memory allocation flavour, too, like heap_6.c maybe? At the moment I have tailored heap_4.c for internal RAM and heap_5.c for external RAM, but this is more like a dirty hack than a nice clean solution… I do not want to have modified FreeRTOS code in my project and I also would be happy to avoid having 3rd party malloc libraries.
Thanks for any ideas in advance and best regards,