如何从Eclipse CDT生成独立的makefile

时间:2019-04-09 09:27:17

标签: c eclipse makefile eclipse-cdt

我已经在ARM上使用Eclipse CDT创建了一个项目。在整个Eclipse中,许多设置已更改。包括目录,编译器选项等...

我需要生成一个makefile,该makefile能够从命令行生成可执行文件。

我注意到在Debug目录中有几个文件:

makefileobjects.mksources.mksubdir.mk

在Debug内的每个目录中也有一个subdir.mk文件 所以一切似乎都准备就绪。有这么多文件有点不方便。我希望只有一个,因为它是自动生成的。 但是,当我尝试使用makefile时,出现错误:

[user@athena VDIU]$ make -f Debug/makefile
    Building target: VDIU.elf
    Invoking: GNU ARM Cross C Linker
    arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=softfp -mfpu=fpv5-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -Xlinker --gc-sections -Xlinker --script="../../../config/linker-script-flash.ld" -Wl,-Map,"VDIU.map" -o "VDIU.elf"   
    /bin/sh: arm-none-eabi-gcc: command not found
    Debug/makefile:64: recipe for target 'VDIU.elf' failed
    make: *** [VDIU.elf] Error 127

似乎似乎抱怨 arm-none-eabi-gcc ,尽管在​​Eclipse中编译时一切正常。 (Eclipse中的编译控制台输出很大,但是我仅在其中一个文件下方显示)

Building file: ../VDIU_main.c
Invoking: GNU ARM Cross C Compiler
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=softfp -mfpu=fpv5-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -D__SAME70Q21__ -D__FREERTOS__ -DARM_MATH_CM7=true -DBOARD=SAME70_XPLAINED -DDEBUG -Dprintf=iprintf -I../../../ -I../../../config -I../../../board -I../../../ASF -I../../../ASF/sam/boards -I../../../ASF/sam/boards/same70_xplained -I../../../ASF/sam/drivers/uart -I../../../ASF/sam/drivers/mpu -I../../../ASF/sam/drivers/pio -I../../../ASF/sam/drivers/usart -I../../../ASF/sam/drivers/pmc -I../../../ASF/sam/drivers/twihs -I../../../ASF/sam/utils -I../../../ASF/sam/utils/header_files -I../../../ASF/sam/utils/preprocessor -I../../../ASF/sam/utils/fpu -I../../../ASF/sam/utils/cmsis/same70/include/component -I../../../ASF/sam/utils/cmsis/same70/include -I../../../ASF/sam/utils/cmsis/same70/include/instance -I../../../ASF/sam/utils/cmsis/same70/include/pio -I../../../ASF/sam/utils/cmsis/same70/source/templates -I../../../ASF/common/utils -I../../../ASF/common/utils/interrupt -I../../../ASF/common/utils/stdio/stdio_serial -I../../../ASF/common/services/clock -I../../../ASF/common/services/clock/same70 -I../../../ASF/common/services/ioport -I../../../ASF/common/services/ioport/sam -I../../../ASF/common/services/serial -I../../../ASF/common/services/serial/sam_uart -I../../../ASF/common/services/gpio -I../../../ASF/common/services/gpio/sam_gpio -I../../../ASF/common/boards -I../../../ASF/thirdparty/freertos/freertos-10.0.0/Source/include -I../../../ASF/thirdparty/freertos/freertos-10.0.0/Source/portable/GCC/ARM_CM7/r0p1 -I../../../ASF/thirdparty/freertos/FreeRTOS-Plus-TCP/include -I../../../ASF/thirdparty/freertos/FreeRTOS-Plus-TCP/source/portable/Compiler/GCC -I../../../ASF/thirdparty/freertos/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/include -I../../../ASF/thirdparty/freertos/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/DriverSAM -I../../../ASF/thirdparty/CMSIS/Include -std=gnu11 -g -MMD -MP -MF"VDIU_main.d" -MT"VDIU_main.o" -c -o "VDIU_main.o" "../VDIU_main.c"
Finished building: ../VDIU_main.c

0 个答案:

没有答案