cancel
Showing results for 
Search instead for 
Did you mean: 

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

Professional
Senior

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

36 REPLIES 36

Is there actually an SDL2 subdirectory?

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Professional
Senior

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
Senior

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

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
Senior

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

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 III

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.

Thank you. I will try that.

Thanks again. Unfortunately this did not work for me. I have several folder links that are missing. I think all of them have to do with Touchgfx includes. I tried to upload a picture of the missing links but this button below does not seem to work :(

Anyways, I followed your instructions. It seems that now, there is no Inc folder in the project but instead, all includes are linked to folders. The same happens either on TrueStudio or SW4STM32. My steps were as follows:

  1. Create new project in Cubemx using STM32F429 Disco
  2. All peripherals in default state.
  3. Added graphics and selected Touchgfx.
  4. Added the location of Touchgfx.
  5. Changed the parameters in project manager in Cubemx
  6. Generated the project.
  7. Selected "Close" when finished.
  8. In Cubemx, clicked in "Execute" in the Touchgfx tab.
  9. Generated a Touchgfx gui. Simple two screens with one button and some actions.
  10. In Touchgfx, I clicked on "Generate Code"
  11. Closed Touchgfx when finished.
  12. Opened TrueStudio
  13. Indexer revealed problems with missing stuff.
  14. Selected, Index-Search for unresolved includes and several missing files or paths were shown.
  15. The linked "include folders" at the top of the project explorer view, shows about six of them missing most dealing with Touchgfx files.
  16. I tried this for both TrueStudio and SW4STM32 with the same results.

Thanks again for taking the time to read this topic.