cancel
Showing results for 
Search instead for 
Did you mean: 

How to import code generated by TouchGFX Designer

FBarb
Associate

Hi guys,

I'm taking my first steps in touchgfx library, so it is probably a dumb question.

To understand how touchgfx works, I'm using a STM32F746G_DISCO.

As first step, I opened the TouchGfx demonstration present in the STM32Cube repository. The project compiles (I use Keil as IDE) and works correctly.

So, my next step is to understand how import the code generated by TouchGFX Designer in a custom project.

I created a simple project on FreeRTOS (another blink LED project) and I use the TouchGFX Designer to design a simple gui.

I had chosen STM32F746G_DISCO as Application Template, and after designing the interface - only a background image and a text box -, I clicked on Generate Code button.

In the Keil Project I've imported the following folders:

-TouchGFX/App

-TouchGFX/generated

-TouchGFX/gui

-TouchGFX/target.

I've also imported the touchgfx middleware present in the TouchGFX Designer project and added the "include folders" in the Keil Project.

When I try to compile the code, the linker report me the following errors:

linking...
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::LCD16bpp::LCD16bpp() (referred from touchgfxconfiguration.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::HAL::configurePartialFrameBuffer(unsigned short, unsigned short, unsigned short, unsigned short) (referred from touchgfxgeneratedhal.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::HAL::drawDrawableInDynamicBitmap(touchgfx::Drawable&, unsigned short) (referred from touchgfxgeneratedhal.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::HAL::drawDrawableInDynamicBitmap(touchgfx::Drawable&, unsigned short, const touchgfx::Rect&) (referred from touchgfxgeneratedhal.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::HAL::blitCopy(const unsigned short*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned char, bool, unsigned short, touchgfx::Bitmap::BitmapFormat, touchgfx::Bitmap::BitmapFormat) (referred from touchgfxgeneratedhal.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::HAL::blitFill(touchgfx::colortype, unsigned short, unsigned short, unsigned short, unsigned short, unsigned char, unsigned short, touchgfx::Bitmap::BitmapFormat) (referred from touchgfxgeneratedhal.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::TextProvider::initialize(const unsigned short*, std::__va_list, const unsigned short*) (referred from fontcache.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::ConstFont::ConstFont__sub_object(const touchgfx::GlyphNode*, unsigned short, unsigned short, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned short, unsigned short) (referred from generatedfont.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::LCD16bpp::enableTextureMapperAll() (referred from frontendapplicationbase.o).
STM32746G_DISCOVERY\FLAVIOAPP.axf: Error: L6218E: Undefined symbol touchgfx::Texts::currentLanguagePtr (referred from buttonwithlabel.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.

Well, it seems that the header files are included correctly (I don't have a "header file missing" error by the compiler), but I don't explain why I have the error above.

Thanks a lot for the support,

Flavio

Ps: I've noted that TouchGFX Designer creates a MDK-ARM project, but the project contains a lot of missing files and the it wasn't useful to understand the problem.

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello,

What do you mean by "the project contains a lot of missing files" ?

If you chose the Application Template F746G-DISCO in TouchGFX Designer, the Keil project should work correctly. If your GUI is only a button and a background, I highly suggest you to create your GUI in this project and not copy/pasting folders from one project to the other.

Only TouchGFX/assets, TouchGFX/gui and TouchGFX/project.touchgfx are necessary to copy if really necessary but other complications might occur.

/Alexandre

View solution in original post

3 REPLIES 3
Alexandre RENOUX
Principal

Hello,

What do you mean by "the project contains a lot of missing files" ?

If you chose the Application Template F746G-DISCO in TouchGFX Designer, the Keil project should work correctly. If your GUI is only a button and a background, I highly suggest you to create your GUI in this project and not copy/pasting folders from one project to the other.

Only TouchGFX/assets, TouchGFX/gui and TouchGFX/project.touchgfx are necessary to copy if really necessary but other complications might occur.

/Alexandre

Martin KJELDSEN
Chief III

Check your linker settings. Looks like you're not linking with the touchgfx library properly.

FBarb
Associate

Dear Alexandre and Martin,

Thanks for your rapid response.

Well, I goofed ! I have generated the code again and the Keil Project (created by TouchGFX Designer) includes only the files present in the project.

Maybe, I had opened the keil project before clicking on Generate Code button.. but never mind, now it works and that's the important thing.

Now, It is easier for me to understand how use properly the code generated by TouchGFX Designer.

Thanks again for your support.

Flavio

Ps: I warned you that is was probably a dumb question.