cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve undefined reference errors during building a project in STM32CubeIDE?

MSing.8
Associate III

Error message:

*****************************

c:\st\stm32cubeide_1.8.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_2.0.0.202105311346\tools\arm-none-eabi\bin\ld.exe: ./TouchGFX/generated/fonts/src/CachedFont.o: in function `touchgfx::ConstFont::~ConstFont()':

C:/Users/mande/Documents/STM32/STM2New2/STMF207New2/Debug/../Middlewares/ST/touchgfx/framework/include/touchgfx/ConstFont.hpp:35: undefined reference to `vtable for touchgfx::ConstFont'

*****************************

Project Background

I have STM32F207, XPT2046 touch detect controller, ILI9488 LCD and using FSMC/DMA for LCD.

I am trying to integrate touchgfx with above setup through STM32CubeIDE. There is no reference project related to F2 family of STM32 with TouchGFX.

So what I am doing is creating TouchGFX initial files with STM32F4 MCU and modifying the contents in "ApplicationTemplate.touchgfx" file as per STM32F2 needs.

Some of the resources that has helped me reach here are (thank you to content creators)

https://www.youtube.com/watch?v=suMytEyQTP4

https://www.youtube.com/watch?v=hfeKMZXt2L8

https://helentronica.com/2021/01/22/touchgfx-on-a-custom-made-low-cost-board-with-the-ili9341-controller-over-spi/

https://chowdera.com/2020/12/20201205093754419p.html

But I need help with the compilation of the project, specifically the kind of errors i am getting as mentioned above.

A STM32CubeIDE project with simple image or button display on lcd, STM32F207 and TouchGFX which can cleanly build is what I am looking for.

Thank you.

3 REPLIES 3
Andy5
Associate

I am seeing the same error in ConstFont, was this solved? If so how?

thanks.

o-matsu
Associate

You must link with the TouchGFX core library. Depending on your MCU, this would be either

https://support.touchgfx.com/docs/development/ui-development/working-with-touchgfx/using-ides-with-touchgfx

 

omatsu_2-1721706425566.png

omatsu_3-1721706599785.png

omatsu_4-1721706647896.png

Thank you! This solved a similar problem that I was having.