Source Code of Demo Application for STM32U5G9J-DK2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 6:45 AM
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!
Solved! Go to Solution.
- Labels:
-
LCD-LTDC
-
STM32CubeMX
-
TouchGFX
-
TouchGFX Designer
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 8:23 AM
"Hello @ArunJohn ,
You should be able to create a project on the TouchGFX Designer for your STM32U5G9K-DK2 without issue.
Here are the steps:
- Open TouchGFX Designer, click on "Demos" then "Select Board Setup", type "U5G9" and select your board (there is a FreeRTOS and a ThreadX version)
- Select a demo and click on "Create"
- Connect your board and click on "Program and Run Target"
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):
Regards,
Software engineer at ST (TouchGFX)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 8:23 AM
"Hello @ArunJohn ,
You should be able to create a project on the TouchGFX Designer for your STM32U5G9K-DK2 without issue.
Here are the steps:
- Open TouchGFX Designer, click on "Demos" then "Select Board Setup", type "U5G9" and select your board (there is a FreeRTOS and a ThreadX version)
- Select a demo and click on "Create"
- Connect your board and click on "Program and Run Target"
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):
Regards,
Software engineer at ST (TouchGFX)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 8:32 AM
Hi @ArunJohn
"I can't seem to find the source code for it anywhere"
you can get it from GfxDesigner as explained here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 8:41 AM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-13 1:02 AM
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.
Software engineer at ST (TouchGFX)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-13 1:05 AM
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,
Software engineer at ST (TouchGFX)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-13 3:32 AM - edited ‎2025-05-13 3:35 AM
"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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-14 9:54 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-15 3:01 AM
Hello @ArunJohn ,
You can just create a project using the STM32U5G9J-DK2, it uses LTDC:
Then click on the folder icon to open the file location:
And then you can navigate you level back to find the ioc file:
Regards,
Software engineer at ST (TouchGFX)
