Arduino 3.0 Plugin - corrupted makefiles? [message #1778526] |
Fri, 15 December 2017 17:21 |
Ralph Roland Messages: 2 Registered: December 2017 |
Junior Member |
|
|
Hi, I'm trying to migrate my Arduino development over to Eclipse using the Eclipse C++ IDE for Arduino 3.0 plugin. However, I'm running into issues with the auto-generated makefile (project/build/Arduino Mega/Makefile) ending up with multiple references to the same .o file in the PROJECT_OBJS variable (note the double reference to project/fdc/FD1771.cpp.o in the snip from the Makefile):
PROJECT_OBJS = \
project/TRS80Floppy.cpp.o \
project/fdc/FD1771.cpp.o \
project/gui/Encoder.cpp.o \
project/gui/Screen.cpp.o \
project/gui/UIMgr.cpp.o \
project/gui/UIPageDir.cpp.o \
project/gui/UIPageMain.cpp.o \
project/gui/UIPageMsg.cpp.o \
project/sdcard/SDHelper.cpp.o \
project/util/BitUtils.cpp.o \
project/util/Debug.cpp.o \
project/fdc/FD1771.cpp.o \
The make file also contains two 'recipes' for FD1771.cpp.o:
project/fdc/FD1771.cpp.o: ../../fdc/FD1771.cpp project/fdc/FD1771.cpp.d
@$(call mymkdir,$(dir $@))
"C:/Users/admin/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:/Users/admin/.arduinocdt/packages/arduino/hardware/avr/1.6.20/cores/arduino" -I"C:/Users/admin/.arduinocdt/packages/arduino/hardware/avr/1.6.20/variants/mega" -I"C:/Users/admin/.arduinocdt/libraries/EnableInterrupt/0.9.8" -I"C:/Users/admin/.arduinocdt/libraries/EnableInterrupt/0.9.8/utility" -I"C:/Users/admin/.arduinocdt/libraries/Bounce2/2.3.0" -I"C:/Users/admin/.arduinocdt/packages/arduino/hardware/avr/1.6.20/libraries/SPI/src" -I"C:/Users/admin/.arduinocdt/packages/arduino/hardware/avr/1.6.20/libraries/Wire/src" -I"C:/Users/admin/.arduinocdt/libraries/U8g2/2.19.8/src" -I"C:/Users/admin/.arduinocdt/libraries/SdFat/1.0.3/src" "$<" -o "$@"
project/fdc/FD1771.cpp.d: ;
-include project/fdc/FD1771.cpp.d
and:
project/fdc/FD1771.cpp.o: ../../fdc/FD1771.cpp project/fdc/FD1771.cpp.d
@$(call mymkdir,$(dir $@))
"C:/Users/admin/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:/Users/admin/.arduinocdt/packages/arduino/hardware/avr/1.6.20/cores/arduino" -I"C:/Users/admin/.arduinocdt/packages/arduino/hardware/avr/1.6.20/variants/mega" -I"C:/Users/admin/.arduinocdt/libraries/EnableInterrupt/0.9.8" -I"C:/Users/admin/.arduinocdt/libraries/EnableInterrupt/0.9.8/utility" -I"C:/Users/admin/.arduinocdt/libraries/Bounce2/2.3.0" -I"C:/Users/admin/.arduinocdt/packages/arduino/hardware/avr/1.6.20/libraries/SPI/src" -I"C:/Users/admin/.arduinocdt/packages/arduino/hardware/avr/1.6.20/libraries/Wire/src" -I"C:/Users/admin/.arduinocdt/libraries/U8g2/2.19.8/src" -I"C:/Users/admin/.arduinocdt/libraries/SdFat/1.0.3/src" "$<" -o "$@"
project/fdc/FD1771.cpp.d: ;
-include project/fdc/FD1771.cpp.d
The real problems seems to occur with this like though:
TRS80Floppy.elf: $(PROJECT_OBJS) $(LIBRARIES_OBJS) core.a
"C:/Users/admin/.arduinocdt/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega2560 -o "./TRS80Floppy.elf" $(PROJECT_OBJS) $(LIBRARIES_OBJS) "./core.a" "-L." -lm
PROJECT_OBJS is used, and results in the FD1771 obj being included twice and results is "multiple definition" errors for everything declared in FD1771.cpp...
I'm running Eclipse C++ Oxygen.1a Release (4.7.1a) Build id: 20171005-1200 with the Eclipse C++ IDE for Arduino 3.0 installed from the Eclipse Marketplace.
I have quite a bit of experience running Eclipse for Java, but this is my first time using the C++ variant. One thing I have noticed, that may be of significance, is that my install appears to be "missing" a lot of the Project Properties under "C/C++ General" that are mentioned in other posts...
Hopefully this is just something I can tweak, because in general I'm finding the Eclipse environment SO much better for the actual creation of the code, but if it gets confused and starts refusing to build then that's kinda a show-stopper...
Thanks for any help!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03489 seconds