HowTo use SDRAM as heap on STM32F429I-DISC1 w/ mbed

22 Jun 2017

Hello all !

Can someone provide me some information on how to use the SDRAM as heap for use with mbed rtx. Changing the heap location in linker-script seems not valid. I get the following link error message: c:/sysgcc/arm-eabi/bin/../lib/gcc/arm-eabi/6.2.0/../../../../arm-eabi/bin/ld.exe: Region RAM overflowed with stack and heap

Target: STM32F429I-DISC1 IDE: VisualStudio w/ VisualGDB example project: LEDBlink w/ mbed from VisualGDB Wizzard

I setup a new memory section: SDRAM (rwx) : ORIGIN = 0xD0000000, LENGTH = 8M

and simply moved the heap section to SDRAM:

    .heap (NOLOAD):
    {
        __uvisor_heap_start = .;
        __end__ = .;
        end = __end__;
        . += HEAP_SIZE;
        __HeapLimit = .;
        __uvisor_heap_end = .;
    } > SDRAM

I set the preprocessor defines DATA_IN_ExtSDRAM and STM32F429xx

Seems that rtx is fixed to a certain memory-structure?

Another thing I stumbled upon is the initialization of the SDRAM. In the provided system_stm32f4xx.x they initialize GPIO H and I for use wth SDRAM. They do not exist on the STM32F429I-DISC1.

Maybe someone can give me a hint?

Thanks in advance. Dirk

22 Jun 2017

Meanwhile I corrected the GPIO initialization according to the schematic of the STM32F429I-DISC1.

02 Sep 2017

I have the same problem。

02 Sep 2017

Did you solve it?