examples: New board_usb
[simavr] / examples / board_usb / README
1 This will bridge the usb avr to the vhci-usb virtual usb host.
2
3 You'll need vhci-usb and vhci-usb-lib to build and use it.
4 (http://sourceforge.net/projects/usb-vhci/)
5
6 When setup, your avr project will connect to the linux usb system
7 as a real device.
8
9 BUILDING usb-vhci
10 -----------------
11 git://usb-vhci.git.sourceforge.net/gitroot/usb-vhci/vhci_hcd
12
13 The driver doesn't compile on recent linux kernels.
14 (commit 203800f0 Mon Apr 4)
15 0001-SPIN_LOCK_UNLOCKED-has-been-depreciated.patch
16 and
17 0002-need-transaction-translator.patch            
18 should fix that.
19
20 then simply "make && make install"
21
22 might need to copy the api header file:
23 mkdir -p /usr/local/include/linux
24 sudo cp usb-vhci.h /usr/local/include/linux
25
26
27 BUILDING libusb_vhci
28 --------------------
29 git://usb-vhci.git.sourceforge.net/gitroot/usb-vhci/libusb_vhci
30
31 This was a little more troublesome, but I didn't care to figure it out.
32 with libusb_vhci trunk (commit 5927f39a Sun Mar 27)
33
34 add
35 0001-Comment-out-function-that-doesn-t-compile.patch
36 patch to remove that won't compile (and we don't use)
37 then:
38 cd src
39 gcc -c libusb_vhci.c 
40 ar rcs libusb_vhci.a libusb_vhci.o
41 sudo cp libusb_vhci.a /usr/local/lib
42 mkdir -p /usr/local/include/linux
43 sudo cp libusb_vhci.h /usr/local/include/linux
44
45 Gives us what we need