cancel
Showing results for 
Search instead for 
Did you mean: 

Project TouchGFX, HardFault_Handler in IAR

Hosting
Associate III

Hey.

When starting the debugger in IAR, fall in HardFault_Handler.

__HAL_RC_CRC_CLK_ENABLE(); did not help.

attach log file.

18 REPLIES 18

I made a short video for you:

https://youtu.be/mMRCdwzolpE

Thanks for that!

Does the Hardfault occur instantly if you simply run the program without stepping through the code? Can you try beaking inside setupScreen() of one of your views?

/Martin

In Hardfault, it happens even when the code is executed immediately. And before the setup Screen() does not even reach.

Do you have another board to try? Maybe find a way of sharing the project with me? I can try to reproduce the problem on my board here.

/Martin

link to the project - https://yadi.sk/d/TJehikz88OYF3Q

Full the cycle as I create the project version v 2.0 - https://youtu.be/EjoVgS0ZFz0

The other target Board, unfortunately no.

Thanks,

I've got Animation Example running on my board. I'm assuming that's what you were trying to program. From your stack trace i saw it was trying to initialize texts before the hardfault, and texts are placed in external flash (qspi) - There is no flash programmer configured in the EWARM project. I could reproduce your issue if i did not program the external flash but the application runs well when you do (I used st-link). Basically, you application is trying to initialize languages from QSPI but since there is no code there you get a hard fault.

Just use ST-Link/CubeProgrammer to program the external flash memory and it should work. (I did not use neither texts or images in my test, which is why the AT works for me from IAR out of the box - But there is no external flash loader configure in the EWARM project)

Hope that helps!

Thanks for the detailed answer.

But I did not understand why this error occurs.

I also tried to program using ST-LINK Utility and got an error:

0690X000008iKy7QAE.jpg

The logical question is whether this will be fixed in the next update, because in version v1.1.0 it works fine?

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

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

But this way was strange, and before that it is necessary to guess. Doing debugging in search of an error for me it was not obvious that the code lacks a bootloader in an external flash drive.

Thank you, it was a good experience.😊 😉