2025-02-14 7:43 AM
Hello,
we previously used the STM32U5G9J-DK2 discovery kit with FreeRTOS and TouchGFX (with hardware-accelerated Vector Font Rendering, etc) successfully.
Now we are trying to bring up a custom STM32U5G7VJ based board. We first created the ioc File with CubeMX, configured all the pins and later on enabled FreeRTOS and TouchGFX middlewares. As far as possible, the settings from the discovery board were replicated (except we now use RGB888 instead of RGB565 and a few different LTDC and OCTOSPI settings)
After opening the project template in the TouchGFX editor, a hello world screen was added.
However, when building in STM32CubeIDE, the following error occurs in TouchGFX/target/generated/HardwareMJPEGDecoder.cpp: fatal error: jpeg_utils.h: No such file or directory
When I compared the HardwareMJPEGDecoder.cpp file between the discovery kit project and our own, I noticed it's different: The one from the discovery kit is around 5 KB larger and it has no #include <jpeg_utils.h> line.
Any ideas why this file is generated differently, even though the CubeMX configurations match (except for the details above) ?
Thank you.
Solved! Go to Solution.
2025-03-19 5:27 AM
Hello @clemens, sorry for the late reply.
jpeg_utils.h with hardware decoded video is only used for STM32F7. Unfortunately, we currently only check if the subfamily contains "F7" in TouchGFX Generator, which causes the mistakenly include for STM32U5F7 as well.
We will fix this bug in the next TouchGFX release, but since we just released version 4.25.0, the next release is not imminent.
In the meantime, there is the following workaround:
I have attached a modified STM32CubeMX folder that includes the bug fix. You should replace C:\Users\YOUR_USER\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-TOUCHGFX\4.25.0\STM32CubeMX with this. However, this fix is only for TouchGFX 4.25. If you are using a different TouchGFX version, you will need to implement the bug fix yourself.
Please let me know if you encounter any issues with this workaround. If necessary, I can implement the bug fix for other versions as well.
Best regards,
Johan
2025-02-19 7:19 AM
I got a litte bit more information:
If I set the Video Encoding Type from Hardware to Disabled in the TouchGFX parameters in CubeMX and regenerate the project, it compiles successfully.
However, as we plan to use MJPEG encoded videos in our project, this is not a viable solution..
Diffing the working discovery board project with our new project shows the following differences:
FreeRTOS 10.4.6 -> 10.6.2
TouchGFX 4.24.0 -> 4.24.2
JPEG_RGB_FORMAT JPEG_RGB565 -> JPEG_RGB888
I don't understand why the include to the non-existing jpeg_utils.h is added for our new project and not for the discovery board.
2025-03-19 5:27 AM
Hello @clemens, sorry for the late reply.
jpeg_utils.h with hardware decoded video is only used for STM32F7. Unfortunately, we currently only check if the subfamily contains "F7" in TouchGFX Generator, which causes the mistakenly include for STM32U5F7 as well.
We will fix this bug in the next TouchGFX release, but since we just released version 4.25.0, the next release is not imminent.
In the meantime, there is the following workaround:
I have attached a modified STM32CubeMX folder that includes the bug fix. You should replace C:\Users\YOUR_USER\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-TOUCHGFX\4.25.0\STM32CubeMX with this. However, this fix is only for TouchGFX 4.25. If you are using a different TouchGFX version, you will need to implement the bug fix yourself.
Please let me know if you encounter any issues with this workaround. If necessary, I can implement the bug fix for other versions as well.
Best regards,
Johan