Skip to main content
Associate
December 12, 2025
Question

Cube IDE v2.0.0 - Hard Fault error

  • December 12, 2025
  • 4 replies
  • 990 views

Hello,

I had developed my firmare in STM Cube ide 1.5.1 (stm32h7/)

Project repo is here: https://github.com/silelis/MustangRadio_develepementVersion/tree/main/02_Firmware/02_STM32/Radio_main

And after I have updated IDE to 2.0.0 I have noticed that STM32h7 falls into hard error interrupt.

It also appears when I uninstall IDE and installed pure 2.0.0.

When I moved back to 1.5.1 hard errot dissapired.

 

Please check this error in IDE.

4 replies

silelisAuthor
Associate
December 12, 2025

I made mistake. Working IDE version is 1.15.1 not 1.5.1. :\

AScha.3
Super User
December 13, 2025

Hi,

Try with IDE 1.19. , and tell...

"If you feel a post has answered your question, please click ""Accept as Solution""."
silelisAuthor
Associate
December 13, 2025

On 1.19.0 also 

void HardFault_Handler(void)
{
 /* USER CODE BEGIN HardFault_IRQn 0 */

 /* USER CODE END HardFault_IRQn 0 */
 while (1)
 {
 /* USER CODE BEGIN W1_HardFault_IRQn 0 */
 /* USER CODE END W1_HardFault_IRQn 0 */
 }
}

appears.

Andrew Neil
Super User
December 13, 2025

So, again, debug the Hard Fault.

Highly unlikely to be a problem with the IDE itself.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
December 13, 2025

@silelis wrote:

Please check this error in IDE.


It's (almost) certainly not an error in the IDE - it will be an error in your code.

Quite possibly, the GCC toolchain version changed between IDE v1.15.1 and v2.0.0 - you're jumping quite a lot of versions there!

It is not uncommon that a change of toolchain will expose latent bugs in your code.

 

You need to debug the Hard Fault to find what's going on - see:

debugging Cortex-M (including STM32) Hard Faults.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
silelisAuthor
Associate
December 13, 2025

How is it possible that on previous versions firmware works and on newes not??

Andrew Neil
Super User
December 13, 2025

@silelis wrote:

How is it possible that on previous versions firmware works and on newes not??


Again, it's not uncommon that a change of toolchain will expose latent bugs in your code.

  • The code generation may differ
  • Optimisation may differ
  • Placement of things within memory may differ
  • Libraries may differ
  • etc, etc, ...

Did you just change the IDE, or did you also regenerate code?

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
Super User
December 15, 2025

Consider the possibility that this has nothing to do with the IDE but rather with a bug in your code. I suggest approaching the problem from that point of view. See where it is hard faulting. See if you can pare down the code to something smaller and reproduce the issue. Your code is complex, unlikely anyone here has the desire to parse through everything searching for the needle in a haystack.

"If you feel a post has answered your question, please click ""Accept as Solution""."