Skip to main content
Hosting
Associate III
June 3, 2019
Solved

Project TouchGFX, HardFault_Handler in IAR

  • June 3, 2019
  • 18 replies
  • 3231 views

Hey.

When starting the debugger in IAR, fall in HardFault_Handler.

__HAL_RC_CRC_CLK_ENABLE(); did not help.

attach log file.

This topic has been closed for replies.
Best answer by Martin KJELDSEN

Hi @Hosting​,

Maybe V1.0 supported a flashloader for the QSPI directly in the EWARM project. But this is definitely not something that we'll be doing going forward - It's too much work because we sometimes have to make them ourselves.

Using ST-Link, could you try the following?

1) Upgrade the firmware on the chip (ST-Link -> Firmware update)

2) Make sure you've specified the flashloader for the STM32F746G-DISCO under "External Loader"-> "Add External Loader". And find "N25Q128A_STM32F746G-DISCO"

/Martin

18 replies

Martin KJELDSEN
Principal III
June 4, 2019

Hi,

How did you create this project? I see it's STM32F746G-DISCO which is what we call the "dream board" here because it's been so stable for us. If you created the project from Touchgfx designer, the CRC should already be enabled.

/Martin

Hosting
HostingAuthor
Associate III
June 4, 2019

First generated in the designer touchgfx, then in IAR via the tab "open workspace" from the folder EWARM.

Hosting
HostingAuthor
Associate III
June 4, 2019

I did not understand what has changed, maybe the guys from ST updated something, but the folder structure changed when generating code in the TouchGFX designer. The main.cpp file has also changed. Now the debugger successfully starts and works. I apply screenshots of the project folder structure generated before and after some changes.0690X000008iDcTQAU.jpg

0690X000008iDcYQAU.jpg

Martin, can you tell me how it happened?:smiling_face_with_smiling_eyes:

Martin KJELDSEN
Principal III
June 4, 2019

Looks like you're using the latest version of the Application template for STM32F746G-DISCO (v2.0+) which is CubeMX enabled (has an .ioc file). The previous one (v1.0.0) did not. In any case, the folder structure between those versions of the Application template has changed. Does that make sense to you?

Hosting
HostingAuthor
Associate III
June 4, 2019

Verified. Indeed, STM32F746G-DISCO (v2.0+) has error while debugging, and V 1.1.0 version works good.

And how to use version 2.0 correctly? Or is it Bug?

Martin KJELDSEN
Principal III
June 6, 2019

Hi again,

I'll try to very this here at the lab. Stay tuned!