How to write programs for a custom SAMD21 board using Arduino IDE

Hi @MartinL, I uploaded the bootloader in your zip file. After the bootloader was loaded to my device, I got the error "USB device not recognized" from windows, and the port submenu in Arduino IDE is grayed out.

Just to be sure, here is my procedure in Microchip Studio: Tools>>Device Programming>>Memories>>Flash (132KB). I load your bootloader and click on Program.

Since there are only 4 pins (Vcc, GND, D+, and D-), and I already ohm-checked them, I seriously doubt that it is a connection error.

Is there a fuse-bit that I need to change in the processor?

Maybe this is caused by my previous attempts to load "bad" bootloaders into my chip and now windows cannot recognize this. I will try to find another computer and connect it to that PC to see if it is recognized.

Thanks