cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to compile with CubeMX+TouchGfx over Atollic

marittia97
Associate II

Hello everybody,

I just bought a Stm32F469-Discovery kit, and I've tried to create a really simple project that should work with both CubeMX (5.1.0) and TouchGFX(4.10.0) but I encountered some problems:

  • First of all, I started CubeMX, selected my F469i-discovery board and set all the peripherals as default
  • Then in Middleware -> Graphics I selected TouchGFX as graphics framework and chose Display Serial Interface using LTDC-DSIHOST. I also setted the link to the TouchGFX Executable. In Platform Settings I setted PH7 as LCD Reset Pin Xres
  • Selected TrueSTUDIO under Project Maganer -> Toolchain/IDE

At this point I generated the code, it said it has some problems with GFX simulator but I ignored it because I will exclude that from compiling in the Atollic Project.

  • Once I generate the code I executed TouchGFX from CubeMX, and created a simple screen with a white box as backgroud and a button in the center, I then clicked on Generate Code

At this point, once I tried to Build from Atollic it gives me errors with every file related to the simulator, so I excluded them from building, and this error came out:

fatal error: SDL2/SDL.h: No such file or directory | OSWrappers.cpp | /MyProject/Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/hal/simulator/sdl2

referring to "#include <SDL2/SDL.h>" line.

I also have the same problem in HALSDL2.hpp:

/MyProject/Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2

I noticed that it says it can't find any file, but if I ctrl+click on the include line it opens the right file (so why does it says no such file or directory?)

Does anybody know can I do to solve this problem? I really don't know how to deal with that.

Thanks for your attention,

Mariano

8 REPLIES 8
eng23
Senior

Hi @marittia Nerone​ ,

I had the same problem. The solution was exclude from build the entire folders as suggested by @Martin KJELDSEN​ :

Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator

Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/hal/simulator

And the folder platform\driver\touch too, because the file SDL2TouchController.cpp includes the HALSDL2.hpp.

It worked for me, but now I'm in another problem:

https://community.st.com/s/question/0D70X0000076nTC/cubemx-510-with-touchgfx-never-compiles-in-truestudio?t=1551781979221

If you will be able to compile please share the solution!

Regards,

Anderson

marittia97
Associate II

Thanks for your answer @eng23​ , I had the same problem after exluding the folders you mentioned (compiler said me that he couldn't find some methods such as "touchgfx::DMA_Interface"), disabling the RTTI solved the problem to me.

I did that selecting "Disable RTTI" from: Project -> Build Settings -> C/C++ Build -> Settings -> Tools Settings -> C++ Compiler -> Optimization -> Disable RTTI.

I hope this will help.

Now I tried also to flash the hex file to the board using ST-LINK Utility, but the displays remains all black.

Regards,

Mariano

eng23
Senior

Hi @marittia Nerone​ ,

For me I could flash the demoboard, the display show the graphics after 10 sec, I don't know the reason for this delay, but after this time works.

Have you tried debug in Atollic? Because in ST-Link you need to configure external loader for N25Q128A.. Did you configure it?

marittia97
Associate II

I added the right External Loader for my board, then I load the .hex file, and then Target -> Program, but screen is still black.

How do you debug in Atollic?

eng23
Senior

If you created your project in CubeMX from board (I think so) the debug comes configured and in Atollic you only do right click on project > Debug As > 1 Embedded C/C++ Application.

@eng23​ thanks for your disponibility!

I was able to debug via Atollic and it seems to give me a runtime error during the execution of the GRAPHICS_Init() function into main.cpp, the error it gives me is the following:

No source available for "touchgfx::HAL::initialize() at 0x80112fc" 

After that error, however, the board seems to reach the while(1) cycle

I have no idea about how to solve this problem! Maybe i'm doing something wrong in the TouchGFx project? (I only have one image and one button on the main screen)

Hi Anderson...

I've try excluding the paths as in your previous post but this doesn't seems to work for me... as I'm getting an error regarding shellapi.h

Description	Resource	Path	Location	Type
 
fatal error: shellapi.h: No such file or directory	main.cpp	/testTouchGFX_03/TouchGFX/simulator	line 30	C/C++ Problem
 

below is my latest exclusion pattern (I've tested different combinations)...

0690X0000087jmuQAA.png

I'm using Atollic 9.3.0 and CubeMX5.1.0 on a STM32F746G-Disco.

Can you share more info on your setup ?

Best Regards,

Giampaolo

PS: RTTI has been already exluded as mentioned elsewere...

Hi @iw2lsi​ ,

I think you need to exclude from build the folder project/TouchGFX/simulator

And for me I didn't exclude the include/plataform/driver/touch

0690X0000087zWsQAI.jpg

Try it.

Regards,

Anderson