cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX V5 Error Handling Changes

s m
Associate III

Why has the __func__ and __line__ been removed as argument from error_handler in CubeMX V5.0 generated code?

(tested for STM32L4R9 microcontroller)

By just calling Error_Handler() instead of the former _error_handler(__func__,__line__), tracing the error is much harder as the corresponding function is not directly visible.

If space consumption is an issue, introduce a macro which enables or disables the feature!

With the default setting of maximum optimization, it is sometimes almost impossible to trace back by just setting a break point in the error handler.

2 REPLIES 2
Spectramax
Associate II

Any response to this matter? Why change this!? It has broken my existing code when I migrated to v5.

If we can get an official response with some logic behind the decision then we can plan to make work arounds. If the official response is that its a bug, we can wait for it to be fixed.

Is this a feature or a bug?

nibbly78
Associate III

Several versions back it was like this too i.e. _func__,__line__ did not exist so I guess this is a "feature"