]> cvs.zerfleddert.de Git - proxmark3-svn/blame - COMPILING.txt
CHG: added a check if err variable is NIL.
[proxmark3-svn] / COMPILING.txt
CommitLineData
9cc7c4b4 1The project compiles on Linux, Mac OS X and Windows (MinGW/MSYS).
4cd41f34 2
3it requires:
185d675b 4- gcc >= 4.8
4cd41f34 5- libpthread
6- libreadline
7- libusb
9cc7c4b4 8- perl
9- an ARM cross-compiler to compile the firmware
185d675b 10- libncurses5-dev
4cd41f34 11
9cc7c4b4 12and optionally QT for the GUI
4cd41f34 13
14
15To compile, just run "make".
16
13bb3b4b 17===========
18= Windows =
19===========
20The 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).
21
221 - Install QT SDK for Windows [1]
23
24In the following instructions, we'll assume you installed it to C:\QT
25
262 - MSYS-1.0.11 [2]
27
28Just follow the installation procedure.
29When asked if you have MinGW installed and for its path, provide:
30C:/QT/mingw
31
323 - readline-5.0-1-bin [5]
33
34From this archive, copy:
35bin/* to C:\QT\mingw\bin
36include/* to C:\QT\mingw\include
37lib/*.a to C:\QT\mingw\lib
38
394 - libusb-win32-device-bin-0.1.12.2 [6]
40
41Be careful here, it is *NOT* working with the filter version!
42Likewise copy:
43include/usb.h to C:\QT\mingw\include
44lib/gcc/libusb.a to C:\QT\mingw\lib
45
9cc7c4b4 46
475 - Install DevkitPro [5]
48
49You'll need it to compile the firmware (ARM) side.
50You only need devkitARM, nothing more (no extra lib or anything else)
51Assuming you installed it to C:\devkitpro, make sure you set
52the DEVKITARM environment variable to /c/devkitPro/devkitARM :
53export DEVKITARM=/c/devkitPro/devkitARM
e0c67c7f 54Also, add its bin to your PATH:
55export PATH=$PATH:$DEVKITARM/bin
9cc7c4b4 56
576 - Install Strawberry Perl [6]
58
8691f5b7 597 - Setup a few variables
60
61In your shell from MSYS, make sure you set QTDIR to your QT installation:
62export QTDIR=/c/QT/qt
63And add its bin to your path as well:
64export PATH=$PATH:$QTDIR/bin
65
13bb3b4b 66Download links:
67
68[1] http://qt.nokia.com/downloads/sdk-windows-cpp
69[2] http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe
70[3] http://sourceforge.net/projects/gnuwin32/files/readline/5.0-1/readline-5.0-1-bin.zip/download
71[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 72[5] http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitProUpdater-1.5.0.exe/download
73[6] http://strawberry-perl.googlecode.com/files/strawberry-perl-5.10.1.1.msi
b97a3d99 74
72de52ee 75Rather than download and install every one of these packages, a new ProxSpace
76environment archive file will be made available for download on the project
77page at http://code.google.com/p/proxmark3/downloads/list
b97a3d99 78
13bb3b4b 79Download the ProxSpace environment archive and extract it to C:\
4cd41f34 80
81============
82= Mac OS X =
83============
84
799b2e2e
PZ
85Tested on OSX 10.10 Yosemite
86
871 - Install Xcode and Xcode Command Line Tools
88
892 - Install Homebrew and dependencies
90 brew install readline
91 brew instal libusb
92
933 - Download DevKitARM for OSX
94 http://sourceforge.net/projects/devkitpro/files/devkitARM/devkitARM_r44/
95 Unpack devkitARM_r44-osx.tar.bz2 to proxmark3 directory.
96
974 - Edit proxmark3/client/Makefile adding path to readline
98
99 LDLIBS = -L/usr/local/Cellar/readline/6.3.8/lib/ -L/opt/local/lib -L/usr/local/lib ../liblua/liblua.a -lreadline -lpthread -lm
100 CFLAGS = -std=c99 -I/usr/local/Cellar/readline/6.3.8/include/ -I. -I../include -I../common -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O4
101
102 Replace path /usr/local/Cellar/readline/6.3.8 with your actuall readline path. See homebrew manuals.
103
1045 - Set Environment
105
106 export DEVKITPRO=$HOME/proxmark3/
107 export DEVKITARM=$DEVKITPRO/devkitARM
108 export PATH=${PATH}:${DEVKITARM}/bin
109
4cd41f34 110
111============
112= Linux =
113============
114
9455b51c 1151 - Download
116
117A precompiled DevKitARM cross compiler tool chain package can be found at
118http://sourceforge.net/projects/devkitpro/files/devkitARM
119Select the one you need (32bit or 64bit) and unpack to a convinient place, eg
120$HOME/proxmark3/. It will create a devkitARM/ subdirectory.
121
0546b4aa 122You will also need a general compiling environment on your computer for
9455b51c 123the client and the libusb headers. In most distributions you will get all you
124need with the lsb-package (Linux Standard Base). In debian/ubuntu you simply
0546b4aa 125call `aptitude install lsb libusb-dev libreadline-dev libreadline6`.
9455b51c 126
127For the graphical plot view, you might need the qtlibs (debian/ubuntu:
128libqt4-dev), too.
129
1302 - Set Environment
131
132export DEVKITPRO=$HOME/proxmark3/
133export DEVKITARM=$DEVKITPRO/devkitARM
134export PATH=${PATH}:${DEVKITARM}/bin
4cd41f34 135
Impressum, Datenschutz