Missing functions in generated code (TouchGFX 4.14)
Dear ST community,
I am trying to build a basic test project for the STM32F469I-DISCO board, using STM32CubeMX 6.0.1 and TouchGFX 4.14. The generated project code fails to build because of a number of absent function implementations. Details below.
Steps to reproduce:
- Start STM32CubeMX 6.0.1 and create a new STM32F469I-DISCO project with default options
- Add the TouchGFX Designer 4.14 software pack, and apply default options, set screen size to 800x480
- Generate code in STM32CubeMX
- Open the TouchGFX project in TouchGFX Designer 4.14
- Add a dummy button with label, e.g. "Hello World" and save project
- Generate code in TouchGFX Designer
- Attempt to build the project in IDE
As expected, the initial build will fail because of linker errors, caused by missing code that must be added by the developer.
My initial goal is just to get the project to compile, so I added dummy implementations for now (e.g. in OSWrappers.cpp and elsewhere) which I will properly implement later.
Even so, the build fails because of a number of missing functions, that should have been present in the generated code:
undefined reference to `touchgfx::ConstFont::ConstFont(touchgfx::GlyphNode const*, unsigned short, unsigned short, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned short, unsigned short)' GeneratedFont.cpp
undefined reference to `touchgfx::Font::getStringWidthLTR(unsigned char, unsigned short const*, std::__va_list) const' Texts.cpp
undefined reference to `touchgfx::Font::getStringWidthLTR(unsigned char, unsigned short const*, std::__va_list) const' Texts.cpp
undefined reference to `touchgfx::ConstFont::getGlyph(unsigned short, unsigned char const*&, unsigned char&) const'
undefined reference to `touchgfx::Font::getCharWidth(unsigned short) const'
undefined reference to `touchgfx::Font::getSpacingAbove(unsigned short const*, ...) const'
undefined reference to `touchgfx::Font::getMaxTextHeight(unsigned short const*, ...) const'
undefined reference to `touchgfx::Font::getNumberOfLines(unsigned short const*, ...) const'
undefined reference to `touchgfx::Font::getCharWidth(unsigned short) const'
undefined reference to `touchgfx::Font::getSpacingAbove(unsigned short const*, ...) const'
undefined reference to `touchgfx::Font::getMaxTextHeight(unsigned short const*, ...) const'
undefined reference to `touchgfx::Font::getNumberOfLines(unsigned short const*, ...) const'
The declarations for these functions exist in various .hpp files, but the implementations don't exist in any .cpp files in the generated code. I also searched the entire TouchGFX install directory for these functions (C:\TouchGFX\4.14.0) and they don't exist there, either.
I also tried TouchGFX 4.13 with similar results: missing code and cannot compile.
What am I missing?
I think I am following the steps according to the documentation (STM32CubeMX and TouchGFX) and from reading messages here.
Please help... I am completely stuck and unable to proceed with the project.
Thank you!
