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)

1 ACCEPTED SOLUTION

Accepted Solutions
OLync.1
Associate III

I now have a successful build. I needed to manually import TouchGfx 4.24 zip into MX (Embedded Software Packages Manager -> From Local...) and then update the selection to 4.24 (Software Packs Component Selector) and then regenerate the code. Maybe this is documented somewhere but it's certainly not intuitive and hard to navigate when done infrequently.

View solution in original post

12 REPLIES 12
LouisB
ST Employee

Hello @OLync.1 ,
 

Have you tried to delete the Middleware folder and the Touchgfx/generated one ? Try to do that and regenerate afterward.

 

Regards,

Louis BOUDO
ST Software Developer | TouchGFX
OLync.1
Associate III

I deleted the folders and regenerated them via CubeMX and TouchGfx but problem remains - appears to be in LCD16bpp code:

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::blitCopyARGB8888(unsigned char const*, touchgfx::Rect const&, touchgfx::Rect const&, unsigned char)':
(.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()'
collect2.exe: error: ld returned 1 exit status
Enekkk
Associate II

undefined reference to `touchgfx::paint::flushLine(unsigned long*, int)'

 

I just get 4 errors when it comes to this flushLine in CubeIDE folder:

C:\STM32CubeIDE_1.13.2\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256\tools\bin

 

Have you found how to resolve it?

unsigned_char_array
Senior III

Have you checked all the framework features checkboxes in TouchGFX (under Config)? Try checking all of those and regenerating code in TouchGFX.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

Enekkk_0-1718189447499.png

I've checked all of them and the error just continues, i did not touch any framework before so.

unsigned_char_array
Senior III

Have you checked the difference between the git commit before and after the migration? Try making a new project and using a diff tool such as diffmerge or winmerge to compare your project with it. Maybe you see a difference somewhere. If that is too much work try the same with a stripped version of your project.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

I am working currenlty on touchGFX 4.23 with same code and no error appeared. I will continue using 4.23 for the moment. Thank you!

OLync.1
Associate III

@LouisB I have updated the TouchGfx component in MX 6.11.1 to the latest and regenerated code:

OLync1_0-1718339811390.png

Now I get the same as @Enekkk:

undefined reference to `touchgfx::paint::flushLine(unsigned long*, int)'
in function `touchgfx::LCD16bpp::DecompressorRGB_QOI::blitCopyRGB565(unsigned char const*, touchgfx::Rect const&, touchgfx::Rect const&, unsigned char)'

 It seems that TouchGfx 4.24 is not backward compatible with 4.23. Please advise on a solution as I want to use the 4.24 features. (Does MX need to be updated to support TouchGfx 4.24?)

OLync.1
Associate III

I now have a successful build. I needed to manually import TouchGfx 4.24 zip into MX (Embedded Software Packages Manager -> From Local...) and then update the selection to 4.24 (Software Packs Component Selector) and then regenerate the code. Maybe this is documented somewhere but it's certainly not intuitive and hard to navigate when done infrequently.