【发布时间】:2017-02-22 16:03:45
【问题描述】:
我正在使用 Eclipse/Neon.2 中的一个 CDT 项目,该项目针对嵌入式目标进行交叉编译。我在项目中添加了一堆 .c 文件,它们会自动包含在构建中,除了(看似)一个。在项目目录中是
STM32F7explore/Utilities/Log/lcd_log.c 其中STM32F7explore 是 Eclipse 项目目录。如果我尝试手动构建它,控制台窗口会显示:
09:45:52 **** Building Selected Files of configuration Debug for project STM32F7explore ****
Info: Internal Builder is used for build
09:45:52 Build Finished (took 1ms)
对于包含的文件,控制台显示例如
09:54:50 **** Building Selected Files of configuration Debug for project STM32F7explore ****
Info: Internal Builder is used for build
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 -D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__)) -DUSE_HAL_DRIVER -DSTM32F746xx -DLWIP_TIMEVAL_PRIVATE=0 -I../Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Include -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1 -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp/polarssl -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -I../Drivers/BSP/STM32746G_Discovery -I../Utilities/Log -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o Src/main.o ../Src/main.c
09:54:51 Build Finished (took 224ms)
我很困惑为什么 Eclipse 不将 lcd_log.c 文件添加到构建中。我查看了文件属性弹出窗口,它们看起来都一样(特别是,Eclipse 确实将 lcd_log.c 识别为 File (C Source File)
我已经从工作区中删除了.metadata/.plugins/org.eclipse.core.runtime/.settings,并从项目中删除了.settings,以强制 Eclipse 重新生成它们,但这并没有解决问题。
该项目在 Github (https://github.com/HankB/STM32F7explore) 上,但构建要求有点高,除非您碰巧正在为 ST 嵌入式处理器开发。
谢谢!
【问题讨论】:
标签: c eclipse eclipse-cdt