Skip to main content
Tuoman
Senior II
Jul 8, 2022 1:19 PM UTC
Solved

TouchGFX update 4.20 linker error undefined reference 'touchgfx::paint::rgb565::tearDown()'

I updated to TouchGFX 4.19.0 -> 4.20.0 and get this linker error. I cannot figure out how to fix it. Everything compiles successfully, but linker fails.

c:\st\stm32cubeide_1.2.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: C:\DEV\handheld-main-mcu\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a(PainterRGB565.o): in function `touchgfx::PainterRGB565::paint(unsigned char*, short, short, short, short, unsigned char) const':
(.text._ZNK8touchgfx13PainterRGB5655paintEPhssssh+0x1a): undefined reference to `touchgfx::paint::rgb565::lineFromColor(unsigned short*, unsigned int, unsigned long, unsigned char, unsigned long)'
c:\st\stm32cubeide_1.2.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: C:\DEV\handheld-main-mcu\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a(PainterRGB565.o): in function `touchgfx::PainterRGB565::tearDown() const':
(.text._ZNK8touchgfx13PainterRGB5658tearDownEv+0x0): undefined reference to `touchgfx::paint::rgb565::tearDown()'

This topic has been closed for replies.
Tuoman
TuomanBest answer
Senior II
Jul 11, 2022 6:14 AM UTC

Found solution, I did not generate code with CubeMX, only with Designer.

When updating, make sure you generate with both.

8 replies

Tuoman
TuomanAuthorBest answer
Senior II
Jul 11, 2022 6:14 AM UTC

Found solution, I did not generate code with CubeMX, only with Designer.

When updating, make sure you generate with both.

VBhat.2
Visitor II
Sep 12, 2022 10:38 AM UTC

how to generated the code from cubemx.

because i created project from touchgfx why should i generate code from cubeMX??

can you reply asap

awiernie
Associate III
Jul 11, 2022 8:37 PM UTC

Thank you. I had the same problem.

etienneEDM
Associate
Jul 13, 2022 12:29 PM UTC

Thank you :thumbs_up:

RENRI.1
Visitor II
Jul 18, 2022 12:57 PM UTC

Same problem with Keil uVision after upgrade from 4.19 to 4.20 .

Solved regenerating first from CubeMx thank from Designer...

PrjNameFoo.axf: Error: L6218E: Undefined symbol touchgfx::paint::rgb565::lineFromColor(unsigned short*, unsigned, unsigned, unsigned char, unsigned) (referred from painterrgb565.o).
 
PrjNameFoo.axf: Error: L6218E: Undefined symbol touchgfx::paint::rgb565::tearDown() (referred from painterrgb565.o).
 
PrjNameFoo.axf: Error: L6218E: Undefined symbol touchgfx::paint::rgb565::lineFromRGB565(unsigned short*, const unsigned short*, unsigned, unsigned char) (referred from painterrgb565bitmap.o).
 
PrjNameFoo.axf: Error: L6218E: Undefined symbol touchgfx::paint::rgb565::lineFromARGB8888(unsigned short*, const unsigned*, unsigned, unsigned char) (referred from painterrgb565bitmap.o).

gokhanozata
Associate II
Aug 11, 2022 9:52 AM UTC

I want to move my project to TouchGFX 4.20 from TouchGFX 4.18. 

But I allways take a error in IDE.

I uptaded MX, IDE and TouchGFX.

I opened project on MX. I selected TouchGFX 4.20 on Software Packs. And i generate, it open on IDE and I build all in IDE. So everything perfect.

But I must change GUI on the Touch GFX. For example I add pushbutton. I generate code in Touch GFX. Then i opened the project for writting the code in IDE. I build all in IDE but it gives error(linker).

I use this current version:

Touch GFX 4.20, IDE 1.10.1, MX 6.6.1

Eiffel
Associate III
Jan 6, 2023 1:43 PM UTC

Nice, 5 months from last reply but ST still successful ignoring problem they did. Looks the ST is not reliable company anymore.

Did anyone found solution?

Thanks

Romain DIELEMAN
ST Employee
Jan 10, 2023 4:59 AM UTC

Hello,

Could you explain which issue you are facing exactly ? There are multiple ones here. The initial one was that the user did not regenerate code from STM32CubeMX which is always recommended as there might be important changes between library versions, in this case the painter implementation. You can find more on the release posts on this forum or on the online documentation as well when there are known bugs.

If you are facing another type of issue please create another post for better visibility so that other users or st employees can help you. I would suggest contacting your local ST contacts if you have issues as this is a forum, we try to answer as much as we can but cannot find answer/find solution for every post.

/Romain