cancel
Showing results for 
Search instead for 
Did you mean: 

Broken images

Louie88
Senior

Hi,

I have a funny issue. I just wanted to add a Share button to my Main Screen in an STM32TouchGFX of a working Weather Station app but when I built and run the app in STMCubeIDE all the widgets which uses background images showed surprising garbage images.

20250415-img-extflash.png

Then I changed the Section and Extra Section to IntFlashSection in Default Image Configuration group of Config menu of STM TouchGFX:

20250415-TGFX-Config-Image-Group.png

Then I rebuilt and run the app and everything worked just fine:

20250415-img-intflash.png

Who understands this?

I Checked the HSPI configuration in STM32CubeMX but I could not find any wrong settings for octo-SPI, so the external flash memory which stores the images (by default) seems to be okay.

In addition any ST Demo which based of TGFX works with external flash settings.

What could go wrong?

Thanks,

Louis

12 REPLIES 12

Hello @Louie88 ,

 

Sorry for the delay.

 

For me it flashed fine in TouchGFX Designer both for internal and external flash.

 

I assumed that when you flashed in TouchGFX Designer it worked because you told me you had warnings (not errors) and I did not see a fail in the log but you don't show the flashing process in the log so I am not sure now if it flashed or not.

 

However, I saw that in STM32CubeIDE, you do not set the external loader on the debug.
To fix that, right click on your project in STM32CubeIDE, go to "Debug As" => "Debug Configurations" :

GaetanGodart_0-1746435886532.png

Then select your project followed by "debug", go to "Debugger", in the "External loader" section, click on "Add" and select your board:

GaetanGodart_1-1746435941028.png

Now you can try to flash on STM32CubeIDE.

 

Regards,

 

Gaetan Godart
Software engineer at ST (TouchGFX)
Louie88
Senior

Hi Gaetan,

Thanks for the solution.

What a shame, I should have known that myself....

However, in ToughGFX, in Config > Default Image Configuration int Section and Extra Section combo box I had to switch back to ExtFlashSection (from IntFlashSecion) otherwise even the external flash loader is selected In STM32CubeIDE the images still will be stored in internal flash.

I confirm that after selecting MX66LM1G45G_STM32U5G9J-DK2.stldr as External flash loader in Debug Configurations > Debug > External Loaders and using ExtFlashSection in ToughGFX Config every image appears on the LCD without any problem. There ara no broken images anymore.

Many thanks for your help. It was excellent.

Best regards,

Louis

 

Hello @Louie88 ,

 

My pleasure! :)

 


However, in ToughGFX, in Config > Default Image Configuration int Section and Extra Section combo box I had to switch back to ExtFlashSection (from IntFlashSecion) otherwise even the external flash loader is selected In STM32CubeIDE the images still will be stored in internal flash.

Yes, that is expected behavior because it is TouchGFX that place the assets in the memory, so if you selected internal flash, you will store the images in internal flash regardless of whether you have anexternal loader or not.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)