cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin ST32F429

Sammalisto.Pauli
Associate II
Posted on April 27, 2016 at 11:46

I downloaded stm32cubef4.zip and tried to build a STemWin test application from the emWin files included.  The builder complained something about C:\Users\bennacef\Desktop\SVN\STM32_emWin_Library.  What is this bennacef user.  Also the size of the application was too big for RAM, 1 917 692 bytes.  The library 528 is almost 4x the 522, there must be a lot of new features, or.

How can I build this example?  I am using System workbench.

#stemwin #stm32f429discovery
5 REPLIES 5
slimen
Senior
Posted on April 27, 2016 at 12:31

Hi,

Could you precise which library and example are you using ?

Which version of STM32CubeF4 are you using ? Is it downloaded from web ?

Regards
Sammalisto.Pauli
Associate II
Posted on April 28, 2016 at 18:42

I downloaded stm32cubef4.zip, STM32Cube_FW_F4_V1.11.0., 24.4.2016, the library is in projects\Middlewares\ST\STemWin\lib\STemWin528_CM4_GCC.a.

Sorry, I deleted the project, but you can find the user still in the library file.

Ivaylo Ilchev
Associate III
Posted on April 28, 2016 at 23:49

1. Run Sysem Workbench for STM32

2. Create new workspace or use existing

3. File->Import... General --> Existing project into workspace

4. Select ...\STM32Cube_FW_F4_V1.11.0\Projects\STM32F429I-Discovery\Applications\STemWin\STemWin_HelloWorld\SW4STM32\STM32F429I_DISCO_MB1075

5. Finish

Now build the project and enjoy the text on the screen. You can also replace BASIC_HelloWorld.c with something else from ...\STM32Cube_FW_F4_V1.11.0\Projects\STM32F429I-Discovery\Applications\STemWin\STemWin_HelloWorld\Src or download examples from https://www.segger.com/emwin-samples.html

To build project with emWin you have to add path into proj .. options .. includes ...\STM32Cube_FW_F4_V1.11.0\Middlewares\ST\STemWin\inc and library ...\Middlewares\ST\STemWin\Lib\STemWin528_CM4_GCC.a Sometime is required to uncheck USe C math library and add m as last to the list of libraries. You may copy GUIConf.c, GUI_X.c and LCDConf_stm32f429i_disco_MB1075.c from the above project.

Sammalisto.Pauli
Associate II
Posted on April 30, 2016 at 00:31

Hi,

and thank you for your reply.

I tried to make the structure of the example in package STM32Cube_FW_F4_V1.11.0 clearer, like it is now in the new version of CubeMX (System workbench). I created new folders and moved the files to them. Somehow somewhere during the process I managed to break the links of stm32f4xx_hal_conf.h and I had to start adding the .h files everywhere. After I managed to build the project, the GUI crashed complaining something about a user bennacef.

Because that was not very succesfull, I desided to make a greenfield project, starting from CubeMX. I copied the emWin files from STM32Cube_FW_F4_V1.11.0\Middlewares\ST\STemWin. The linker complained, that the program does not fit to RAM. I checked all emWin .h files, all seemed to be reasonable.

I made, when STMemWin was released, ''by hand'' a STMemWin project. I copied all emWin files from that project and all worked. After comparing the files I found out, that in STM32Cube_FW_F4_V1.11.0 version in GUIConf.c, there is #define GUI_NUMBYTES 0x200000, and in my version I had #define GUI_NUMBYTES 102400.

As I see it, this #define GUI_NUMBYTES 0x200000 should be in a .h file, GUIConf.h. Also the default should be so, that it works on a basic system/board.

STM32Cube_FW_F4_V1.11.0 is something like a Swiss knife, you can do with it whatever you need. But at least some of us want to make a distinct project for one board only, and in STM32Cube_FW_F4_V1.11.0 examples it is not so obvious, what one should take with, and where that is.

From: ivaylo iltchev

Posted: Thursday, April 28, 2016 11:49 PM

Subject: STemWin ST32F429

1. Run Sysem Workbench for STM32

2. Create new workspace or use existing

3. File->Import... General --> Existing project into workspace

4. Select ...\STM32Cube_FW_F4_V1.11.0\Projects\STM32F429I-Discovery\Applications\STemWin\STemWin_HelloWorld\SW4STM32\STM32F429I_DISCO_MB1075

5. Finish

Now build the project and enjoy the text on the screen. You can also replace BASIC_HelloWorld.c with something else from ...\STM32Cube_FW_F4_V1.11.0\Projects\STM32F429I-Discovery\Applications\STemWin\STemWin_HelloWorld\Src or download examples from https://www.segger.com/emwin-samples.html

To build project with emWin you have to add path into proj .. options .. includes ...\STM32Cube_FW_F4_V1.11.0\Middlewares\ST\STemWin\inc and library ...\Middlewares\ST\STemWin\Lib\STemWin528_CM4_GCC.a Sometime is required to uncheck USe C math library and add m as last to the list of libraries. You may copy GUIConf.c, GUI_X.c and LCDConf_stm32f429i_disco_MB1075.c from the above project.

Ivaylo Ilchev
Associate III
Posted on April 30, 2016 at 18:05

Hi,

First about RAM - check or copy .ld file from example, and .s file if your segments are different. You have to provide more heap and stack for emWin also. Second - HAL_Delay must work, LTDC_IRQHandler must present, so check  *-it.c file.