2015-12-12 02:45 PM
Using cube hal in SW4STM32 with -Wall -Wextra give lots of warnings like:
STM32Cube_FW_F4_V1.9.0/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c: In function 'HAL_SPI_MspInit': STM32Cube_FW_F4_V1.9.0/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c:267:49: warning: unused parameter 'hspi' [-Wunused-parameter] __weak void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi)
Could you please fix that in the next version of cube hal?2015-01-02 10:49 AM
In cube hal F4 V1.10.0, it is fixed e.g. in `stm32f4xx_spi.c` but unfortunately still happened in e.g.:
2015-12-13 05:27 PM
Your wish is their command...actually it's already been fixed.
In 1.0 that routine reads:__weak
void
HAL_SPI_MspInit(SPI_HandleTypeDef *hspi)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(hspi);
/* NOTE : This function Should not be modified, when the callback is needed,
the HAL_SPI_MspInit could be implemented in the user file
*/
}
Update your CubeMX.
Andrei from The Great White North
2015-12-14 05:23 AM
Much thanx for that info, I'll check it out.
And hopefully they have also fixed their UNUSED() macro ([DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/How%20to%20enable%20a%20timer%20using%20cube%20hal¤tviews=40]see this post). Joe.