Skip to main content
Professional
Associate III
November 29, 2018
Question

cubemx + touchgfx STM32f429i disco fatal error: SDL2/SDL_video.h: No such file or directory

  • November 29, 2018
  • 17 replies
  • 5766 views

Hello,

i tried to generate for STM32f429i disco a project with graphic = touchgfx.

1) i generate cubemx (for STM32f429i disco) project for SW4STM32 toolchain

2) i generate a simple touchgfx project for SW4STM32 toolchain

But compilation under eclipse gives the following errors :

HALSDL2.hpp:22:10: fatal error: SDL2/SDL_video.h: No such file or directory

HALSDL2.hpp:22:10: fatal error:SDL2/SDL_render.h: No such file or directory

main.cpp:30:10: fatal error: shellapi.h: No such file or directory

I can i solve these compilation errors ?

thanks

best regards

17 replies

Tesla DeLorean
Guru
November 29, 2018

Is there actually an SDL2 subdirectory?

Is it local or one described in an "Includes Path"?

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Professional
Associate III
November 30, 2018

Thanks for your reply

for SDL2 subdirectory i found it and it works modifiyng include path : platform/hal/simulator/sdl2/vendor/SDL2

But there is no shellapi.h file refered in main.cpp.

Have you any idea to solve this ?

Is there a tutorial to generate without trouble touchGFX application with cubemx ?

Thanks

regards

Professional
Associate III
November 30, 2018

Hello

i exclude from compilation simulator ; i think it is not required for target discovery.

But now i have problem in   HALSDL2.cpp

 from ../Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/hal/simulator/sdl2/HALSDL2.cpp:16:

C:/aStill/workspace_cubemx/essai_gfx3/Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2/vendor/SDL2/SDL_stdinc.h:261:50: error: size of array 'SDL_dummy_enum' is negative

       typedef int SDL_dummy_ ## name[(x) * 2 - 1]

I would appreciate to find a tutorial to generate without trouble touchGFX application with cubemx ...

FSTKMARO
Associate II
December 4, 2018

Thanks for the suggestion of modifying the include path. I have the exact same problem as you. I hope someone has a quick response. I will keep trying and will post any solutions here. I just wanted to add my voice to this thread.

Professional
Associate III
December 5, 2018

Hello,

i also ecluded from build the HALSDL2.cpp

Now build is OK , but nothing appears on the display...

have you been able to have a touchgfx screen generated by cubemx running on STM32f429i discovery board ?

FSTKMARO
Associate II
December 13, 2018

I am in the same boat as you. I have been unsuccessful at creating a GUI using Touchgfx and CubeMX on system workbench. Yes, one of the biggest problems is the fact that the touchgfx software includes files for the simulator in the project. Those references are not necessary for STM32 work and as I understand it, are only there to simulate the project in windows. There is little information around to address this. There is a long path to getting a touchgfx gui for these processors and I suppose that is what everyone else is doing. I am not very experienced with GUIs so I am out of luck until ST releases a fix. :) For your problem, since now you get a good compile, are you using RTOS? if so, you may want to disable it and see if the screen comes up then.

Zhi Pang
Associate II
December 14, 2018

Hi @FSTKMARO​ ,

If you use SW4STM32 of TrueSTUDIO as the toolchain/IDE.

Try to NOT select the "under the root" checkbox in CubeMX project manager.

Project structure use "Advanced".

Delete all files and directories you generated previously.

And generate code through CubeMX again.

FSTKMARO
Associate II
December 14, 2018

Thank you. I will try that.

Mon2
Senior III
December 18, 2018

Hi. If you are able to use IAR...

here is the first draft document of the full procedure to support the STM32F429i-DISC1 target that we followed:

https://s3.amazonaws.com/axxonshare/my_combo_tutorial.zip

Welcome your feedback on the document and if it works for you. Good luck! :grinning_face:

FSTKMARO
Associate II
December 18, 2018

Thank you. I will go through it and report back here.

Mon2
Senior III
December 19, 2018

Hi @FSTKMARO​, that is very positive feedback. Thanks. Have zero knowledge at this time about the SW4STM32 toolchain but can install to see if we see anything on our side. In the meantime, if possible, consider to post your project using a shared box like WeTransfer or similar.

https://wetransfer.com/

Also noting that the use of the MOSI pin is not required for the LCD display operation on the STM32F429i-DISC1 kit. Will revise the document as soon as time permits. Respectively, posted the source document file inside the download for others to tweak the process by other readers as they see fit.

Mon2
Senior III
December 21, 2018

@Clark Sann​ , @FSTKMARO​ - just got the SW4STM32 compiler working to compile the TouchGFX generated GUI with the CubeMX integration. The GUI (without the touch panel support) took "only" 2 days of work but the touch panel sucked another day out of my life. I think Alexa heard and logged every curse word in this painful process. Wasted right now but will try my best to document the procedure for Monday (using STM32F429i-DISC1 target).

In hindsight, without touch panel GUI integration takes a few seconds to craft up but the touch panel is another story.

Bye for now.

FSTKMARO
Associate II
December 22, 2018

interesting. your document is pretty straightforward to get the touch working. anyways, glad to hear. TGFX and ST have some work ahead of them to get this working fine. In the mean time, I am using STemWin while TGFX gets fixed. Thanks for the help on this.

Clark Sann
Associate III
December 22, 2018

It's too bad we are forced to use STemWin. I got it to work pretty easily but the GUIs look terrible....at least mine did. And I could never get the touch controller to work very well. One thing I liked about TouchGFX vs STemWin is how nice the GUIs looked and how responsive the touch controller was.

Before the latest CubeMX came out with TouchGFX integration (well sorta integrated), I labored for hundreds of hours to get TouchGFX working with SW4STM32. No joy. TouchGFX kept saying, "it's easy! Lots of done it, but we can't tell you how.". Right. I think now it should be apparent that it's not easy. If the combined forces of TouchGFX and ST , both working for several weeks have only gotten us to this stage, then it's not easy. Hopefully this will get straightened out in January and you can stop using STemWin.