我正在使用Eclipse/Neon.2中的CDT项目,该项目为嵌入式目标交叉编译。我在项目中添加了一堆.c文件,除了(看起来)之外,它们自动包含在构建中。在项目目录中,它是 STM32F7explore/Utilities/Log/lcd_log.c
其中STM32F7explore
是Eclipse项目目录。如果我尝试手动构建它,控制台窗口显示:Eclipse/Neon.2忽略源文件
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)
我已经从项目强制Eclipse来删除从工作区.metadata/.plugins/org.eclipse.core.runtime/.settings
和.settings
生成这些并没有解决这个问题。
该项目是在Github上(https://github.com/HankB/STM32F7explore),但建设的要求是有点陡峭,除非你碰巧要制定ST嵌入式处理器。
谢谢!
底部我添加了一个[拉入请求(https://github.com/HankB/STM32F7explore/pull/1)到SHO w代码的变化。 –