Monday, February 24, 2014

Libvirt and MPLAB do not play nicely in Fedora 20 (and have not for some time)

There's been a conflict between the MPLAB development environment for Microchip PIC microcontrollers and the Fedora virtualization system for some time.

The basic issue is that you cannot start or view your virtual machines.  You've double-checked that your BIOS has virtualization enabled and that the appropriate kvm kernel module is loaded, but it stubbornly refuses.

The issue (for me, at least) was that the MPLAB IDE installed some libusb libraries that were causing a conflict.

Here are the files in question:

/lib/libusb-1.0.a
/lib/libusb-1.0.la
/lib/libusb-1.0.so.0.0.0
With these files in place, virtualization is not reliable.  If they are not there, MPLAB cannot see my PICKit programmer.

The obvious, if ugly, solution is to move them out of the /lib directory when I want to run a virtual machine and to move them back when I want to update firmware.  It's far from ideal, but it works just fine.