cancel
Showing results for 
Search instead for 
Did you mean: 

Flexbutton won't show images on target device

MZ68
Associate II

Hi all,

I'm trying to use flexbutton having three layers (text, image, box with borders).

Everything looks fine on the designer (4.17.0) but when i flash the target device (stm32h735disco) the images aren't shown.

This happens flashing both from designer 4.17.0 or IDE 1.6.1

Any advice ?

Thanks!

14 REPLIES 14

OK so I think I have found the issue (I hope it isn't just an error from ziping and unziping the project). In the settings of the image in the flex button you have not set the "pressed" image. Because of that the code was never properly generated for the image as you can see in MainMenuViewBase.cpp in the TouchGFX/generated/gui_generated/src/mainmenu_screen (fix the issue for one of the flex buttons and generate code, you will see that the code is different for the button fixed)

It is surprising that you (at least I) did not get an error message from this.

0693W00000DnFjLQAV.png/Romain

MZ68
Associate II

0693W00000DnHMTQA3.jpgBINGO !!!

I'd have never tought to this because i usually work on c# and delphi and if you don't specify a pressed image the controls simply use the released for both.

Thank you so much for all your help, Romain !

BTW, did you try to run the project in the simulator (F6) ? is it working in your environment ?

I did try it. You need to modify the makefile under the TouchGFX/simulator/gcc folder to include the path to libraries outside of the TouchGFX folder. I gave it a quick go yesterday but did not manage to make it work. I am not super skilled in editing Makefiles sorry 😅

/Romain

Otherwise when you write code that you only work for the simulator you can enclose it in something like this:

#ifdef SIMULATOR
//...
#endif

So in your case you can do the opposite for something to run only when running on target with ifndef I think

#ifndef SIMULATOR
//...
#endif

/Romain

MZ68
Associate II

Since I can't see my latest answers, I'm here to thank you again, the previous post is the solution, now it all works fine.

I'm surprised too because I hadn't no errors or warnings, maybe this could be fixed in next touchgfx releases.

Thanks Romain !