BUG: assert_fail() fails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Labels:
-
STM32CubeMX
-
STM32F0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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*.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-11 2:09 AM
Hello, thank you for reporting, ticket entered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-11 2:11 AM
​Hi @DOsbo​
Could you please share your ioc file?
Best Regards,
Khouloud
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-11 7: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-11 2:07 PM
void assert_failed(const char *file, uint32_t line);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-11 5:13 PM
