How is the M2 Processer board different from an Arduino Due?

I am wondering what the difference is between the the M2 Processor and the Arduino Due?

For example, if I just buy an interface board, can I connect an existing Arduino Due to it and compile/run any Macchina M2 project unmodified, or will some changes be required to port the code from targeting the M2 to targeting the Due?

Assuming there are differences, I am interested in specifics of what is different (bootloader, ports, drivers, pin mappings, etc.), though I probably do not need to know specifics of how each of those things are different.


I come upon this question in trying to figure out the most-manageable way to maintain the [Arduino IDE board files] (M2 variant files updated) but I think this form of the question is more generally interesting/useful.

It’s the exact same processor. The bootloader is burnt into ROM on the processor so that is the same. The peripherals within the processor are the same so the same code works for CAN, ADC, timers, etc. The pin mapping is all different except that hardware peripherals like CAN obviously still come out of the same pins on the processor. Within reason, yes, you can run the same sketch on an Arduino Due and an M2. The M2 uses some pins that are not part of the Arduino Due digital pins and so you would need the IDE board files for the M2 or you need the DueNonNativePins library that lets you use those pins.

1 Like