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/
#define SERIAL SerialUSB
#define SERIAL Serial

what it does?

what is SAMD?

thanks in advance,


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:


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.


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