]> git.zerfleddert.de Git - proxmark3-svn/blob - COMPILING.txt
small text adjustments plus...
[proxmark3-svn] / COMPILING.txt
1 The project compiles on Linux, Mac OS X and Windows (MinGW/MSYS).
2
3 it requires:
4 - gcc >= 4.4
5 - libpthread
6 - libreadline
7 - libusb
8 - perl
9 - an ARM cross-compiler to compile the firmware
10
11 and optionally QT for the GUI
12
13
14 To compile, just run "make".
15
16 ===========
17 = Windows =
18 ===========
19 The 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
21 1 - Install QT SDK for Windows [1]
22
23 In the following instructions, we'll assume you installed it to C:\QT
24
25 2 - MSYS-1.0.11 [2]
26
27 Just follow the installation procedure.
28 When asked if you have MinGW installed and for its path, provide:
29 C:/QT/mingw
30
31 3 - readline-5.0-1-bin [5]
32
33 From this archive, copy:
34 bin/* to C:\QT\mingw\bin
35 include/* to C:\QT\mingw\include
36 lib/*.a to C:\QT\mingw\lib
37
38 4 - libusb-win32-device-bin-0.1.12.2 [6]
39
40 Be careful here, it is *NOT* working with the filter version!
41 Likewise copy:
42 include/usb.h to C:\QT\mingw\include
43 lib/gcc/libusb.a to C:\QT\mingw\lib
44
45
46 5 - Install DevkitPro [5]
47
48 You'll need it to compile the firmware (ARM) side.
49 You only need devkitARM, nothing more (no extra lib or anything else)
50 Assuming you installed it to C:\devkitpro, make sure you set
51 the DEVKITARM environment variable to /c/devkitPro/devkitARM :
52 export DEVKITARM=/c/devkitPro/devkitARM
53 Also, add its bin to your PATH:
54 export PATH=$PATH:$DEVKITARM/bin
55
56 6 - Install Strawberry Perl [6]
57
58 7 - Setup a few variables
59
60 In your shell from MSYS, make sure you set QTDIR to your QT installation:
61 export QTDIR=/c/QT/qt
62 And add its bin to your path as well:
63 export PATH=$PATH:$QTDIR/bin
64
65 Download 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
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
73
74 Rather than download and install every one of these packages, a new ProxSpace
75 environment archive file will be made available for download on the project
76 page at http://code.google.com/p/proxmark3/downloads/list
77
78 Download the ProxSpace environment archive and extract it to C:\
79
80 ============
81 = Mac OS X =
82 ============
83
84 Tested on OSX 10.10 Yosemite
85
86 1 - Install Xcode and Xcode Command Line Tools
87
88 2 - Install Homebrew and dependencies
89 brew install readline libusb p7zip libusb-compat wget qt5 pkgconfig
90
91 3 - Install DevKitARM for OSX
92 Option 1:
93 http://sourceforge.net/projects/devkitpro/files/devkitARM/devkitARM_r44/
94 Unpack devkitARM_r44-osx.tar.bz2 to proxmark3 directory.
95 Option 2:
96 brew tap nitsky/stm32
97 brew install arm-none-eabi-gcc
98
99 4 - Edit proxmark3/client/Makefile adding path to readline and qt5
100
101 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
102 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
103
104 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.
105
106 5 - Set Environment
107
108 export DEVKITPRO=$HOME/proxmark3/
109 export DEVKITARM=$DEVKITPRO/devkitARM
110 export PATH=${PATH}:${DEVKITARM}/bin
111
112
113 ============
114 = Linux =
115 ============
116
117 1 - Download
118
119 A precompiled DevKitARM cross compiler tool chain package can be found at
120 http://sourceforge.net/projects/devkitpro/files/devkitARM
121 Select the one you need (32bit or 64bit) and unpack to a convinient place, eg
122 $HOME/proxmark3/. It will create a devkitARM/ subdirectory.
123
124 You will also need a general compiling environment on your computer for
125 the client and the libusb headers. In most distributions you will get all you
126 need with the lsb-package (Linux Standard Base). In debian/ubuntu you simply
127 call `aptitude install lsb libusb-dev libreadline-dev libreadline6`.
128
129 For the graphical plot view, you might need the qtlibs (debian/ubuntu:
130 libqt4-dev), too.
131
132 2 - Set Environment
133
134 export DEVKITPRO=$HOME/proxmark3/
135 export DEVKITARM=$DEVKITPRO/devkitARM
136 export PATH=${PATH}:${DEVKITARM}/bin
137
Impressum, Datenschutz