-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.serials
55 lines (42 loc) · 1.23 KB
/
Makefile.serials
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
LIBUSB=$(SOURCES_DIR)/xlnxusb-git/libusb-driver.so
LOAD_LINUX=$(ROOT_DIR)/load-linux.sh
LOAD_LINUX_CMD=$(LOAD_LINUX)
LOAD_OPTS=--tftp
XLNX_ROOT=/opt/Xilinx/SDK/14.4
export XILINX=$(XLNX_ROOT)/ISE_DS/ISE
export XILINX_EDK=$(XLNX_ROOT)/ISE_DS/EDK
# export LD_PRELOAD=$(LIBUSB)
export PAPORT_SETUP=$(SOURCES_DIR)/xlnxusb-git/setup_pcusb
sync-drafts:
rsync -avzr $(RESOURCES_DIR)/* $(DRAFTS_DIR)
.PHONY:
device-reset: sync-drafts sdk $(LIBUSB) LD_PRELOAD=$(LIBUSB)
$(LOAD_LINUX_CMD) --reset
.PHONY:
device-reload: sdk device-reset $(LIBUSB)
$(LOAD_LINUX_CMD) $(LOAD_OPTS) --no-minicom 2>&1
.PHONY:
xmd-shell: $(LIBUSB) LD_PRELOAD=$(LIBUSB)
@echo "Default xmd commands:"
$(LOAD_LINUX_CMD) --show-xmd-commands
$(LOAD_LINUX_CMD) --xmd-shell
.PHONY:
minicom:
$(LOAD_LINUX_CMD) --minicom
.PHONY:
which-xmd:
$(LOAD_LINUX_CMD) --which-xmd
.PHONY:
show-xmd-commands:
$(LOAD_LINUX_CMD) --show-xmd-commands
xlnxusb-git-repo = "git://git.zerfleddert.de/usb-driver"
GIT_PROJECTS += xlnxusb
xlnxusb-build: $(LIBUSB)
$(LIBUSB): | xlnxusb
make -C $(SOURCES_DIR)/xlnxusb-git
.PHONY:
setup-pcusb: $(LIBUSB) LD_PRELOAD=$(LIBUSB)
$(SOURCES_DIR)/xlnxusb-git/setup_pcusb $(XILINX)
show-xmd-env:
@echo "export LD_PRELOAD=$(LIBUSB)"
@echo "export XILINX=$(XILINX)"