I’m using Arduino 1.8.10 and the ulisp-arm code.
void serialbegin (int address, int baud) {
#if defined(ARDUINO_SAM_DUE)
if (address == 1) Serial1.begin((long)baud*100);
else if (address == 2) Serial2.begin((long)baud*100);
else if (address == 3) Serial3.begin((long)baud*100);
#elif !defined(_VARIANT_BBC_MICROBIT_)
if (address == 1) Serial1.begin((long)baud*100);
#endif
else error(WITHSERIAL, PSTR("port not supported"), number(address));
}
With a Micro:Bit only the else error(WITHSERIAL… is compiled with
that #elif !defined(VARIANT_BBC_MICROBIT).
The function beneath it, serialend(), doesn’t have the error checking.