cancel
Showing results for 
Search instead for 
Did you mean: 

Source Code of Demo Application for STM32U5G9J-DK2

ArunJohn
Associate II

Hello,

I’ve recently purchased the STM32U5G9J-DK2 Discovery board and noticed it came with a demo app preloaded with UI, touch input, etc. But I can't seem to find the source code for it anywhere.

I checked STM32CubeIDE examples, the STM32U5 firmware package and even TouchGFX Designer, but no luck so far.

Also, the examples in STM32CubeIDE don’t seem to have a proper TouchGFX integration for this board and the TouchGFX Designer demos I tried show corrupted graphics on the screen.

Having a working sample project would really help right now because I’m not sure how to get the GUI part working without one. Just something that shows how to properly set up TouchGFX on this board, even a basic example would do.

If anyone knows where the source code for the original demo is, or has a working TouchGFX example for this board, or at least point me in the right direction, I’d really appreciate it!

Thanks in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
GaetanGodart
ST Employee

"Hello @ArunJohn ,

 

You should be able to create a project on the TouchGFX Designer for your STM32U5G9K-DK2 without issue.

 

Here are the steps:

  1. Open TouchGFX Designer, click on "Demos" then "Select Board Setup", type "U5G9" and select your board (there is a FreeRTOS and a ThreadX version)
    GaetanGodart_0-1747063079643.png
  2. Select a demo and click on "Create"
    GaetanGodart_1-1747063219430.png

     

  3. Connect your board and click on "Program and Run Target"
    GaetanGodart_2-1747063283534.png

     

 

By following this steps you should have a working demo on your STM32U5G9J-DK2.

If it not the case, double check :

  • you connected the board to the STLINK pin
  • the jumpers/switches are set for STLINK flashing
  • you are flashing both the code and the assets (this is default):
    GaetanGodart_3-1747063400053.png

     

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

View solution in original post

8 REPLIES 8
GaetanGodart
ST Employee

"Hello @ArunJohn ,

 

You should be able to create a project on the TouchGFX Designer for your STM32U5G9K-DK2 without issue.

 

Here are the steps:

  1. Open TouchGFX Designer, click on "Demos" then "Select Board Setup", type "U5G9" and select your board (there is a FreeRTOS and a ThreadX version)
    GaetanGodart_0-1747063079643.png
  2. Select a demo and click on "Create"
    GaetanGodart_1-1747063219430.png

     

  3. Connect your board and click on "Program and Run Target"
    GaetanGodart_2-1747063283534.png

     

 

By following this steps you should have a working demo on your STM32U5G9J-DK2.

If it not the case, double check :

  • you connected the board to the STLINK pin
  • the jumpers/switches are set for STLINK flashing
  • you are flashing both the code and the assets (this is default):
    GaetanGodart_3-1747063400053.png

     

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
ferro
Lead

Hi @ArunJohn 

"I can't seem to find the source code for it anywhere"

you can get it from GfxDesigner as explained here

https://community.st.com/t5/stm32-mcus-boards-and-hardware/code-for-touchgfx-demo-stm32u5g9/m-p/675907#M19094

 

Hello@GaetanGodart 

would it be possible to make a carbon copy of the flash with CubeProgrammer and then flash that to get exact SW that was in the board upon purchase ?

 

The out of the box demo delivered on the board upon purchase might not be one of the demos available in Designer, we provide MCU load and some other demos such as the "map demo" on the out of the box demo.

I don't remember what is flashed by default on the STM32U5G9J-dk2.

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello @ferro ,

 

It is probably possible.
You juts need to by pass read protection if they are here, a good retro-engineering software such as Ghidra and the skills to do it :)

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
ferro
Lead

@ArunJohn 

"the TouchGFX Designer demos I tried show corrupted graphics on the screen."

I tried to run Demo 7 from GfxDesigner and it works Okay on my board. Which demos are corrupted on your board ? I'll try those.

ferro_0-1747132214940.png

 

Thanks a lot for the quick response and for sharing this info - that really helps!

One more thing - would it be possible to also share the a sample .ioc file used for this demo project (or any similar project for this board)? I’m mainly trying to understand how the LTDC and TouchGFX middleware are configured, and having the .ioc  as a reference would make things a lot easier to replicate.

Appreciate the support!

Hello @ArunJohn ,

 

You can just create a project using the STM32U5G9J-DK2, it uses LTDC:

GaetanGodart_0-1747303214947.png

Then click on the folder icon to open the file location:

GaetanGodart_1-1747303247367.png

 

And then you can navigate you level back to find the ioc file:

GaetanGodart_2-1747303293246.png

 

 

Regards,

 

Gaetan Godart
Software engineer at ST (TouchGFX)