使用arduino的Eclipse中出现Makefile错误
我正在尝试使用Eclipse和Arduino在Ubuntu12.04上构建代码。 每次我在控制台中得到的错误如下- 全部 make:**无规则生成目标使用arduino的Eclipse中出现Makefile错误,makefile,arduino,eclipse-cdt,Makefile,Arduino,Eclipse Cdt,我正在尝试使用Eclipse和Arduino在Ubuntu12.04上构建代码。 每次我在控制台中得到的错误如下- 全部 make:**无规则生成目标ArduinoLib5.a,这是所有所需的。停下来 我的makefile如下:请看一下,让我知道如何修复错误 ifneq ($(strip $(C_DEPS)),) -include $(C_DEPS) endif ifneq ($(strip $(ASM_DEPS)),) -include $(ASM_DEPS) endif ifneq ($(s
ArduinoLib5.a
,这是所有所需的。停下来
我的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
您确实缺少一个名为ArduinoLib5.a:
或当前目录中的ArduinoLib5.a文件的规则
我不明白你的规则。如果它依赖于已经存在的ArduinoLib5.a
文件,它将什么也不做。如果它依赖于生成ArduinoLib5.a
的缺失规则,则它不会执行“全部”(即不执行.hex
/.lst
/.siz
规则),而只执行该文件。
此外,看看all
规则做了什么,我不明白$(OBJS)
/$(USER\u OBJS)
是什么。。。但也许它们是由eclipse在env中提供的
总的来说,我觉得您的Makefile完全错了。实际上这是一个自动生成的Makefile。我想用EdUINO IDE 1.5.2i来在Eclipse上构建一个C++项目,可以肯定地说:你的MaX文件是错误的,所以你的Eclipse的构建目标也是错误的。您是否遵循[教程](Arduino核心库的Eclipse配置)使其正常工作?你在学习那个教程时有什么困难吗?我没有将eclipse用作IDE,我更喜欢一个更为乏味的解决方案(手动编写的makefile和vim FTW;-),但可以肯定的是,您的配置是错误的