aboutsummaryrefslogtreecommitdiff
path: root/keyboard/planck
diff options
context:
space:
mode:
authoryoyoerx <yoyoerx@users.noreply.github.com>2016-03-04 15:04:42 -0500
committeryoyoerx <yoyoerx@users.noreply.github.com>2016-03-04 15:04:42 -0500
commit2f6f45aa3ee6cdeaa8e3904926a662d7a0a681c5 (patch)
tree2e3f023152e0e1bda7b94fb75e40a0e725b524f4 /keyboard/planck
parentc9c763e0007fa7fcebe8dde64f270258468ca757 (diff)
downloadqmk_firmware-2f6f45aa3ee6cdeaa8e3904926a662d7a0a681c5.tar.gz
qmk_firmware-2f6f45aa3ee6cdeaa8e3904926a662d7a0a681c5.zip
Cygwin Based Users Guidev0.2 -formatting revisions
Diffstat (limited to 'keyboard/planck')
-rwxr-xr-xkeyboard/planck/CYGWIN_GUIDE.md94
1 files changed, 47 insertions, 47 deletions
diff --git a/keyboard/planck/CYGWIN_GUIDE.md b/keyboard/planck/CYGWIN_GUIDE.md
index 896a42c76..2fa4452f1 100755
--- a/keyboard/planck/CYGWIN_GUIDE.md
+++ b/keyboard/planck/CYGWIN_GUIDE.md
@@ -1,41 +1,41 @@
1#Planck Advanced (but not too advanced) Cygwin Users Guide 1#Planck Advanced (but not too advanced) `cygwin` Users Guide
2If you are a user of the [Cygwin environment](https://cygwin.com) in Windows and want the freedom to use the latest tools available, then this is the guide for you. If compiling your own copy of the latest and greatest Gnu C compiler makes you super happy, then this is the guide for you. If the command line make you smile, then this is the guide for you. 2If you are a user of the [cygwin environment](https://cygwin.com) in Windows and want the freedom to use the latest tools available, then this is the guide for you. If compiling your own copy of the latest and greatest Gnu C Compiler makes you super happy, then this is the guide for you. If the command line make you smile, then this is the guide for you.
3 3
4 4
5This guide was written step by step as I went through the process on a Windows10 x86_64 based system. This should be generally applicable to to any Windows Environment with Cygwin. 5This guide was written step by step as I went through the process on a `Windows 10` `x86_64` based system. This should be generally applicable to to any `Windows` environment with `cygwin`.
6 6
7 7
8#####Do not skip steps. Do not move past a step until the previous step finishes successfully. 8#####Do not skip steps. Do not move past a step until the previous step finishes successfully.
9 9
10 10
11 11
12based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html) 12Based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html)
13 13
14 14
15###get the required packages 15##Get the Required Packages
16Download the Cygwin Installer ([x86_64](https://cygwin.com/setup-x86_64.exe) or [x86_32](https://cygwin.com/setup-x86.exe)) and install the default system plus the following if they are not already selected: 16Download the `cygwin` setup ([x86_64](https://cygwin.com/setup-x86_64.exe)) and install the default system plus the following if they are not already selected:
17-devel/gcc-core 17- devel/gcc-core
18-devel/gcc-g++ 18- devel/gcc-g++
19-devel/flex 19- devel/flex
20-devel/git 20- devel/git
21-libs/libglib2.0_0 21- libs/libglib2.0_0
22-libs/libgcc1 22- libs/libgcc1
23-interpreters/m4 23- interpreters/m4
24-web/wget 24- web/wget
25 25
26The following sources will be required: 26The following sources will be required:
27-get [gmp](https://gmplib.org/) (6.1.0) 27- [gmp](https://gmplib.org/) (6.1.0)
28-get [mpfr](http://www.mpfr.org/) (3.1.3) 28- [mpfr](http://www.mpfr.org/) (3.1.3)
29-get [mpc](http://www.multiprecision.org/) (1.0.3) 29- [mpc](http://www.multiprecision.org/) (1.0.3)
30-get [binutils](https://www.sourceware.org/binutils/) (2.26) 30- [binutils](https://www.sourceware.org/binutils/) (2.26)
31-get [gcc](https://gcc.gnu.org/) (5.3.0) 31- [gcc](https://gcc.gnu.org/) (5.3.0)
32-get [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0) 32- [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0)
33 33
34The `dfu-programmer` will be required to flash the new firmware 34The `dfu-programmer` will be required to flash the new firmware
35-get [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2) 35- [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2)
36 36
37 37
38The set of commands below will create a directory (`~/local/avr`) for the sources you compile to be installed on the machine and a directory (`~/src`) for these source files to be stored. The commands then download the sources of the needed packages and unpack them. note: the expand commands are different depending on if the packages are offered as a bz2 or gz archive 38The set of commands below will create a directory (`~/local/avr`) for the sources you compile to be installed on the machine and a directory (`~/src`) for these source files to be stored. The commands then download the sources of the needed packages and unpack them. Note: the expand commands are different depending on if the packages are offered as a `bz2` or `gz` archive
39 39
40``` 40```
41$ mkdir ~/local/avr 41$ mkdir ~/local/avr
@@ -55,8 +55,8 @@ $ tar -zxf gcc-5.3.0.tar.gz
55$ tar -xjf avr-libc-2.0.0.tar.bz2 55$ tar -xjf avr-libc-2.0.0.tar.bz2
56``` 56```
57 57
58###setup build environment 58##Setup the Build Environment
59These commands will set up the install directory and the PATH variable, which will allow you to access your installed packages. note: if you close the cygwin terminal window, you will need to rerun these commands, they are not permanent 59These commands will set up the install directory and the `PATH` variable, which will allow you to access your installed packages. Note: if you close the `cygwin` terminal window, you will need to rerun these commands, they are not permanent.
60``` 60```
61$ PREFIX=$HOME/local/avr 61$ PREFIX=$HOME/local/avr
62$ export PREFIX 62$ export PREFIX
@@ -65,10 +65,10 @@ $ PATH=$PATH:$PREFIX/bin
65$ export PATH 65$ export PATH
66``` 66```
67 67
68##The gcc required math library packages 68##The `gcc` Required Math Library Packages
69The following packages are required to be complied and installed in order to compile gcc. They are not available through the cygwin package system, so we have to make them ourselves. They must be complied in this order because each one depends on the previous. 69The following packages are required to be complied and installed in order to compile `gcc`. They are not available through the `cygwin` package system, so we have to make them ourselves. They must be complied in this order because each one depends on the previous.
70 70
71###build and install gmp 71###Build and Install `gmp`
72``` 72```
73$ cd ~/src/gmp-6.1.0 73$ cd ~/src/gmp-6.1.0
74$ ./configure --enable-static --disable-shared 74$ ./configure --enable-static --disable-shared
@@ -77,7 +77,7 @@ $ make check
77$ make install 77$ make install
78``` 78```
79 79
80###build and install mpfr 80###Build and Install `mpfr`
81``` 81```
82$ cd ~/src/mpfr-3.1.3 82$ cd ~/src/mpfr-3.1.3
83$ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared 83$ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared
@@ -86,7 +86,7 @@ $ make check
86$ make install 86$ make install
87``` 87```
88 88
89###build and install mpc 89###Build and Install `mpc`
90``` 90```
91$ cd ~/src/mpc-1.0.3 91$ cd ~/src/mpc-1.0.3
92$ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared 92$ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared
@@ -96,8 +96,8 @@ $ make install
96``` 96```
97 97
98##OPTIONAL Part 98##OPTIONAL Part
99You can build and install a brand new gcc or you can use the one supplied by cygwin. This will take about 4-5 hours to compile (It is a "native build", so it does the entire build **3 times**. This takes a long while). I would skip it. 99You can build and install a brand new `gcc` or you can use the one supplied by `cygwin`. This will take about 4-5 hours to compile (It is a "native build", so it does the entire build **3 times**. This takes a long while). I would skip it.
100###build and install gcc on your machine 100###Build and Install `gcc` on your Machine
101``` 101```
102$ cd ~/src/gcc-5.3.0 102$ cd ~/src/gcc-5.3.0
103$ mkdir obj-local 103$ mkdir obj-local
@@ -107,7 +107,7 @@ $ make
107$ make install 107$ make install
108``` 108```
109 109
110###build and install binutils on your machine 110###Build and Install `binutils` on your Machine
111``` 111```
112$ cd ~/src/binutils-2.26 112$ cd ~/src/binutils-2.26
113$ mkdir obj-local 113$ mkdir obj-local
@@ -118,10 +118,10 @@ $ make install
118``` 118```
119##End OPTIONAL Part 119##End OPTIONAL Part
120 120
121##Buliding binutils, gcc and avr-libc for the AVR system 121##Buliding `binutils`, `gcc`, and `avr-libc` for the AVR system
122Now we can make the critical stuff for compiling our firmware, binutils, gcc, and avr-libc for the AVR architectures. These allow us to build and manipulate the firmware for the Keyboard. 122Now we can make the critical stuff for compiling our firmware: `binutils`, `gcc`, and `avr-libc` for the AVR architecture. These allow us to build and manipulate the firmware for the keyboard.
123 123
124###build binutils for avr 124###Build `binutils` for AVR
125``` 125```
126$ cd ~/src/binutils-2.26 126$ cd ~/src/binutils-2.26
127$ mkdir obj-avr 127$ mkdir obj-avr
@@ -131,7 +131,7 @@ $ make
131$ make install 131$ make install
132``` 132```
133 133
134###build gcc for avr 134###Build `gcc` for AVR
135``` 135```
136$ cd ~/src/gcc-5.3.0 136$ cd ~/src/gcc-5.3.0
137$ mkdir obj-avr 137$ mkdir obj-avr
@@ -141,9 +141,9 @@ $ make
141$ make install 141$ make install
142``` 142```
143 143
144For building the avr-libc, we have to specify the host build system. in my case it is `x86_64-unknown-cygwin`. You can look for build system type in the gcc configure notes for the proper `--build` specification to pass when you configure avr-libc 144For building the `avr-libc`, we have to specify the host build system. in my case it is `x86_64-unknown-cygwin`. You can look for build system type in the `gcc` configure notes for the proper `--build` specification to pass when you configure `avr-libc`.
145 145
146###build avr-libc for avr 146###Build `avr-libc` for AVR
147``` 147```
148$ cd ~/src/avr-libc-2.0.0 148$ cd ~/src/avr-libc-2.0.0
149$ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr 149$ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr
@@ -151,9 +151,9 @@ $ make
151$ make install 151$ make install
152``` 152```
153 153
154##Install dfu-programmer 154##Install `dfu-programmer`
155To install the dfu-programmer, we must get if from [their website](https://dfu-programmer.github.io/) (no fancy command line tricks here, but [this](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip) might work). 155To install the `dfu-programmer`, we must get if from [their website](https://dfu-programmer.github.io/) (no fancy command line tricks here, but [this](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip) might work).
156Copy this file into your cygwin home directory. (For me, it is `C:\cygwin64\home\Kevin`), extract the files, move `dfu-programmer.exe` to `~/local/avr/bin`. Most obnoxiously, the `libusb0_x86.dll` and `libusb0.sys` need to be moved from `dfu/dfu-prog-usb-1.2.2/x86/` to a directory in the Windows PATH and the Cygwin PATH. I achieved this by moving the files in Windows Explorer to `C:\cygwin64\home\Kevin\local\avr\bin` Then, in a WINDOWS command prompt running: 156Copy this file into your `cygwin` home directory. (For me, it is `C:\cygwin64\home\Kevin`), extract the files, move `dfu-programmer.exe` to `~/local/avr/bin`. Most obnoxiously, the `libusb0_x86.dll` and `libusb0.sys` need to be moved from `dfu/dfu-prog-usb-1.2.2/x86/` to a directory in the `Windows` `PATH` and the `cygwin` `PATH`. I achieved this by moving the files with Windows Explorer (you know, click and drag...) to `C:\cygwin64\home\Kevin\local\avr\bin` Then, in a `WINDOWS` command prompt running:
157``` 157```
158C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin 158C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin
159``` 159```
@@ -169,11 +169,11 @@ Type 'dfu-programmer --help' for a list of commands
169 'dfu-programmer --targets' to list supported target devices 169 'dfu-programmer --targets' to list supported target devices
170``` 170```
171If you are not getting the above result, you will not be able to flash the firmware! 171If you are not getting the above result, you will not be able to flash the firmware!
172-Try making sure your PATH variables are set correctly for both windows and cygwin. 172- Try making sure your `PATH` variables are set correctly for both `Windows` and `cygwin`.
173-Do not try to extract it with cygwin's `unzip` as it does not set the executable permissions correctly. 173- Do not extract it with `cygwin`'s `unzip` as it does not set the executable permissions correctly. If you did it anyway, do `chmod 755 dfu-programmer.exe`
174 174
175####Install the USB drivers 175####Install the USB drivers
176These drivers are included in the `dfu-programmer` 0.7.2 (but you can get newer ones [here](http://iweb.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip)) and allow the dfu to program the firmware. From an administrator-privileged Windows terminal, run the following command (adjust the path as necessary) and accept the prompt that pops up: 176These drivers are included in the `dfu-programmer` 0.7.2 (but you can get newer ones [here](http://iweb.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip)) and allow the `dfu-programmer` to program the firmware. From an **administrator-privileged** `Windows` terminal, run the following command (adjust the path as necessary) and accept the prompt that pops up:
177``` 177```
178C:\> pnputil -i -a C:\cygwin64\home\Kevin\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf 178C:\> pnputil -i -a C:\cygwin64\home\Kevin\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf
179``` 179```
@@ -193,9 +193,9 @@ Number successfully imported: 1
193 193
194##Building and Flashing the Planck firmware! 194##Building and Flashing the Planck firmware!
195 195
196If you did everything else right. This part should be a snap! Grab the latest sources from github, make the Plank firmware, then flash it. 196If you did everything else right. This part should be a snap! Grab the latest sources from `github`, make the Plank firmware, then flash it.
197 197
198###build Planck and load the firmware 198###Build Planck and Load the Firmware
199``` 199```
200$ cd ~/src 200$ cd ~/src
201$ git clone https://github.com/jackhumbert/qmk_firmware.git 201$ git clone https://github.com/jackhumbert/qmk_firmware.git
@@ -225,7 +225,7 @@ Size after:
225-------- end -------- 225-------- end --------
226``` 226```
227 227
228If you don't, you did not build the firmware, and you will have nothing to flash. If you have the fresh clone from github, it was probably something in the install process, go check and see what didn't work and threw errors or what steps you might have missed. 228If you do not get the above, you **did not** build the firmware, and you will have nothing to flash. If you have the fresh clone from github, it was probably something gone wrong in this install process, go check and see what didn't work and threw errors or what steps you might have missed.
229 229
230But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then: 230But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then:
231``` 231```