STemWin528 + STM32F7-discovery, GUI_MEMDEV_CreateFixed

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • STemWin528 + STM32F7-discovery, GUI_MEMDEV_CreateFixed

    Hello.
    I'm testing MEMDEV_AttitudeIndicator.c
    I see only part of the image.
    The problem starts in the _CreateScale function.
    GUI_MEMDEV_CreateFixed returnes zero.
    Can you please help me to achieve the handler.
    Thank you.
  • Hello,

    if GUI_MEMDEV_CreateFixed() returns with zero there is not enough memory available for the memory device. Please increase the size of the memory block assigned to emWin in GUI_X_Config().

    Regards, Jörg
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello, Jörg.
    Thank you for the answer.
    When I increase the memory to required minimum (#define GUI_NUMBYTES (1024) * 700) I receive the error (IAR EWARM):
    unable to allocate space for sections/blocks with a total estimated minimum size of 0xafb74 bytes (max align 0x8) in <[0x20000000-0x2004ffff]> (total uncommitted space 0x50000).
    The board has external SDRAM. Is it possible to include it for the task? I see that the part of the SDRAM is used:
    #define LCD_LAYER0_FRAME_BUFFER ((int)0xC0200000)
    #define LCD_LAYER1_FRAME_BUFFER ((int)0xC0400000)
    RAM memory organization is a little bit messy for me...
  • Hi,

    I have attached some files to show what is neccessary to give emWin more memory. Since I'm not how big the SDRAM is I disabled the second layer and used as GUI RAM.

    GUI_Conf.c:
    I just added a @ "GUI_RAM" behind aMemory[] to tell the linker where to put that array. In this case into section GUI_RAM

    LCDConf.c:
    Of course, now it is not possible to enable the second layer because it would overwrite the GUI RAM.

    stm32f746xx_flash.icf:
    I have defined a start and end address for a SDRAM region, defined the SDRAM region and placed the GUI_RAM section into SDRAM region.

    Now it should be possible to increase the memory up to 2MB

    Regards,
    Sven
    Files
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.