首页 文章

在Arduino Mega 2560上传时出现编译错误

提问于
浏览
1

在Arduino Mega上传代码时,我收到此错误:

c:/users/sohini/desktop/arduino-1.5.2/hardware/tools/avr/bin /../ lib / gcc / avr / 4.3.2 /../../../../ avr /lib/avr6/crtm2560.o:在函数__vector_default'中:( . vector 0xdc):重定位被截断以适合:R_AVR_13_PCREL与C:\ Users \ Sohini \ AppData \ Local中.text .__ vector_55部分中定义的符号__vector_55'相对应\ TEMP \ build208222592316456159.tmp / core.a(HardwareSerial.cpp.o)

任何人都可以解释一下错误是什么以及如何纠正错误?

1 回答

  • 1

    当试图运行SoftwareSerialExample时,mega 2560的问题在于为Leonardo设计的线路 . 注释掉这段代码:

    void setup() 
    {
      // Open serial communications and wait for port to open:
      Serial.begin(57600);
    /*while (!Serial) {
        ; // wait for serial port to connect. Needed for Leonardo only
      }*/
    

相关问题