cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGfx 4.24 linker problem

OLync.1
Associate III

I have just upgraded my project from TouchGfx 4.22 and on rebuild I get:

(.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI16blitCopyARGB8888EPKhRKNS_4RectES6_h+0x31c): undefined reference to `touchgfx::paint::flushLine(unsigned long*, int)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI16blitCopyARGB8888EPKhRKNS_4RectES6_h+0x328): undefined reference to `touchgfx::paint::rgb565::lineFromARGB8888(unsigned short*, unsigned long const*, unsigned int, unsigned char)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI16blitCopyARGB8888EPKhRKNS_4RectES6_h+0x4c6): undefined reference to `touchgfx::paint::flushLine(unsigned long*, int)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI16blitCopyARGB8888EPKhRKNS_4RectES6_h+0x4d2): undefined reference to `touchgfx::paint::rgb565::lineFromARGB8888(unsigned short*, unsigned long const*, unsigned int, unsigned char)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI16blitCopyARGB8888EPKhRKNS_4RectES6_h+0x504): undefined reference to `touchgfx::paint::flushLine(unsigned long*, int)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI16blitCopyARGB8888EPKhRKNS_4RectES6_h+0x510): undefined reference to `touchgfx::paint::rgb565::lineFromARGB8888(unsigned short*, unsigned long const*, unsigned int, unsigned char)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI16blitCopyARGB8888EPKhRKNS_4RectES6_h+0x566): undefined reference to `touchgfx::paint::tearDown()'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: Middlewares/ST/touchgfx/lib/core/cortex_m4f/gcc\libtouchgfx.a(LCD16bpp.o): in function `touchgfx::LCD16bpp::DecompressorRGB_QOI::blitCopyRGB565(unsigned char const*, touchgfx::Rect const&, touchgfx::Rect const&, unsigned char)':

(.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI14blitCopyRGB565EPKhRKNS_4RectES6_h+0x480): undefined reference to `touchgfx::paint::flushLine(unsigned long*, int)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI14blitCopyRGB565EPKhRKNS_4RectES6_h+0x48c): undefined reference to `touchgfx::paint::rgb565::lineFromRGB565(unsigned short*, unsigned short const*, unsigned int, unsigned char)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI14blitCopyRGB565EPKhRKNS_4RectES6_h+0x538): undefined reference to `touchgfx::paint::flushLine(unsigned long*, int)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI14blitCopyRGB565EPKhRKNS_4RectES6_h+0x544): undefined reference to `touchgfx::paint::rgb565::lineFromRGB565(unsigned short*, unsigned short const*, unsigned int, unsigned char)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI14blitCopyRGB565EPKhRKNS_4RectES6_h+0x594): undefined reference to `touchgfx::paint::flushLine(unsigned long*, int)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI14blitCopyRGB565EPKhRKNS_4RectES6_h+0x5a0): undefined reference to `touchgfx::paint::rgb565::lineFromRGB565(unsigned short*, unsigned short const*, unsigned int, unsigned char)'

C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text._ZN8touchgfx8LCD16bpp19DecompressorRGB_QOI14blitCopyRGB565EPKhRKNS_4RectES6_h+0x5fa): undefined reference to `touchgfx::paint::tearDown()'

 

I followed advice elsewhere and regenerated code from CubeMX before regenerating from TouchGfx designer, with same result.

 

For this error:

undefined reference to `touchgfx::paint::rgb565::lineFromRGB565(unsigned short*, unsigned short const*, unsigned int, unsigned char) 

There is an implementation in PaintRGB565Impl.hpp:

void lineFromRGB565(uint16_t* const ptr, const uint16_t* const data, const unsigned count, const uint8_t alpha)

 

CubeMX v6.11.1

TouchGfx: v4.24.0

CubeIDE: v1.15.1 Build: 21094_20240412_1041 (UTC)

14 REPLIES 14

The regenerate code has to be done even on a new project so I don't think it's intentional.

I have exacted the same problem as you have and the same feeling.

MMüll.6
Associate III

How it works with my environment:

- Update CubeMx to V6.11.1 (including the HAL firmware files where you have installed)
- Update CubeIDE to V2.15.1
- Update TouchGFX with CubeMx V4.24.0
- Install TouchGFX V4.24.0
- Open in the CubeIDE the IOC file, it update to the new HAL, save.
- Open the touchgfx project von V4.24.0 and generate the code
- CubeIDE menu Project >> Clean...
- CubeIDE, open the ioc file again
- CubeIDE menu Project >> Generate Code
- CubeIDE menu Project >> Build All

After this steps, no errors in the console output (same as befor update).
The step "Project >> Generate Code" fix the issue, I hope it help.

Hi,

I am just about to update from 4.23.2 to 4.24.1. and have the linker error for   touchgfx::paint::flushLine.

Even after following your solution above.

 

Is it necessary to migrate the MX project to 6.12.1 and then generate code in STMCubeMX?

I installed the TouchGFX release update as described above in MX, however I did not dare to migrate my project HAL libraries to the latest version (I had too many bad experiences with updating a running project to a newer HAL).  So I did not generate code in MX.

I generated the code in the TouchGFX designer only. I even did a "rebuild all", but the error still exists.

 

Any help is very welcome!

 

 

GS1
Senior III

OK, I succeeded.

Migrating my project to the latest release of HAL and generating code using STM32CubeMX instead of only in the TouchGFX designer solved the linker error. And my project is running on the target - fingers crossed that no hidden problems arise.

BR GS