cancel
Showing results for 
Search instead for 
Did you mean: 

Lots of errors when building basic project

aro
Associate III

I have a CubeIDE project for a H743IITx board and an LCD and I added Touchgfx. The Touchgfx 4.24 contains the typical demo that switches between two screens. It runs fine in the simulator. I refreshed the project and it added all the necessary folders/files. Touchgfx is installed on the PC and the package was added inside the CubeIDE manager.

As you can see in the screenshot, there are a lot of red underlined files when I attempt to build the project. There are about 240 errors.

Usually, when so much code is underlined, it's a matter of missing libraries due to some kind of incomplete setup. However, I don't know what is wrong. I followed the documentation setup as well as different videos on youtube and actually the initial setup is not that complex.

Any ideas what could be missing?

 

1 ACCEPTED SOLUTION

Accepted Solutions
aro
Associate III

I realize that the project I created in Touchgfx is a Simulator project for Windows. Maybe that's why all those errors in CubeIDE.

View solution in original post

7 REPLIES 7
Imen.D
ST Employee

Hello @aro ,

Probably, the Include paths are not properly set up and you are missing the include files.

You have to review the defines and project's Include path.

You can also start your project from STM32CubeMX and follow this tutorial.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
aro
Associate III

Yes, that's the document I used. The project built perfectly fine without Touchgfx. The problem started after I added it. In the screenshot, I think all paths are included.

GaetanGodart
ST Employee

Hello @aro ,

 

To summarize :

  • you created a project using STM32CubeIDE, it worked fine
  • you added the x-cube-touchgfx middleware, did it work fine there without changing the project?
  • you opened TouchGFX Designer and made a simple design, it worked in simulator
  • you refresh the STM32CubeIDE project, you now have underlined files and folders and it doesn't compile

Is it the first time you work with TouchGFX?

Can you share the errors? We can have a quick look through it to see if they say files are missing or something else.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Your bullet points are correct. It's the first time I'm using Touchgfx. I attached the console output.

Hello @aro ,

 

The build log's error are of type "undefined reference to "touchgfx::Font::getMaxTextHeight(unsigned short const*, ...) const".
So you have a lot of undefined references to functions which indicates that you are missing some includes, some path or similar.

I will assume that something is not included.

To try to fix undefined functions you can try multiple things:

  1. clean and rebuild the project in STM32CubeIDE (maybe all the changes were not taken into consideration)
  2. check the include files (check it for c and c++)
  3. check the linker settings (make sure it includes TouchGFX library, that is a .a file)

Furthermore, you can check where those functions are located with software able to do advanced searches (ex : Everything) and then double check that the file where it is defined/declared is available to your project.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
aro
Associate III

I realize that the project I created in Touchgfx is a Simulator project for Windows. Maybe that's why all those errors in CubeIDE.

GaetanGodart
ST Employee

No problem @aro , it happens to the best of us! ;)

The best way to learn how to follow our documentation : board-introduction 

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)