cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R9 + touchgfx4.20 + MDK build error?

zhuij.1
Associate II

Error: L6218E: Undefined symbol touchgfx::paint::rgb565::lineFromColor(unsigned short*, unsigned, unsigned, unsigned char, unsigned) (referred from painterrgb565.o).

How to resolve?

1 ACCEPTED SOLUTION

Accepted Solutions
Yoann KLEIN
ST Employee

Hello @zhuij.1​ ,

I tried to reproduce your error, but everything worked fine for me when I started a STM32L4R9 project from scratch, generated code for MDK-ARM in CubeMX and then generated code in TouchGFXDesigner.

Could you please try to delete your Middlewares>ST folder, then press generate code in TouchGFXDesigner again. After that, please try to rebuild your MDK-ARM project and let me know if you still have the same issue.

Thank you,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

View solution in original post

8 REPLIES 8
Yoann KLEIN
ST Employee

Hello @zhuij.1​ ,

I tried to reproduce your error, but everything worked fine for me when I started a STM32L4R9 project from scratch, generated code for MDK-ARM in CubeMX and then generated code in TouchGFXDesigner.

Could you please try to delete your Middlewares>ST folder, then press generate code in TouchGFXDesigner again. After that, please try to rebuild your MDK-ARM project and let me know if you still have the same issue.

Thank you,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX
RetroInTheShade
Associate III

Hi @zhuij.1​ ,

If you have just upgraded touchgfx from an earlier version, it would be also worthwhile looking at:

https://support.touchgfx.com/4.20/docs/miscellaneous/known-issues

This references this type of issue.

Cheers.

add the blow header,the error disappear0693W00000Nt82gQAB.png

It worked fine, because you created new project from scratch.

I've got similar errors while upgrading from 4.19.1:

Error: L6218E: Undefined symbol touchgfx::paint::rgb888::lineFromColor(unsigned char*, unsigned int, unsigned int, unsigned char) (referred from painterrgb888.o).
Error: L6218E: Undefined symbol touchgfx::paint::rgb888::tearDown() (referred from painterrgb888.o).
Error: L6218E: Undefined symbol touchgfx::paint::rgb888::lineFromRGB888(unsigned char*, unsigned char const*, unsigned int, unsigned char) (referred from painterrgb888bitmap.o).
Error: L6218E: Undefined symbol touchgfx::paint::rgb888::lineFromARGB8888(unsigned char*, unsigned int const*, unsigned int, unsigned char) (referred from painterrgb888bitmap.o).
Error: L6218E: Undefined symbol touchgfx::paint::rgb888::lineFromL8RGB888(unsigned char*, unsigned char const*, unsigned int, unsigned char) (referred from painterrgb888l8bitmap.o).
Error: L6218E: Undefined symbol touchgfx::paint::rgb888::lineFromL8ARGB8888(unsigned char*, unsigned char const*, unsigned int, unsigned char) (referred from painterrgb888l8bitmap.o).
Error: L6218E: Undefined symbol touchgfx::paint::rgb888::setL8Pallette(unsigned char const*) (referred from painterrgb888l8bitmap.o).

Including PaintRGB565Impl.hpp, as shown above did not solve an issue - error messages changed to "multple defined symbol" for all those methods.

@Yoann KLEIN​ 

Can you try to reproduce it by upgrading working project from TouchGFX 4.19.1 to 4.20?

I've found it while working on STM32F779. Advices from this thread didn't help.

Hello @embelon​ ,

Did you also try to delete your TouchGFX>target folder, and then regenerate code with CubeMX and TouchGFXDesigner ?

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

@Yoann KLEIN​ 

Yes, regenerated both CubeMX and TouchGFX, then removed target folder and regenerated all second time while trying to get that working.

I'm going to try to do that migration once again starting from clean, working project based on TouchGFX 4.19.1.

Hello again, @Yoann KLEIN​ 

Tried the whole process of migration once again. Without much luck.

I did a little walk through TouchGFX and found a reason for the issue.

Someone have put functions definitions (implementations) in header file PaintRGB565Impl.hpp. Don't know anything about coding standards for TouchGFX, but it's not considered good practice in C and C++ (except for templates) and for a reason.

Keil MDK just exposed this issue.