Sunday, August 20th 2017, 9:10pm 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.

baev_al

Beginner

Date of registration: Dec 25th 2014

Posts: 16

1

Wednesday, February 3rd 2016, 6:41pm

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.

SEGGER - Jörg

Super Moderator

Date of registration: Dec 20th 2007

Posts: 81

2

Tuesday, February 9th 2016, 9:06am

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

baev_al

Beginner

Date of registration: Dec 25th 2014

Posts: 16

3

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: 345

4

Friday, February 12th 2016, 9:46am

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
SEGGER - Schoenen has attached the following file: