我正在为 STM32F4 构建一个程序,使用GNU-ARM-Gcc
Eclipse_make.exe 来构建项目。一切正常,但编译时终端上显示的诊断消息太长而且很难看到。当每个 *.c 文件被编译时,终端会给我一个诊断消息(见下面的段落)任何人都可以给我建议只显示一个文件名 [删除 gcc 目录路径、依赖项、头文件路径]。makefile 由 CubeMX 生成。这是makefile:https ://github.com/loiefy/STM32-makefile/blob/main/Makefile
示例诊断消息:
C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DUSE_HAL_DRIVER -DSTM32F407xx -IEngine/Src/website_c -IEngine/Inc -ILWIP/Target -IMiddlewares/Third_Party/LwIP/src/include -IMiddlewares/Third_Party/LwIP/system -IDrivers/STM32F4xx_HAL_Driver/Inc -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy -IMiddlewares/Third_Party/LwIP/src/include/netif/ppp -IMiddlewares/Third_Party/LwIP/src/apps/httpd -IDrivers/CMSIS/Device/ST/STM32F4xx/Include -IMiddlewares/Third_Party/LwIP/src/include/lwip -IMiddlewares/Third_Party/LwIP/src/include/lwip/apps -IMiddlewares/Third_Party/LwIP/src/include/lwip/priv -IMiddlewares/Third_Party/LwIP/src/include/lwip/prot -IMiddlewares/Third_Party/LwIP/src/include/netif -IMiddlewares/Third_Party/LwIP/src/include/posix -IMiddlewares/Third_Party/LwIP/src/include/posix/sys -IMiddlewares/Third_Party/LwIP/system/arch -IDrivers/CMSIS/Include -IDrivers/CMSIS/Include -IEngine/Inc -ILWIP/Target -Og -Wall -fdata-sections -ffunction-sections -fdiagnostics-show-location=every-line -g -gdwarf-2 -MMD -MP -MF"build/mqtt.d" -Wa,-a,-ad,-alms=build/mqtt.lst Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.c -o build/mqtt.o
我要显示的消息:Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.c已编译
我花了一天时间找到 echo 命令或另一个命令具有相同目的来显示 makefile 中的消息。但我什么也没找到。
感谢您的帮助