what is SAMD core?

Hello everyone,
I'm new, so I'm sorry if it is too basic question.

I see a code with these following lines:

/SAMD core/
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#define SERIAL SerialUSB
#else
#define SERIAL Serial
#endif

what it does?

what is SAMD?

thanks in advance,

Shlomi

it’s a type of processor architecture (Atmel ARM-based processors)

SAMD is a family of ARM-based processors that are available on certain boards in the Arduino Ecosystem.

Those lines are pre-processor directives that define the “SERIAL” macro to different values depending on the processor in use. Techniques like this are used to allow the same application code to be compiled for different processors.

From Microchip datasheets:
samd.png

samd.png

I reckon "SAMD core" refers to the code that the Arduino IDE needs in order to be able to compile programs for a SAMD microprocessor.

...R

The Arduino SAMD boards are the MKR boards (e.g., MKR Zero, MKR WiFi 1010), the Nano 33 IoT, and the Zero.