Skip to main content
Associate II
December 16, 2025
Solved

Getting a Hard Fault while debugging a TouchGFX example project on STM32H757I-EVAL

  • December 16, 2025
  • 3 replies
  • 569 views

Split from this thread for a new question.

Thank you. I've changed the programmer, and it now programmed without errors.

I however get a Hard Fault, sitting in HardFault_Handler(), as soon as I run. It happens before the code gets to main(). It also does not look like it is matching symbols to files correctly, because it is not showing code. I did check that Load Symbols is checked in debugger settings.

Can this HardFault be related, or should I start new post to help with that?

Best answer by JohanAstrup

Hello again.

Could you try to follow this process instead:

  1. Open TouchGFX Designer.
  2. Go to the "Demos" tab.
  3. Press "Select Board Setup".
  4. Select "STM32H747I Evaluation".
  5. Select "TouchGFX Demo 2" and press "Create".
  6. Press F6 or click the "Program and Run Target" button.

You can also debug it directly in STM32CubeIDE, but I recommend first verifying that it works using the procedure described above.

Best regards,
Johan

3 replies

ST Employee
December 19, 2025

Hello @Pieter25.

Which example project are you trying to run?

Could you test the TBS for STM32H747I-EVAL available in TouchGFX Designer? I believe this project should also work for STM32H757I-EVAL.

JohanAstrup_0-1766134136915.png

Best regards,
Johan

Pieter25Author
Associate II
December 23, 2025

In STMCube32IDE, I followed these steps:

  1. File > New > STM32 Project.
  2. Selected Example Selector tab.
  3. Type STM32H757I-EVAL for Board, and select the TouchGFX example (see image below).
  4. Used all the default settings.
  5. Build the project.
  6. Create new debug connection to debug the TouchGFX Release that was built.
  7. Select MT25TL01G_STM32H747I-EVAL.stldr as external loader.
  8. Debug the application.

Is there something I missed or did wrong?

I've tried going into compiler options and compile with -g and -Og (to enable debugging and disable speed optimisation) but it made no difference. I can at least see the HardFault() after adding debug symbols (-g). Below is a screengrab of where it gets stuck in HardFault, and the call stack does not help me much.

Pieter25_0-1766485589589.png

Pieter25_1-1766486178249.png

 

 

JohanAstrupBest answer
ST Employee
January 23, 2026

Hello again.

Could you try to follow this process instead:

  1. Open TouchGFX Designer.
  2. Go to the "Demos" tab.
  3. Press "Select Board Setup".
  4. Select "STM32H747I Evaluation".
  5. Select "TouchGFX Demo 2" and press "Create".
  6. Press F6 or click the "Program and Run Target" button.

You can also debug it directly in STM32CubeIDE, but I recommend first verifying that it works using the procedure described above.

Best regards,
Johan

Pieter25Author
Associate II
February 9, 2026

Thanks for your response. It is a pity that I do not know what was wrong with the first project, but the one from TouchGFX worked, and did not generate HardFault.