Go Down

Topic: MKR WiFi 1010 SerialUSB undefined (Read 423 times) previous topic - next topic

NameOfTheDragon

Hi all. I have a problem where I'm getting errors if I try to access the Serial object.

For example:

Code: [Select]

void setup() {
Serial.begin(115200);
}

void loop() {}


Produces this error:

Quote
delay.h:23: In file included from
arduino.h:81: from
Repro.ArduinoSerialUsb.ino: from
Error compiling project sources
 
Repro.ArduinoSerialUsb.ino: In function void setup()
 
variant.h: 220:37: error: 'SerialUSB' was not declared in this scope
   #define Serial                      SerialUSB
Repro.ArduinoSerialUsb.ino:8: note  in expansion of macro Serial
   Serial.begin(115200)
   ^~~~~~
variant.h:220: note  suggested alternative  Serial2
   #define Serial                      SerialUSB
Repro.ArduinoSerialUsb.ino:8: note  in expansion of macro Serial
   Serial.begin(115200)
   ^~~~~~
Build failed for project 'Repro.ArduinoSerialUsb'
So it looks like Serial is aliased to SerialUSB (which would be correct for the MKR WiFi 1010).

Looking in variant.h, I can see that SerialUSB is referred to in several places, but I can't see it defined anywhere, which would seem to explain the problem.

I'm running IDE 1.8.10 on Windows.

I can't believe they let a bug this obvious go out the door, so what did I miss?.

NameOfTheDragon

Oh wait... there's been a new SAMD boards package 1.8.3 released that fixes it.

Curiously, there's no entry in the CHANGELOG file for this release. Pushed out in a hurry, I guess ;-)

racpra16

Dear,

Make sure, you are using latest version of SAMD board under Boards Manager(IDE->Tools-> Boards->Boardsmanager->1010) i.e 1.8.4 version

Thank you,

Go Up