Skip to main content
MZ68
Associate II
September 14, 2021
Solved

Flexbutton won't show images on target device

  • September 14, 2021
  • 14 replies
  • 5331 views

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!

This topic has been closed for replies.
Best answer by Romain DIELEMAN

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

14 replies

Romain DIELEMAN
ST Employee
September 14, 2021

Hi,

Can you display those images when using a Image widget instead of a flex button ? are they stored in internal or external flash ? Could you share one of them so that I can try to replicate it ?

/Romain

MZ68
MZ68Author
Associate II
September 14, 2021

0693W00000Dn8Z5QAJ.png0693W00000Dn8ZTQAZ.jpgHi Romain, thanks for your interest.

Yes, the Image widget works fine, you can see it in action in the attached files.

I also attach the png file I used for this example.

Thanks

MZ

Romain DIELEMAN
ST Employee
September 15, 2021

Hum it does work on my side this is strange. Did you start your project from the available TouchGFX Board Setup for the STM32H735disco or did you start your project from scratch from STM32CubeMX or STM32CubeIDE ? Could you go to the "Config" settings (click on the "Config" tab on the left of TouchGFX Designer) ? There go to the "Framework Features" settings and make sure the relevant features are set. The Flex Button widget uses texture mappers unlike the Image widget, so maybe try to use a Texture Mapper widget (found in the same group as the Image widget) to see if my suspicion is correct.

/Romain

MZ68
MZ68Author
Associate II
September 15, 2021

0693W00000DnDiVQAV.jpg0693W00000DnDdNQAV.jpg0693W00000DnDvZQAV.jpgI started a brand new project from TouchGFX Designer using a blank project ( I mean from scratch) selecting STM32H735disco as target

The control you can see in the attached picture is a texturemapper widget, it seems to work fine....

More, all of the checkmarks in the framework features tab are checked.

I agree with you, this sounds really strange...

Romain DIELEMAN
ST Employee
September 15, 2021

Could you maybe share your project so that I can have a look ? Or share screenshots of the image configuration in the settings tab on the right in TouchGFX Designer.

By starting from scratch I meant from STM32CubeMX or STM32CubeIDe, if you started from Designer by selecting the STM32H735 disco then I have the same setup as you which makes the error even weirder since I cannot replicate it :grinning_face_with_sweat:.

​

Could you look on the other side of the board for the revision number ? Something like MB1520-H736I-B02 in my case.

/Romain

Romain DIELEMAN
ST Employee
September 15, 2021

Could you also navigate to the C/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/ExternalLoader folder and look for MX25LM1245G_STM32H735G-DK.stdlr ? I want to make sure you have the external loader available (even though you already are able to flash images.

/Romain

MZ68
MZ68Author
Associate II
September 15, 2021

I'm really sorry to disturb you but this error is really0693W00000DnElGQAV.jpg weird...

Yes, there's no problem with me to share the project with you, at the moment it only consists of the menu you can see and another page to control an LED modulating pwm.

Only, is there some way different than posting my code on this forum ? Please, let me know...

My board's revision number is  MB1520-H735I-B02, I think that should be the same as yours

Thanks !

MZ

Romain DIELEMAN
ST Employee
September 15, 2021

Yes my bad it is a typo I also have the MB1520-H735I-B02. You can send me the project through the message box in the forum.

/Romain

MZ68
MZ68Author
Associate II
September 15, 2021

The loader seems to be in it's place

I'm packaging a zip file to send to the whole project

Thanks for your efforts !

MZ

0693W00000DnF0pQAF.jpg

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
September 15, 2021

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
MZ68Author
Associate II
September 15, 2021

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 ?

Romain DIELEMAN
ST Employee
September 16, 2021

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

MZ68
MZ68Author
Associate II
September 16, 2021

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 !