Skip to main content
Associate II
August 8, 2024
Solved

TouchGfx with ILI9341

  • August 8, 2024
  • 1 reply
  • 3471 views

Hi All,

This is the first time I am posting on this forum. I am new to cubeIde/cubeMX world.

 I have recently started integrating the touchGFX capability to my stm32 boards. I followed some online tutorials and youtube videos like these:

(https://www.youtube.com/watch?v=g1siKaPox88&list=PL6Fwy7aR3zSlZO3OBppHSzDacE4CGgRqO)

However I am having issues in compiling my code. The moment I compile my code I get like 200+ errors in  middleware and touchgfx/generate folder. I have tried creating a project using different boards however I am keep getting these errors.  I have tried configuring the board in cubeMx and then importing it in cubeIde, also tried creating  a project in just cubeide as well but i am keep getting these issues.

My cubeMx version is: 6.12.0

CubeIde version: Version: 1.16.0

TouchGfx version: 4.23.2

 

I have B-l475e-iot01a2(discovery board) and STM32L073RZ board. Problem is not the board here I tried creating a project using different board but my program is not compiling hence flashing the code to the board is the next step.

 

Please let me know what I am doing wrong. Any help will be much appreciated. I have attached screenshots of the errors I am getting. Please let me know if you guys need any further information.

 

Zain

 

    Best answer by Andrew Neil

    Those are linker errors.

    They suggest that you are missing some source files and/or libraries.

    1 reply

    Andrew Neil
    Super User
    August 8, 2024
    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Associate II
    August 9, 2024

    Thanks for your response, The link which you shared helped me to understand that the first error matters the most but I am not sure how to resolve the first error and what is causing this problem. please have a look on my first 5 errors:

     

    C:/Users/username/STM32CubeIDE/workspace_1.16.0/Test_TouchGFX/Debug/../Middlewares/ST/touchgfx/framework/include/touchgfx/ConstFont.hpp:35: undefined reference to `vtable for touchgfx::ConstFont'
    
    C:/Users/username/STM32CubeIDE/workspace_1.16.0/Test_TouchGFX/Debug/../TouchGFX/generated/fonts/src/GeneratedFont.cpp:14: undefined reference to `touchgfx::ConstFont::ConstFont(touchgfx::GlyphNode const*, unsigned short, unsigned short, unsigned short, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned short, unsigned short)'
    
    C:/Program Files/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./TouchGFX/generated/fonts/src/GeneratedFont.o:(.rodata._ZTVN8touchgfx13GeneratedFontE+0x10): undefined reference to `touchgfx::ConstFont::getGlyph(unsigned short, unsigned char const*&, unsigned char&) const'
    
    C:/Program Files/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./TouchGFX/generated/fonts/src/GeneratedFont.o:(.rodata._ZTVN8touchgfx13GeneratedFontE+0x28): undefined reference to `touchgfx::Font::getCharWidth(unsigned short) const'

     

    Andrew Neil
    Andrew NeilBest answer
    Super User
    August 9, 2024

    Those are linker errors.

    They suggest that you are missing some source files and/or libraries.

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.