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”中:

(.vectors+0xdc):重定位被截断以适应:R_AVR_13_PCREL 针对 C:\Users\Sohini\AppData\Local\Temp\build208222592316456159.tmp/core.a(HardwareSerial.cpp) .text.__vector_55 部分中定义的符号 `__vector_55' .o)

谁能解释一下错误是什么以及如何纠正它?

4

1 回答 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
  }*/
于 2014-02-16T23:51:51.633 回答