Eclipse中的makefile错误与arduino到期

时间:2013-06-18 10:10:01

标签: makefile arduino eclipse-cdt

我正在尝试使用带有Arduino Due的Eclipse在Ubuntu 12.04上构建代码。 每次我在控制台中收到错误 -

全部

制作:*** ArduinoLib5.a不需要制作目标all的规则。停止。

我的makefile如下:请看一下,让我知道如何解决错误。

ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(ASM_DEPS)),)
-include $(ASM_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
ifneq ($(strip $(S_UPPER_DEPS)),)
-include $(S_UPPER_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables 
EXECUTABLES += \
USER_OBJS \

SECONDARY_FLASH += \
ArduinoLib5.hex \

SECONDARY_LIST += \
ArduinoLib5.lst \

SECONDARY_SIZE += \
ArduinoLib5.siz \


    # All Target
    all: ArduinoLib5.a

    # Tool invocations
        @echo 'No tool found that can build the extension specified with the build artifact name $@'
    USER_OBJS: $(OBJS) $(USER_OBJS)
        @echo 'Invoking: ARM Sourcery Linux GCC C++ Linker'
        arm-none-eabi-g++ -Wl,-Map,ArduinoLib5.map -mcpu=cortex-m3 -mthumb -g -ggdb -o "USER_OBJS" $(OBJS) $(USER_OBJS) $(LIBS)
        @echo 'Finished building: $@'
        @echo ' '

    ArduinoLib5.hex: ArduinoLib5.a
        @echo 'Invoking: ARM Sourcery Linux GNU Create Flash Image'
        arm-none-eabi-objcopy -O ihex ArduinoLib5.a  "ArduinoLib5.hex"
        @echo 'Finished building: $@'
        @echo ' '

    ArduinoLib5.lst: ArduinoLib5.a
        @echo 'Invoking: ARM Sourcery Linux GNU Create Listing'
        arm-none-eabi-objdump -h -S ArduinoLib5.a > "ArduinoLib5.lst"
        @echo 'Finished building: $@'
        @echo ' '

    ArduinoLib5.siz: ArduinoLib5.a
        @echo 'Invoking: ARM Sourcery Linux GNU Print Size'
        arm-none-eabi-size  --format=berkeley ArduinoLib5.a
        @echo 'Finished building: $@'
        @echo ' '

    # Other Targets
    clean:
        -$(RM) $(OBJS)$(C_DEPS)$(SECONDARY_FLASH)$(CXX_DEPS)$(S_UPPER_DEPS)$(SECONDARY_LIST)$(C++_DEPS)$(SECONDARY_SIZE)$(ASM_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(C_UPPER_DEPS) ArduinoLib5.a
        -@echo ' '

    .PHONY: all clean dependents
    .SECONDARY:

    -include ../makefile.targets 

1 个答案:

答案 0 :(得分:0)

您确实错过了当前目录中名称为ArduinoLib5.a:或ArduinoLib5.a文件的规则。

我没有得到你的all规则。如果它依赖于现有的ArduinoLib5.a文件,它将不执行任何操作。如果它依赖于生成ArduinoLib5.a的缺失规则,则它将不会执行" all" (即不通过.hex / .lst / .siz规则)但仅限于该文件。 此外,看看all规则的作用,我不明白$(OBJS) / $(USER_OBJS)是什么......但也许他们会在evi的env中给出!

总的来说,你的Makefile看起来完全错了。