cancel
Showing results for 
Search instead for 
Did you mean: 

HardFault in TouchGFX Default Project on STM32H7S78-DK

diogomargalho
Associate II

Hello,

I am using a STM32H7S78-DK and I created a project using TouchGFX Designer with the default empty template. However, when I try to run it, the board immediately hard faults.

Stack Trace:

main()
└── MX_TouchGFX_Init()
└── touchgfx_components_init()
└── nema_init()
└── nema_sys_init()
└── tsi_malloc_init_pool_aligned(1, (void*)nemagfx_stencil_buffer_mem, (uintptr_t)nemagfx_stencil_buffer_mem, NEMAGFX_STENCIL_POOL_SIZE, 1, 8);

I've seen some some discussions where the CRC could be the problem, everything seems fine with the CRC, and i don't think any of the issues are directly related to the NeoChrom GPU.
A while back i tried the same project setup, and it was fine. After that i was checking Rust with Embassy and adding lvgl to an empty project. I'm not sure if it could be related, it might just be a weird coincidence.

6 REPLIES 6
GaetanGodart
ST Employee

Hello @diogomargalho ,

 

Can you describe the steps to achieve this error?

I open TouchGFX Designer 4.25.0, create a new project with STM32H7S78-DK with freeRTOS and RGB565 and I am able to flash from the TouchGFX Designer itself.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

The steps to achieve it are:

  1. Open TouchGFX Designer.
  2. Create 'STM32H7S78 Discovery Kit'
  3. Generate Code
  4. Open the project with STM32CubeIDE
  5. Add the Boot ELF to the Application Startup
    diogomargalho_0-1743004526681.png
  6. Debug 'STM32H7S78-DK_Appli'

After this it crashes.

Debug window

diogomargalho_2-1743004788128.png

Fault Analyzer window

diogomargalho_3-1743004833294.png

nema_hal.c file

diogomargalho_4-1743004990113.png

 



I never flashed a STM32H7S78-DK through STM32CubeIDE.

Usually, I build the code through STM32CubeIDE and then I open STM32CubeProgrammer to flash.
I select the external loader for the STM32H7S78-dk board then I connect the board, then I flash the boot and then I flash the appli.

Would this be ok for you to do that or do you really want to flash through STM32CubeIDE (I am not an expert on STM32CubeIDE but I could ask someone).

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

I don’t think the issue is with flashing. I’ve flashed from STM32CubeIDE in other projects without any problems. I think the problem could be in the code or the board itself, but I can try flashing through STM32CubeProgrammer.

Hello @diogomargalho ,

 

Have you had time to try to flash through STM32CubeProgrammer?

Regarding STM32CubeIDE, perhaps you should not add the boot elf to the application startup, simply build both the boot and appli, then flash the boot, then flash the appli, then run.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

@diogomargalho 
I also encountered the same problem, so I just changed the compiler to EWARM, maybe you can try it.