stm32-rs / stm32f0xx-hal

A Rust `embedded-hal` implementation for all MCUs in the STM32 F0 family
BSD Zero Clause License
134 stars 59 forks source link

Conflicting types for 'assert_failed' #89

Closed david-oz00 closed 4 years ago

david-oz00 commented 4 years ago

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_halconf.h is:

void assert_failed(uint8_t* file, uint32_t line);

This causes a compile error from GCC "error: conflicting types for 'assertfailed'". It looks like someone updated the prototype but forgot to update the body. The funny thing is uint8t*** is not correct anyway. I think it should be changed to _*const char, or at least keep it at **char***_

therealprof commented 4 years ago

I think you picked the wrong GitHub project for your issue report. This is all about support in the Rust programming language, there's no C code.

david-oz00 commented 4 years ago

Sorry, my bad. Should have paid more attention.

therealprof commented 4 years ago

No worries, maybe we'll see you on the other side some time. ;)