Skip to main content
Senior
July 26, 2021
Solved

TouchGFX_init make hardfault on Frontendheap function on STM32H743

  • July 26, 2021
  • 5 replies
  • 4232 views

Hello,

I have problem with touchGFX once i updated it from 4.16.1 to 4.17 ....

when touchgfx_init() function reached to this line (FrontendHeap& heap = FrontendHeap::getInstance();) it makes hardfault which i have not on previous version....

in assembly on this line:

0x08009748 F7FAFBF4 BL.W     _ZN12FrontendHeapC2Ev (0x08003F34)

Please help ......

This topic has been closed for replies.
Best answer by MHaji.1

Hi Romian,

The problem was solved when I decided to migrate from Keil to STM32CubeIDE... surprisingly everything's worked fine... I think Keil bugs made this issue...

Special thanks for your support.

5 replies

Romain DIELEMAN
ST Employee
August 30, 2021

Hi,

Digging this up a bit. Were you able to fix your issue ? Were you working on a custom hardware or on the STM32H743-EVAl board ? What toolchain/IDE are you working with (and which version) ?

I was not able to replicate your issue on the eval board, could you share your project if you are working on this board ? Or screenshots of the error message if any / hardfault ?

You say on your other post that you also tried to create a project from scratch, did you create it from STM32CubeMX 6.3 or from STM32CubeIDE ?

/Romain

MHaji.1AuthorBest answer
Senior
September 30, 2021

Hi Romian,

The problem was solved when I decided to migrate from Keil to STM32CubeIDE... surprisingly everything's worked fine... I think Keil bugs made this issue...

Special thanks for your support.

AJoke.1
Visitor II
December 23, 2021

Hello,

I have the same ​problem with identical behavior on stm32h743xi. Hard fault after line:

FrontendHeap& heap=FrontendHeap::getInstance();

Problem was in initialization of CRC module.

In my case default _weak implementation of HAL_CRC_MspInit() doesn't perform __HAL_RCC_CRC_CLK_ENABLE();

MHaji.1Author
Senior
December 26, 2021

Hi, Are you using cubeIde or Keil?

AJoke.1
Visitor II
January 11, 2022

Hi,

I use cubeide ​1.8.0

PPete
Associate III
August 12, 2023

I have the same Error using a Custom Board with a STM32H743ZI controller.
First a want to use the internal Flash and RAM_D1 for the TouchGFX App but i always get a Hardfault on Line
FrontendHeap& heap=FrontendHeap::getInstance();

__HAL_RCC_CRC_CLK_ENABLE(); is executed
my Toolchain is up to date


any ideas?

Richard Lowe
Senior II
September 18, 2023

Same error here. Using STM32H747i Eval board.

  • STM32CubeIDE version: 1.13.1
  • TouchGFX Version: 4.22.1
  • __HAL_RCC_CRC_CLK_ENABLE() executed

Added the first TextBox widget to my project. Added wildcard. When FronendHeap::getInstance() is called it is trapped by the MemManage_Handler fault. When disabling the Memory Management Unit, it is trapped in the HardFault_Handler.

If I delete the textbox, error is gone.

QSPI is initialized and in MemoryMapMode. Address is readable by the debugger.

Occasionally, if I step through the code, I can get by the FrontEndHeap::getInstance() only to have to crash at touchgfx::TextArea::getTextWidth().

 

 

I can confirm all bitmaps in QSPI load correctly, so QSPI does not seem to be the issue.

Richard Lowe
Senior II
September 18, 2023

A little more insight. When removing the linker directive for text and place it in flash, it works.

 TextFlashSection :
 {
 	ExtThirdPartyHeader = .;
 	KEEP(*(.TextFlashSection));
 	ExtThirdPartyHeader_end = .;
 } >QSPI

 Is there anything incorrect with the above directive?

Explorer II
April 12, 2024

i have the same problem