下面是我尝试构建项目时遇到的错误。我不确定它正在谈论什么文件或目录。所有文件和目录都在项目目录中。
我按照 http://arduino.cc/playground/Code/Eclipse 中的说明进行操作设置我的 IDE。
Arduino 核心文件是否应该位于项目目录中并专门添加到 Arduino 核心库中?我所提供的只是由我的 Arduino IDE 生成的 liArduinoCore.a
文件。这可能是问题所在吗?
错误消息
**** Build of configuration Debug for project CustomLEDPoi ****
make all
Building target: CustomLEDPoi.elf
Invoking: AVR C++ Linker
avr-gcc -Wl,-Map,CustomLEDPoi.map,--cref Wl,--gc-sections - L"C:\Users\Justin\workspaceArduino\arduino_core\src" -L"C:\Users\Justin\workspaceArduino\arduino_core\328P_16MHz Arduino\src" -L"C:\Users\Justin\workspaceArduino\CustomLEDPoi\arduinolib" -L"C:\Users\Justin\workspaceArduino\CustomLEDPoi\lib" -mmcu=atmega328p -o "CustomLEDPoi.elf" ./src/glowstick2.o ./lib/CShiftPWM.o ./lib/MeetAndroid.o ./lib/hsv2rgb.o ./arduinolib/HardwareSerial.o ./arduinolib/SPI.o -lArduinoCore
avr-gcc.exe: Wl,--gc-sections: No such file or directory
make: *** [CustomLEDPoi.elf] Error 1
**** Build Finished ****
最佳答案
Wl,--gc-sections
似乎缺少 -
。它实际上应该是-Wl,--gc-sections
。如果没有正确的标志,编译器会假定它是源文件。您应该检查 makefile 并验证。
关于Eclipse Arduino make : *** error 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11002866/