Wednesday, May 23rd 2018, 1:21am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



Date of registration: Dec 25th 2014

Posts: 16


Wednesday, February 3rd 2016, 6:41pm

STemWin528 + STM32F7-discovery, GUI_MEMDEV_CreateFixed

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.


Super Moderator

Date of registration: Dec 20th 2007

Posts: 81


Tuesday, February 9th 2016, 9:06am


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



Date of registration: Dec 25th 2014

Posts: 16


Thursday, February 11th 2016, 9:40pm

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...

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584


Friday, February 12th 2016, 9:46am


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.

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

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

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

SEGGER - Schoenen has attached the following file: