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)

19 REPLIES 19

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

 

 

Hi @OLync.1, I'm having the same issue. But I don't understant how import manually TouchGFX into MX.

Can you give more details?

 

Thanks in advance!

In your open project in the Pinout & Configuration Tab of STM32CubeMX there is a menu available called

"Software Packs". When you select the pulldown there is a sub Manue "Manage Software Packs".

It opens a property sheet menu "Embedded Software Packages Manager". At the bottom of this menu is a button calle "From Local".This opens a dialog box to select a Cube Package File.

Then select the installation zip file for the latest touchGFX installation.

When done you need to generate code in STM32CubeMX again to create the necessary references for the linker.

I hope this clearifies the manual import issue.

BR GS

GMeur
Senior II

I'm still facing this issue :

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

And I just can't find a way to solve it. I did all the steps mentionned here (and twice, just to make sure) : cleaned the project, deleted the middleware 'touchgfx' folder and the Touchgfx/Target one, did a tool code generation in cubeIDE and then a generate in TouchGFXdesigner, followed by a rebuild of the whole project with no avail…

I'm still using the version 4.24.0 of touchgfx and wonder if upgrading to version 4.24.3 would solve the issue?

I don't get exactly why the linker can't find the definition of this function in the header file PaintRGB888Impl?!

Also, why is this function defined in a header?

Thanks in advance for your help. 


Did you also check and follow my reply from 2024-12-01 ? 

I assume the problem can only be solved by creating it with correct release integrated in STM32CubeMX. Just cleaning the project and generating in the designer doesn't solve the problem. Your need to generate with CubeMX.

 

 

 

I don't use STM32CubeMx but only STM32CubeIDE, I suppose it doesn't matter as generating the .ioc file in cubeMX or IDE is the same I guess.

I can't import the .zip touchgfx installation file because it is already available in my repository.

I'm thinking about trying to upgrade touchgfx to version 4.24.3 and see if I have some luck… Getting quite clueless here.