2026-01-06 7:31 AM - last edited on 2026-01-06 7:39 AM by Andrew Neil
Hi there,
I found an issue with the CubeMX 6.16.1 during the TouchGFX usage.
I generated the files by TouchGFX 4.26 (selected the Stm32h7s7 development board with 24bpp project) and opened the cubemx to generate the code (I've been using vscode so I changed only the toolchain/IDE to Cmake and and with these settings the project was flashed and worked everything correctly.
However, when I wanted to use the generate perpheral initialization as par of 'c/h' files and screen was struggled and couldn't read it's content. Nothing else was changed. In the visual studio I cleaned and rebuild the project but it did not work at all.
Would it be possible to solve this?
Thank you in advance!
2026-01-06 11:44 PM - edited 2026-01-20 4:37 AM
Hello @geriTricky
After checking the generated code with and without enabling the option “Generate peripheral initialization as a pair of .c/.h files”, I was not able to clearly identify the root cause of the behavior in your project. I am therefore adding @Osman SOYKURT
to provide further technical support on this topic.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-01-09 8:23 AM
Your post seems to be similar to a problem we are having with different STM32 board - (see attached detailed notes)
While checking project tools and project capability with latest version updates of tools before older task to newer rev of tools - found that after using STM32CubeMX “generate” on file the download program on the stm32u5g9j-dk2 run showed display problems – not correct graphics and not functional use. The problem is not seen if we do not STM32CubeMX 6.16.1 “generate code” after setting - generate peripheral initialization as a pair of 'c/h' files per peripheral (STM32CubeMX - Check box checked) – In other words the problem does not appear with downloading from the STM32CubeIDE 2.0.0 (TouchGFX 4.26.0 Generate, STM32CubeMX 6.16.1 (default settings) and STM32CubeIDE 2.0.0 Build/Debug works OK) - ( STM32CubeU5 Firmware Package V1.8.0)
2026-01-09 1:04 PM
PS – just for more fun we decided to try the “Project Manager – Code Generator - enabling the Generate c/h pairs” on the WS202 workstation that we were waiting to fully test the updated versions on – So it is still original since -
TouchGFX 4.24.0 Designer
STM32CubeMX 6.12.0
STM32CubeU5 Firmware Package V1.6.0
STM32CubeExpansion_FREERTOS V1.2.0
TouchGFX Generator V4.24.0
STM32CubeIDE 1.16.0
So, it is not likely from the tool updates – So seems to us – Do not use that check box – it seems that feature has been not working for a while – Have a backup unless you like to manually fix the problem. (it is the self-destruction feature!)