ARM SAM D21 (Zero and such) CRYSTALLESS

Doe anybody have experience with using SAMD core with internal oscillator? How do you specify it in the boards.txt or in the variant? I see the CRUSTALLESS option in SAMD core, in startup.c, for example, in lines 53 and 158, where the clock is being set. It is just not clear to me where to specify the CRYSTALLESS for my custom SAMD21G18-based board. It seems as long as the CRYSTALLESS is set, the startup is already designed to set the clock accordingly.

I have no experience with this but there's some information here:

Great help, thanks! In brief, what is needed is a build entry in the boards.txt file: -D...

plus an appropriate bootloader - Arduino bootloader requires the crystal, but Adafruit's does not.

I have a board ready, waiting for the SWD programmer to arrive, so I can test this.

Just a followup - J-link OB programmer arrived, and everything works! I programmed in the Adafruit Circuit Playground M0 bootloader from Atmel Studio 7, using the J-link, and now I am programming in the sketches through the native USB.

The programming does not succeed every time, though. I wonder if the lack of crystal has anything to do with it, since even for Zero there is recommendation to program through the "programming" USB port, rather than through the native one.

I am using the SerialUSB for diagnostic output, and it's been great so far, no freezing or data loss. Additional benefit I did not count on - closing and re-opening the serial monitor does not reset the board.