Recently I dug out an old Microchip PIC 18F4550 USB demo board, which I'd bought many years ago from Tiertex.
It has the Microchip HID USB bootloader already flashed onto the chip. The goal is to get a nice setup with Linux (Ubuntu 16.04 LTS). I tested two tools to download code to the bootloader:
The next part is compiling your own program to run on the board. I decided to use SDCC. There is a package available in the Ubuntu repositories, however this package does not seem to include the PIC headers from Microchip, as apparently they are not GPL compatible :( Thus, it is necessary to download (latest version currently 3.6.0). I just grabbed the binary. You need to add --use-non-free for Microchip development. You can still install the gputils package from the Ubuntu repository.
The main challenge is getting the linker setup to respect the fact that the USB bootloader lives in the memory before 0x1000. I did this by performing the following two steps:
sudo cp /usr/share/gputils/lkr/18f4550_g.lkr somewhere/handy/hid_18f4550.lkr
CODEPAGE NAME=bootloader START=0x0 END=0xFFF PROTECTED
CODEPAGE NAME=vectors START=0x1000 END=0x1029 PROTECTED
CODEPAGE NAME=page START=0x102A END=0x7FFF
sdcc --use-non-free -mpic16 -p18f4550 -c --ivt-loc=0x1000 [sdcc path]/lib/src/pic16/startup/crt0i.c -o bl_crt0i.o
sdcc --use-non-free -mpic16 -p18f4550 -Wl,-s,hid_18f4550.lkr --use-crt=bl_crt0i.o --ivt-loc=0x1000 simple.c
gpdasm -p18f4550 simple.hex
For reference, the program simple.c I wrote is attached below (it just lights the LED corresponding to the button pressed).