i think i tracked down the logging problem!
i think i tracked down the logging problem!

The issue was in cdc_init, everything worked fine when I was logging a
'@' at the start of the function. If I removed it, the host's driver
would fail to load and the console would show "SetConfiguration failed
SET_CONFIG with error..."

I wondered if it had to do with modifying the UEPn registers and then
arming the buffers immediately after. Maybe setting UEPn corrupts its
BDT entries somehow. (note that I was setting the count and address for
all andpoints in usb_init to save instructions.)

I now set up all 3 endpoints in usb_init and it seems to work. I'll have
to do more research on this behavior and find out at which stage in the
enumeration process is it acceptable to enable endpoints other than 0.

74hc595/PIC16F1-USB-Bootloader,74hc595/PIC16F1-USB-Bootloader,74hc595/PIC16F1-USB-Bootloader