I have a weird problem and have no luck so far.
Using the arduino.org IDE, I upload a very simple sketch (Blink) with some serial outputs to a Arduino M0.
When I initially connect with the board, ttyACM0 is available under Tools > Port. I click it and then upload the code to the board. All goes well until I try to get serial output. As soon as I open the Serial Monitor, the board resets itself, suddenly is on port ttyACM1 and I have no output. Then I have to reopen the Serial Monitor to view the output.
When using the reset button, the port changes back to ttyACM0.
I thought the Zero and M0 were very much alike, that's why I asked here.
It has been brought to my attention that the port switching somehow is a "feature" of the M0 and has to be dealt with by the OS. I wish I could explain it more for future reference but I still don't see the reason it could be handy. It's workable to open Serial Monitor, switch ports, open Serial Monitor, switch ports and open Serial Monitor again to get the output, although it's not preferred this way ofcourse