1 # -*- mode: makefile -*-
2 #========================================
3 # DO NOT REMOVE THE LINE BELOW
5 # DO NOT REMOVE THE LINE ABOVE
6 #========================================
8 # These are common CYGWIN build settings.
9 # Comment out things you do not want.
10 # Or unComment things you want.
12 # PCs always have printer ports...
15 # Chose *ONE* of these three solutions.
16 #FTD2232_DRIVER = none
17 FT2232_DRIVER = ftd2xx
18 #FT2232_DRIVER = libftdi
20 # Do you have "libusb" installed?
21 ifeq (x"${FT2232_DRIVER}",x"libftdi")
22 # With LIBFTDI... LIBUSB is manditory.
26 # By default... we assume libusb not present.
29 #========================================
30 # DO NOT EDIT SETTINGS BELOW THIS LINE
31 #========================================
35 #========================================
38 # Solve problems on systems with DASH.. Grrr...
42 VIRGINS ?= ${HERE}/virgins
43 INSTALL_DIR ?= $(HERE)/install
44 PREFIX ?= ${INSTALL_DIR}
46 # Determine the build platform.
47 BUILD_SYSNAME_Linux =linux
48 BUILD_SYSNAME_linux =linux
49 BUILD_SYSNAME_CYGWIN_NT =cygwin
50 BUILD_SYSNAME_MINGW32_NT =mingw32
51 BUILD_SYSNAME_Darwin =darwin
52 BUILD_SYSNAME_darwin =darwin
53 BUILD_SYSNAME :=$(BUILD_SYSNAME_$(shell uname --sysname | cut -d'-' -f1))
55 # And machine (ie: i686, x86_64, or what ever)
56 BUILD_MACHINE :=$(BUILD_SYSNAME).$(shell uname -m)
59 #========================================
62 FTD2XX_LINUX_VERSION=0.4.16
63 FTD2XX_LINUX_DIR = ${HERE}/libftd2xx${FTD2XX_LINUX_VERSION}
64 FTD2XX_LINUX_64_DIR = ${HERE}/libftd2xx${FTD2XX_LINUX_VERSION}_x86_64
67 # Wiggler type interfaces are here.
68 OPENOCD_CONFIG_OPTIONS_printer_y += --enable-parport
69 OPENOCD_CONFIG_OPTIONS_printer_y += --enable-parport-giveio
70 OPENOCD_CONFIG_OPTIONS_printer_y += --enable-gw16012
71 OPENOCD_CONFIG_OPTIONS_printer_y += --enable-parport-giveio
72 OPENOCD_CONFIG_OPTIONS_printer_y += --enable-amtjtagaccel
75 # FTD2XX only supports these
76 OPENOCD_CONFIG_OPTIONS_ft2232_none =
77 OPENOCD_CONFIG_OPTIONS_ft2232_ftd2xx = --enable-ft2232_ftd2xx --enable-presto_ftd2xx --with-ftd2xx-win32-zipdir=${FTD2XX_WIN32_DIR}
78 OPENOCD_CONFIG_OPTIONS_ft2232_libftdi = --enable-ft2232_libftdi --enable-presto_libftdi
80 # LIBUSB - adds support for these.
81 OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-jlink
82 OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-usbprog
83 OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-rlink
84 OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-vsllink
85 OPENOCD_CONFIG_OPTIONS_libusb_y += --enable-usbprog
87 #========================================
88 # EXPLICITY NOT SUPPORTED INTERFACES
91 # This is a standalone hardware box
92 # it is *NOT* a cygwin thing.
95 # This is a uC/Linux (or linux) that
96 # runs uC/Linux and uses the gpio pins
97 # to bit-bang JTAG stuff.
100 # Just like at91rm9200 - different chip.
102 #========================================
103 # Build OPENOCD config options...
104 # Always enable "dummy"
105 OPENOCD_CONFIG_OPTIONS += --enable-dummy
107 # Today: Cannot enable 'oocd_trace' on cygwin.
108 # it assumes/uses termios functions like
109 # cfmakeraw() which do not exist on cygwin.
111 #OPENOCD_CONFIG_OPTIONS += --enable-oocd-trace
113 # Add printer options..
114 OPENOCD_CONFIG_OPTIONS += ${OPENOCD_CONFIG_OPTIONS_printer_${X86_PRINTER_PORT}}
116 # Add the FTD2232 based options.
117 OPENOCD_CONFIG_OPTIONS += ${OPENOCD_CONFIG_OPTIONS_ft2232_${FT2232_DRIVER}}
119 # Add LIBUSB based options.
120 OPENOCD_CONFIG_OPTIONS += ${OPENOCD_CONFIG_OPTIONS_libusb_${USE_LIBUSB}}
123 #========================================
124 # WARNING... the file on the ftdi chip site has a SPACE in the filename GRRR!!!
125 # We fix that with the "-O" option to wget.
126 FTD2XX_WIN32_VERSION=2.04.14
127 FTD2XX_WIN32_DIR = ${HERE}/ftd2xx.win32
129 FTD2XX_ZIPFILE_LOCAL=${VIRGINS}/cdm.${FTD2XX_WIN32_VERSION}.zip
130 # Damn thing has a space in the F-ing filename!
131 FTD2XX_ZIPFILE_URL ="http://www.ftdichip.com/Drivers/CDM/CDM ${FTD2XX_WIN32_VERSION}.zip"
134 #========================================
135 # LIBCONFUSE - used by LIBFTDI..
136 LIBCONFUSE_VERSION=2.5
137 LIBCONFUSE_TARFILE_LOCAL=${VIRGINS}/confuse-${LIBCONFUSE_VERSION}.tar.gz
138 LIBCONFUSE_TARFILE_URL =http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/confuse-${LIBCONFUSE_VERSION}.tar.gz
140 LIBCONFUSE_SRC_DIR =${HERE}/confuse-${LIBCONFUSE_VERSION}
141 LIBCONFUSE_BUILD_DIR =${HERE}/confuse-build
144 #========================================
145 # LIBFTDI... (which uses libusb, and libconfuse)
147 LIBFTDI_TARFILE_LOCAL = ${VIRGINS}/libftdi-${LIBFTDI_VERSION}.tar.gz
148 LIBFTDI_TARFILE_URL = http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/libftdi-${LIBFTDI_VERSION}.tar.gz
150 LIBFTDI_SRC_DIR = ${HERE}/libftdi-${LIBFTDI_VERSION}
151 LIBFTDI_BUILD_DIR= ${HERE}/libftdi-build
153 #========================================
154 # Finally - OpenOCD...
156 OPENOCD_BUILD_DIR =${HERE}/openocd-build
157 OPENOCD_SRC_DIR =${HERE}/openocd
159 #========================================
161 #========================================