cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: _Error_Handler generated by STM32CubeMX should have const char * file as parameter

Morty Morty
Associate III
Posted on September 14, 2017 at 11:19

The title says it all.

STM32CubeMx Version Version 4.22.1

Library: STM32Cube_FW_F3_V1.9.0

#bug
3 REPLIES 3
Morty Morty
Associate III
Posted on September 14, 2017 at 11:20

Oh, and assert_failed needs to be fixed, too. Anyone at ST compiling stuff with warnings turned on?

Tilen MAJERLE
ST Employee
Posted on September 14, 2017 at 15:25

Hello

moritz.struebe

‌,

can you share with us the warning and problems you are facing?

Posted on September 14, 2017 at 15:59

Well.... The generated code also creates the line

_Error_Handler(__FILE__, __LINE__);

From the C-Standard:

 __FILE__ The presumed name of the current source ï¬�le (a character string literal).

For reasons discussed here:

https://stackoverflow.com/a/18704903/1012586

gcc legitimately puts them into the const data section, considers string literals 'const char *', and consequently emits a warning.