Slemi's webpage

STEmWin on STM32F429I-Discovery with SW4STM32 (Part 3)

In this part of tutorial we will finally get STEmWin working.

Well it has been a long time since last part 2 of this tutorial. I had to do a lot of reading and code writing to get this done.

You need to finish part 1 and part 2 to continue with this one!

Let me show you the steps to get it working.

First we need to import STEmWin files to our project.

We need to make a few directories in our project, first is GUI in root of our project and then we need two subfolders inc and lib:

Then we need to copy:

Then we need to let the compiler know where it can find all this, right click on our project and select Properties.

Go to C/C++ General -> Paths and Symbols and do as following three screenshots:

Now we need to change some settings inside copied files:

With all this done, we can now successfuly compile our project without errors. But we are not done yet, the program compiles, but does not work!

Now comes the toughest part, glueing our previous program and STEmWin.

For this we need to change some settings inside LCD_X_DisplayDriver function in file named LCDConf.c.

I commented out two orininal lines of code and added BSP_LCD_SetLayerAddress.

To use this function we also need to include stm32f429i_discovery_lcd.h in LCDConf.c and also LCDConf.h

In LCDConf.c we also need to tell our program where SD RAM is located:

Now we can test some more STEmWin code. Put this inside main.c:

And define variable for button:

Now compile and run code an wait a few seconds and you should see this screen:

This is it for now. If I ever learn more about STEmWin I might put some more advanced tutorial up.

Slemi

 

P.S.: If you found this helpful, I would appreciate clicking on Ad on the right side to give me a little “motivation”. 🙂

Exit mobile version