]> git.zerfleddert.de Git - proxmark3-svn/blame - COMPILING.txt
Merge remote-tracking branch 'upstream/master'
[proxmark3-svn] / COMPILING.txt
CommitLineData
9cc7c4b4 1The project compiles on Linux, Mac OS X and Windows (MinGW/MSYS).
4cd41f34 2
3it requires:
9cc7c4b4 4- gcc >= 4.4
4cd41f34 5- libpthread
6- libreadline
7- libusb
9cc7c4b4 8- perl
9- an ARM cross-compiler to compile the firmware
4cd41f34 10
9cc7c4b4 11and optionally QT for the GUI
4cd41f34 12
13
14To compile, just run "make".
15
13bb3b4b 16===========
17= Windows =
18===========
19The following is a complete list of packages required to setup the compile environment yourself. Alternatively you can download an archive of the full environment (see below).
20
211 - Install QT SDK for Windows [1]
22
23In the following instructions, we'll assume you installed it to C:\QT
24
252 - MSYS-1.0.11 [2]
26
27Just follow the installation procedure.
28When asked if you have MinGW installed and for its path, provide:
29C:/QT/mingw
30
313 - readline-5.0-1-bin [5]
32
33From this archive, copy:
34bin/* to C:\QT\mingw\bin
35include/* to C:\QT\mingw\include
36lib/*.a to C:\QT\mingw\lib
37
384 - libusb-win32-device-bin-0.1.12.2 [6]
39
40Be careful here, it is *NOT* working with the filter version!
41Likewise copy:
42include/usb.h to C:\QT\mingw\include
43lib/gcc/libusb.a to C:\QT\mingw\lib
44
9cc7c4b4 45
465 - Install DevkitPro [5]
47
48You'll need it to compile the firmware (ARM) side.
49You only need devkitARM, nothing more (no extra lib or anything else)
50Assuming you installed it to C:\devkitpro, make sure you set
51the DEVKITARM environment variable to /c/devkitPro/devkitARM :
52export DEVKITARM=/c/devkitPro/devkitARM
e0c67c7f 53Also, add its bin to your PATH:
54export PATH=$PATH:$DEVKITARM/bin
9cc7c4b4 55
566 - Install Strawberry Perl [6]
57
8691f5b7 587 - Setup a few variables
59
60In your shell from MSYS, make sure you set QTDIR to your QT installation:
61export QTDIR=/c/QT/qt
62And add its bin to your path as well:
63export PATH=$PATH:$QTDIR/bin
64
13bb3b4b 65Download links:
66
67[1] http://qt.nokia.com/downloads/sdk-windows-cpp
68[2] http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe
69[3] http://sourceforge.net/projects/gnuwin32/files/readline/5.0-1/readline-5.0-1-bin.zip/download
70[4] http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/0.1.12.2/libusb-win32-device-bin-0.1.12.2.tar.gz/download
9cc7c4b4 71[5] http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitProUpdater-1.5.0.exe/download
72[6] http://strawberry-perl.googlecode.com/files/strawberry-perl-5.10.1.1.msi
b97a3d99 73
72de52ee 74Rather than download and install every one of these packages, a new ProxSpace
75environment archive file will be made available for download on the project
76page at http://code.google.com/p/proxmark3/downloads/list
b97a3d99 77
13bb3b4b 78Download the ProxSpace environment archive and extract it to C:\
4cd41f34 79
80============
81= Mac OS X =
82============
83
45095b01
PZ
84Installing from HomeBrew tap
85---------------------------
86This method is recommended and tested on macOS Sierra 10.12.3
87
881. Install homebrew if you haven't yet already done so: http://brew.sh/
89
902. Tap proxmark repo:
91 brew tap proxmark/proxmark3
92
933. Install Proxmark3:
94
95Stable release
96 brew install proxmark3
97
98Latest non-stable from GitHub (use this if previous command fails)
99 brew install --HEAD proxmark3
100
101For more information go to https://github.com/Proxmark/homebrew-proxmark3
102
103
104Compilling from source manually (Legacy)
105---------------------------
106
799b2e2e
PZ
107Tested on OSX 10.10 Yosemite
108
1091 - Install Xcode and Xcode Command Line Tools
110
1112 - Install Homebrew and dependencies
ed152580 112 brew install readline libusb p7zip libusb-compat wget qt5 pkgconfig
799b2e2e 113
ed152580
FZ
1143 - Install DevKitARM for OSX
115 Option 1:
116 http://sourceforge.net/projects/devkitpro/files/devkitARM/devkitARM_r44/
117 Unpack devkitARM_r44-osx.tar.bz2 to proxmark3 directory.
118 Option 2:
119 brew tap nitsky/stm32
120 brew install arm-none-eabi-gcc
799b2e2e 121
ed152580 1224 - Edit proxmark3/client/Makefile adding path to readline and qt5
799b2e2e 123
ed152580
FZ
124 LDLIBS = -L/usr/local/opt/readline/lib -L/usr/local/opt/qt5/lib -L/opt/local/lib -L/usr/local/lib ../liblua/liblua.a -lreadline -lpthread -lm
125 CFLAGS = -std=c99 -I/usr/local/opt/qt5/include -I/usr/local/opt/readline/include -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O4
799b2e2e 126
ed152580 127 If your old brew intallation use /usr/local/Cellar/ path replace /usr/local/opt/readline/lib with your actuall readline and qt5 path. See homebrew manuals.
799b2e2e
PZ
128
1295 - Set Environment
130
131 export DEVKITPRO=$HOME/proxmark3/
132 export DEVKITARM=$DEVKITPRO/devkitARM
133 export PATH=${PATH}:${DEVKITARM}/bin
134
4cd41f34 135
136============
137= Linux =
138============
139
9455b51c 1401 - Download
141
142A precompiled DevKitARM cross compiler tool chain package can be found at
143http://sourceforge.net/projects/devkitpro/files/devkitARM
144Select the one you need (32bit or 64bit) and unpack to a convinient place, eg
145$HOME/proxmark3/. It will create a devkitARM/ subdirectory.
146
0546b4aa 147You will also need a general compiling environment on your computer for
9455b51c 148the client and the libusb headers. In most distributions you will get all you
149need with the lsb-package (Linux Standard Base). In debian/ubuntu you simply
0546b4aa 150call `aptitude install lsb libusb-dev libreadline-dev libreadline6`.
9455b51c 151
152For the graphical plot view, you might need the qtlibs (debian/ubuntu:
153libqt4-dev), too.
154
1552 - Set Environment
156
157export DEVKITPRO=$HOME/proxmark3/
158export DEVKITARM=$DEVKITPRO/devkitARM
159export PATH=${PATH}:${DEVKITARM}/bin
4cd41f34 160
Impressum, Datenschutz