cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE v2.0.0 - Hard Fault error

silelis
Associate II

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.

8 REPLIES 8
silelis
Associate II

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

AScha.3
Super User

Hi,

Try with IDE 1.19. , and tell...

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

@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.

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.

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

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.

@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.

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

Right, but its more 50 : 50 ->

It is not uncommon that a change to new toolchain to introduce new bugs.

At least my experience.

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