IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Git Source Tree
Root/
Source at commit 1f003f1c2100f7f3670106fd13df0eaec7a0e4e1 created 7 years 6 months ago. By Werner Almesberger, atusb/atusb.kicad_pcb: grow RF feed trace to 1.9 mm, for 1.0 mm PCB | |
---|---|
1 | #!/bin/sh |
2 | |
3 | . ./Common |
4 | |
5 | |
6 | USB_ID=20b7:1540 |
7 | FW_BOOT_FILE=boot.hex |
8 | FW_APP_FILE=atusb.bin |
9 | |
10 | |
11 | # |
12 | # This invocation of avrdude is derived from ben-wpan/atusb/fw/Makefile, |
13 | # target "prog". |
14 | # |
15 | |
16 | flash() |
17 | { |
18 | step "Flash boot loader" |
19 | cmd "$REF_EXEC avrdude -F -p atmega32u2 -c nanonote_atusb -e \ |
20 | -U flash:w:$FW_BOOT_FILE:i \ |
21 | -U lfuse:w:0x60:m \ |
22 | -U hfuse:w:0xd8:m \ |
23 | -U lock:w:0x2f:m" |
24 | LIVE=true |
25 | expect "lock verified" |
26 | LIVE=false |
27 | } |
28 | |
29 | |
30 | enumerate() |
31 | { |
32 | step "Enumeration" |
33 | cmd "$LOCAL_EXEC usbwait -i 0.1 -t 30 $USB_ID" |
34 | doit |
35 | } |
36 | |
37 | |
38 | dfu() |
39 | { |
40 | step "DFU application" |
41 | cmd "$LOCAL_EXEC dfu-util -d $USB_ID -D $FW_APP_FILE" |
42 | expect "No error" |
43 | } |
44 | |
45 | |
46 | begin |
47 | flash |
48 | enumerate |
49 | dfu |
50 |