on
2018-08-06
07:28 AM
- edited on
2024-06-17
07:00 AM
by
Laurids_PETERSE
Currently the graphical examples are only provided as "Demonstration" or "Hello World" in the Cube Firmware packages. But these examples do not rely on a STM32CubeMX project file (i.e. *.ioc file) which requires the user to manually configure new peripherals directly in the source code instead of using the STM32CubeMX interface.
On the other side, the STM32CubeMX tool allows to create a default ioc file for a specific Discovery board with a valid graphic configuration. But this default pinout also enables multiples of peripherals such as Ethernet, USB, CAN bus, etc. that may not be relevant to all users.
This FAQ is provided (see attachments) with an ioc file for the STM32F746G-Discovery board with all the graphic part correctly configured (i.e. DMA2D, LTDC pins, etc.) and nothing more !
In the following we will review the few steps needed to generate a basic graphical application from this STM32CubeMX project.
Setup review:
You can notice on the left side of the screenshot that the required graphic peripherals are enabled (DMA2D, LTDC, SDRAM, STemWin).
Note also that the CRC peripheral is required, it is mandatory when using the STemWin library.
Note that this tool is mainly used to create the skeleton of the GUI (i.e. define and set location of the main widgets and main refresh loop implementation).
To actually implement the GUI interactions or advanced/custom widgets the user will directly edit the source code.
You can ignore the warning by clicking "Ok"
The graphic stack initialization is now handled and the stack is running without typing any piece of additional code !
You are now free to go back to the STM32CubeMX interface to enable and configure other peripherals and generate again the source code (from step 6).
To enhance this GUI please refer to the STemWin Application Note as well as the EmWin reference manual from Segger's website.
Note that any manually edited C code placed between /* USER CODE BEGIN ... */ and /* USER CODE END ... */ will be kept as is when re-generating the code from STM32CubeMX.
To apply the same principle to the WindowDLG.c file (containing the GUI skeleton) put user code between //USER START and //USER END.
It doen't work...and I can't see the images. I think it is because of the servers. It would be better If you make a video about this article.
I can see only the fist image, the rest of the images are just little white questions inside blue squares.
would you please fix the links?
yes, thanks for your notification. We will try to fix or republish the article.
when I use STMCubeMX v4.26.1 and STM32Cube_FW_F7_V1.12.0 it does not work.
With Cube v4.26 and STM32Cube_FW_F7_V1.11.0 it does work.
It's weird that it does not work with higher versions.
Confirm it does not work with CubeMX 4.26.1 and FW 1.12.0
Have been busy comparing the working with not working project. There are lines missing in the .oic file but was not able to get it working.
Hi all,
You are right, I already provided an updated ioc file for 4.26 a few weeks ago, unfortunately it has been lost during the community tool migration, Inwill post it again shortly.
Sorry for the inconvenience,
Best regards,
Nicolas SANTINI
STMicroelectronics
T.O.M.A.S. - Technically Oriented Microcontroller Application Services
Hi again,
After a quick test it worked for me using the provided ioc, opened with CubeMX 4.26 agreed on migrating to FW 1.12. What do you mean by "not working" ?
Anyway this is not satisfactory for me since this is not working using the latest CubeMX 4.27 for a very simple reason : Atollic output is disabled !...
I fell very sorry about this situation, please give me some precisions on what is not working on your side to see if I can help while I try to find a solution for CubeMX 4.27.
Best regards,
Nicolas SANTINI
STMicroelectronics
T.O.M.A.S. - Technically Oriented Microcontroller Application Services