diff --git a/hw/bsp/stm32f0/family.c b/hw/bsp/stm32f0/family.c index a7e914128..0765f361d 100644 --- a/hw/bsp/stm32f0/family.c +++ b/hw/bsp/stm32f0/family.c @@ -165,7 +165,7 @@ void HardFault_Handler (void) * @param line: assert_param error line source number * @retval None */ -void assert_failed(uint8_t* file, uint32_t line) +void assert_failed(const char* file, uint32_t line) { (void) file; (void) line; /* USER CODE BEGIN 6 */ diff --git a/hw/bsp/stm32f0/family.mk b/hw/bsp/stm32f0/family.mk index 2983af49e..a065e9221 100644 --- a/hw/bsp/stm32f0/family.mk +++ b/hw/bsp/stm32f0/family.mk @@ -24,7 +24,7 @@ GCC_CFLAGS += \ -nostdlib -nostartfiles \ # suppress warning caused by vendor mcu driver -GCC_CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual +GCC_CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align # IAR Flags IAR_CFLAGS += --cpu cortex-m0 diff --git a/hw/bsp/stm32f0/stm32f0xx_hal_conf.h b/hw/bsp/stm32f0/stm32f0xx_hal_conf.h index cfa66b366..0bf053e13 100644 --- a/hw/bsp/stm32f0/stm32f0xx_hal_conf.h +++ b/hw/bsp/stm32f0/stm32f0xx_hal_conf.h @@ -303,9 +303,9 @@ * If expr is true, it returns no value. * @retval None */ - #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) + #define assert_param(expr) ((expr) ? (void)0U : assert_failed(__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t* file, uint32_t line); + void assert_failed(const char* file, uint32_t line); #else #define assert_param(expr) ((void)0U) #endif /* USE_FULL_ASSERT */