Hello, I have recently designed a custom board with the ATSAMD21G18A. After soldering it, I followed these directions. Now, every time I upload the bootloader with a J-Link and Microchip Studio, the board enters bootloader mode and it appears as a USB drive. It also appears in the Arduino IDE as COM 4. However, when I upload any sketch to the board through that port, the board disconnects (according to the IDE the upload is successful). Now, the board doesn't show up in the explorer or as a port in the IDE. It only shows up again if I use the J-Link and Microchip Studio to flash the bootloader again. I cannot figure out how to make the board appear as a port without doing so. [I can upload the bootloader and the Arduino15 folder if necessary.]
Welcome! You have an advantage we do not, you can see the board, code and have an annotated schematic. If you upload the above you will even the field and probably get a good answer. On the schematic show all connections, power sources, ground, power wiring and note any leads over 10"/25cm.
I uploaded the schematic. I don't know how to upload the Arduino15 folder, because it can't be compressed (it has characters that can't be in a compressed folder).
No, do NOT upload the folder. The forum guidelines explain how to use code tags. Click on code at the top that opens ready s the forum to receive a sketch. in your sketch enter a control T (formats the sketch) check, then click anywhere in the sketch and enter a control A (copy all) control C (TAC). then in the forum click the ... and then Control V (paste).
Normally this behaviour is either due to incorrect crystal setup, or incorrect memory boundaries. You could try using an adafruit bootloader for a SAMD21G18A with the CRYSTALLESS flag set in the boards file and boot loader .bin, that will at least tell you whether or not your hardware is generally ok. If that works then have another look at your crystal config. From memory most of the “standard” SAMD21G18A boards use a 32kHz crystal on PA00 - 01, so a 16MHz crystal may be a bit of a challenge to setup with the bossa bootloader.