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
Professional
Senior

Hello

thanks a lot for the SW4STM32_Tutorial_STM32F429i_DISC1 project

What must be modified in this project to set the screen to landscape (in touchGFX + eclipse) ?

best regards

@Professional​, https://touchgfx.zendesk.com/hc/en-us/articles/203563972-Display-Orientation discusses how to change display orientation.

HAL::getInstance()->setDisplayOrientation(ORIENTATION_LANDSCAPE); 

The STM32F429-DISCO board runs PORTRAIT natively, so you also need to tell the image converter to rotate your images. It should be outlined in the article.

Hope that helps!

Best regards,

Martin

Professional
Senior

Hello

thank for the reply

i have :

1) modified the TouchGFX\config\gcc\app.mk

screen_orientation := -rotate90

2) re-generate the TouchGFX (generate code)

3) modified the BoardConfiguration.cpp in touchgfx_init()

HAL::getInstance()->setDisplayOrientation(ORIENTATION_LANDSCAPE);

Project clean+ build

target program chip

This is all right, but i would like to have a rotation in the reverse direction -90 instead of +90

is it possible ?

Thanks a lot

best regards

Unfortunately there's no way, natively, to do a 270 degree rotation.

I posted a widget in this thread that can perform a 180 degree rotation in software and @danielschramm9​ has ported it to 270 degrees. You would then not have to configure your application for rotation as this is done through a custom widget. This is a very ineffecient way of doing the rotation since all pixels have to be swapped after the screen has been rendered to memory.

https://community.st.com/s/question/0D50X0000A1lVxsSQE/repost-change-lcd-orientation-in-180-degree

scottSD
Lead

Has anyone come up with a solution to this? I run into the same thing when running it for the STM32F746G Discovery board.

What exactly is your problem, @scottSD​?

Thanks,

Martin

Martin,

Thanks for you reply.

My main task right now is getting CubeMX, TouchGFX, and Atollic TrueSTUDIO (or System workbench) to play well together. I have had many issues doing that. As I stated in my comment that I am using the STM32F746G Discover board.

I followed the instructions laid out in the following post:

https://touchgfx.zendesk.com/hc/en-us/community/posts/360025859872-How-To-TouchGFX-4-9-3-example-for-Atollic-9-0-1

But had quite a few problems with files not being included in the path, etc.

Note that I have been able to run the Atollic TrueSTUDIO example code right to the Discovery board (Run > Debug). I have also been able to run the TouchGFX examples right to the Discovery Board ("Run Target").

It just seems that creating projects through CubeMX/TouchGFX (either by themselves or by opening the CubeMX plug-in (perspective) in TrueStudio is not very easily done.

Do you have any step-by-step instructions that work reliably?