2024-03-19 07:55 PM
I integrated one open source software module into my project, but I found that there are a lot of warning about unused functions, so I tried to surpress that by adding "-Wunused-function" in CubeIDE, and found the configuration is correct by checking the subdir.mk. But the warning can still be seen in the compile result.
I do not want to see the warning, how can that be done?
Subdir.mk
arm-none-eabi-gcc "317.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DSTM32F401xE -DUSE_STM32F4XX_NUCLEO -DUSE_HAL_DRIVER -c -I../../Inc -I../../../../../../../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../../../../../../../Drivers/STM32F4xx_HAL_Driver/Inc -I../../../../../../../Drivers/BSP/STM32F4xx-Nucleo -I../../../../../../../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -Wunused-function -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Example/PLC/317.d" -MT"Example/PLC/317.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Example/317.o"
Compile result:
ds.h:914:13: warning: 'SM_BAS_init__' defined but not used [-Wunused-function]
Solved! Go to Solution.
2024-03-19 08:36 PM
-Wno-unused-function
2024-03-19 08:36 PM
-Wno-unused-function
2024-03-19 09:47 PM
Thanks, it works