cancel
Showing results for 
Search instead for 
Did you mean: 

Images are distorted when the binaries are flashed from STM32CubeProgrammer, but works fine when flashed through TouchGFX ->Run target

KNara.2
Associate III

Images used in the screens when TouchGFx project is created displays fine when the Binaries are loaded from TouchGFX ->Run Target. When the corresponding code generated for STM32cubeIDE is built and loaded on the board using STM32CubeProgrammer using the corresponding external loader the images are seen distorted.

STM32Cube IDE version : V.10.0

STM32CubeProgrammer : V2.11.0

TouchGFX : 4.20.0

Board : ETEMB043013XDHAL

Project that I used to create in TouchGFX is EVK043013B.

I have copied the external loaders generated from TouchGFX from this path Drivers\vendor\Board\SE21098\Flashloader to the STM32CubeProgrammer path C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader.

Also in STM32CubeProgrammer I have selected MT25QL256A_20210984A_EDT.stdlr.

What could be causing this issue?

The way the TouchGFX is built is different from STM32Cube IDE build?

Am I using a wrong flashloader?

1 ACCEPTED SOLUTION

Accepted Solutions
KNara.2
Associate III

Hey figured out the solution.

Posting it here, in the hope it will help out someone in future.

Issue was with mismatch of USE_BPP settings between TouchGFX and STM32CubeIDE.

In TouchGFX its 24 and in STM32CubeIDE it was set to 16.

0693W00000Y84N1QAJ.pngChanged the settings to 24 in STM32CubeIDE and voila it worked :)

View solution in original post

6 REPLIES 6
Romain DIELEMAN
ST Employee

Hi,

When you run on target from TouchGFX Designer you are actually flashing using STM32CubeProgrammer (you can see the command in the Makefile under the gcc folder in most projects available from TouchGFX Designer). But when you run on target from STM32CubeIDE you are also actually using STM32CubeProgrammer but an internal one. So you need to put the external loader files in a different path than the one you found.

It should be somewhere like this : C:\ST\STM32CubeIDE_1.10.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.301.202207041506\tools\bin\ExternalLoader

Bit annoying I know :grinning_face_with_sweat:

/Romain

Misread your message sorry, you are just using STM32CubeIDE to generate the binary and then use STM32CubeProgrammer by itself to run on target so what I wrote above is true but does not answer your question :grinning_face_with_sweat:

KNara.2
Associate III

Is there a difference in the way TouchGFx compiles the code and STM32Cube IDE which is causing this issue?

Not all images...but randomly some images gets distorted.

Also I have added Manrope font support by adding the .ttf files.....Could that be causing this issue?

The difference is just that running on target with TouchGFX is done with gcc, the TouchGFX generated code itself is the same. Could also just come from your STM32CubeProgrammer settings :thinking_face:

Concerning the manrope font, i doubt this has an impact.

/Romain

KNara.2
Associate III

Hey figured out the solution.

Posting it here, in the hope it will help out someone in future.

Issue was with mismatch of USE_BPP settings between TouchGFX and STM32CubeIDE.

In TouchGFX its 24 and in STM32CubeIDE it was set to 16.

0693W00000Y84N1QAJ.pngChanged the settings to 24 in STM32CubeIDE and voila it worked :)

Thanks for sharing the solution :thumbs_up: