cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX code enters hard fault after code generation with CubeMX

btyilmaz
Associate II

Hi,

I am currently working in a project with TouchGFX. I am using STM32H757 evaluation board. I created a simple GUI to learn the basics of TouchGFX, when i debug the code after generating the code in TouchGFX designer there is no problem i can see the gui on the screen.

However, when i add a functionality (GPIO and USART) in the CubeMX screen and generate the code, debug process is slowed down (it takes around 2-3 minutes) and code enters hard fault at MX_TouchGFX_Init.

I stepped over each line and found that code enters hard fault at setLanguage function inside the Texts.cpp. Exactly the following line causes a hard fault. I didn't change any settings in the CubeMX screen (same settings for LTDC, TouchGFX and FreeRTOS), just added a GPIO function.

If anyone can help me how to solve this issue i would appreciate it. I am a beginner at TouchGFX, so any guideline would be really helpful to me.

currentLanguageTypedText = typedTextDatabaseArray[id];

11 REPLIES 11

I recommend to not open the ioc file in STM32CubeIDE and to open it instead directly in STM32CubeMX :grinning_face_with_sweat: The process will be smoother in my opinion, I find it laggy with stm32CubeIDE which is why I never do it that way even though I have never experienced such a bug.

/Romain

Romain thanks, it seems, this workaround, you've mentioned above, is working well :)