2021-09-14 05:03 AM
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!
Solved! Go to Solution.
2021-09-15 05:51 AM
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.
/Romain
2021-09-15 08:13 AM
BINGO !!!
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 ?
2021-09-16 01:11 AM
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 :grinning_face_with_sweat:
/Romain
2021-09-16 01:19 AM
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
2021-09-16 02:23 AM
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 !