Okay! The changes to the code this week are looking great, I need to get you all the USB example code I was going to use to get this going!
There's 3 main pieces of code involved - 2 examples and the existing USB On The Go code in the Flutter Arduino Codebase.
The two examples are the best codesets I could find that appear to support USB on the SAM3S:
Unfortunately, Arduino seems to be using a different set of support libraries, so the naming isn't all consistent. We need to mostly write out this file:
Also the name udp.c comes from the fact that it is a USB Device Port, but this name conflicts with udp.c in the Arduino library, which is used to handle the UDP protocol over IP. We should probably change udp.c to usbdp.c or similar.
Also note that all of the Arduino-based code is in that "hardware" folder. Nothing related to the port is outside of that as the rest deals with the IDE. I should include this information in the docs if I don't say that in the readme.