2020-02-10 10:27 PM
Micro: STM32F030RCTx.
Compiler: GCC 9.2.1
Package: FW_F0 V1.11.0
When USE_FULL_ASSERT is enabled, STM32CubeMX generates this function in main.c:
void assert_failed(char *file, uint32_t line)
{
...
}
however the prototype in stm32f0xx_hal_conf.h has been changed to this:
void assert_failed(uint8_t* file, uint32_t line);
This causes a compile error from GCC "error: conflicting types for 'assert_failed'"
Easy fix, so I hope it makes it for the next release :)
Cheers
David
2020-02-10 10:37 PM
Obviously someone changed the prototype, but forgot to update the function. It happens all the time, but the funny thing is the change to uint8_t* is not correct anyway. I think it should be changed to const char*, or at least keep it at char*.
2020-02-11 02:09 AM
Hello, thank you for reporting, ticket entered.
2020-02-11 02:11 AM
Hi @DOsbo
Could you please share your ioc file?
Best Regards,
Khouloud
2020-02-11 07:52 AM
To avoid errors , Code generated from CubeMX should be aligned with stm32f0xx_hal_conf.h .
Then @Mike_ST will check the second point reported (const char*, char*..).
for the first one, issue will be fixed in the next CubeMX release.
Regards,
Khouloud
2020-02-11 02:07 PM
void assert_failed(const char *file, uint32_t line);
2020-02-11 05:13 PM