platform-atmelavr icon indicating copy to clipboard operation
platform-atmelavr copied to clipboard

"collect2.exe: error: ld returned 1 exit status"

Open ItsGosho opened this issue 4 years ago • 0 comments

When the any of the serial methods from Arduino is used the error in the title prevents me from building. Because of that I can't use any of the Serial methods when debugging.

The following will pass:

#include <Arduino.h>
#include "avr8-stub.h"

void setup()
{
  debug_init();

}

void loop()
{
  int a = 5;
}

But any of the following will not:

#include <Arduino.h>
#include "avr8-stub.h"

void setup()
{
  debug_init();

Serial.begin(9600);
Serial.print("Because of that is the coolect2.exe: error: Id returned 1 exit status");
}

void loop()
{
  int a = 5;
}

or

#include <Arduino.h>
#include "avr8-stub.h"

void setup()
{
  debug_init();

Serial.begin(9600);
}

void loop()
{
  int a = 5;
  Serial.println("Because of that is the coolect2.exe: error: Id returned 1 exit status");

}

ItsGosho avatar Jan 29 '21 13:01 ItsGosho