]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Cygwin Based Users Guidev0.2 -formatting revisions
authoryoyoerx <yoyoerx@users.noreply.github.com>
Fri, 4 Mar 2016 20:04:42 +0000 (15:04 -0500)
committeryoyoerx <yoyoerx@users.noreply.github.com>
Fri, 4 Mar 2016 20:04:42 +0000 (15:04 -0500)
keyboard/planck/CYGWIN_GUIDE.md

index 896a42c764a74311e14226e6a68bbee780e377b7..2fa4452f1ccd79c76f35006cee6fa85733497397 100755 (executable)
@@ -1,41 +1,41 @@
-#Planck Advanced (but not too advanced) Cygwin Users Guide\r
-If 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.\r
+#Planck Advanced (but not too advanced) `cygwin` Users Guide\r
+If 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.\r
 \r
 \r
-This 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.\r
+This 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`.\r
 \r
 \r
 #####Do not skip steps. Do not move past a step until the previous step finishes successfully.\r
 \r
 \r
 \r
-based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html)\r
+Based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html)\r
 \r
 \r
-###get the required packages\r
-Download 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:\r
--devel/gcc-core\r
--devel/gcc-g++\r
--devel/flex\r
--devel/git\r
--libs/libglib2.0_0\r
--libs/libgcc1\r
--interpreters/m4\r
--web/wget\r
+##Get the Required Packages\r
+Download 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:\r
+- devel/gcc-core\r
+- devel/gcc-g++\r
+- devel/flex\r
+- devel/git\r
+- libs/libglib2.0_0\r
+- libs/libgcc1\r
+- interpreters/m4\r
+- web/wget\r
 \r
 The following sources will be required:\r
--get [gmp](https://gmplib.org/) (6.1.0)\r
--get [mpfr](http://www.mpfr.org/) (3.1.3)\r
--get [mpc](http://www.multiprecision.org/) (1.0.3) \r
--get [binutils](https://www.sourceware.org/binutils/) (2.26)\r
--get [gcc](https://gcc.gnu.org/) (5.3.0)\r
--get [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0)\r
+- [gmp](https://gmplib.org/) (6.1.0)\r
+- [mpfr](http://www.mpfr.org/) (3.1.3)\r
+- [mpc](http://www.multiprecision.org/) (1.0.3) \r
+- [binutils](https://www.sourceware.org/binutils/) (2.26)\r
+- [gcc](https://gcc.gnu.org/) (5.3.0)\r
+- [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0)\r
 \r
 The `dfu-programmer` will be required to flash the new firmware \r
--get [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2)\r
+- [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2)\r
 \r
 \r
-The 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\r
+The 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\r
 \r
 ```\r
 $ mkdir ~/local/avr\r
@@ -55,8 +55,8 @@ $ tar -zxf gcc-5.3.0.tar.gz
 $ tar -xjf avr-libc-2.0.0.tar.bz2 \r
 ```\r
 \r
-###setup build environment\r
-These 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 \r
+##Setup the Build Environment\r
+These 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.\r
 ```\r
 $ PREFIX=$HOME/local/avr\r
 $ export PREFIX\r
@@ -65,10 +65,10 @@ $ PATH=$PATH:$PREFIX/bin
 $ export PATH\r
 ```\r
 \r
-##The gcc required math library packages\r
-The 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.\r
+##The `gcc` Required Math Library Packages\r
+The 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.\r
 \r
-###build and install gmp\r
+###Build and Install `gmp`\r
 ```\r
 $ cd ~/src/gmp-6.1.0\r
 $ ./configure --enable-static --disable-shared\r
@@ -77,7 +77,7 @@ $ make check
 $ make install\r
 ```\r
 \r
-###build and install mpfr\r
+###Build and Install `mpfr`\r
 ```\r
 $ cd ~/src/mpfr-3.1.3\r
 $ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared\r
@@ -86,7 +86,7 @@ $ make check
 $ make install\r
 ```\r
 \r
-###build and install mpc\r
+###Build and Install `mpc`\r
 ```\r
 $ cd ~/src/mpc-1.0.3\r
 $ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared\r
@@ -96,8 +96,8 @@ $ make install
 ```\r
 \r
 ##OPTIONAL Part\r
-You 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.\r
-###build and install gcc on your machine  \r
+You 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.\r
+###Build and Install `gcc` on your Machine  \r
 ```\r
 $ cd ~/src/gcc-5.3.0\r
 $ mkdir obj-local\r
@@ -107,7 +107,7 @@ $ make
 $ make install\r
 ```\r
 \r
-###build and install binutils on your machine\r
+###Build and Install `binutils` on your Machine\r
 ```\r
 $ cd ~/src/binutils-2.26\r
 $ mkdir obj-local\r
@@ -118,10 +118,10 @@ $ make install
 ```\r
 ##End OPTIONAL Part\r
 \r
-##Buliding binutils, gcc and avr-libc for the AVR system\r
-Now 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.\r
+##Buliding `binutils`, `gcc`, and `avr-libc` for the AVR system\r
+Now 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.\r
 \r
-###build binutils for avr\r
+###Build `binutils` for AVR\r
 ```\r
 $ cd ~/src/binutils-2.26\r
 $ mkdir obj-avr\r
@@ -131,7 +131,7 @@ $ make
 $ make install\r
 ```\r
 \r
-###build gcc for avr\r
+###Build `gcc` for AVR\r
 ```\r
 $ cd ~/src/gcc-5.3.0\r
 $ mkdir obj-avr\r
@@ -141,9 +141,9 @@ $ make
 $ make install\r
 ```\r
 \r
-For 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\r
+For 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`.\r
 \r
-###build avr-libc for avr\r
+###Build `avr-libc` for AVR\r
 ```\r
 $ cd ~/src/avr-libc-2.0.0\r
 $ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr\r
@@ -151,9 +151,9 @@ $ make
 $ make install\r
 ```\r
 \r
-##Install dfu-programmer\r
-To 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).\r
-Copy 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:\r
+##Install `dfu-programmer`\r
+To 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).\r
+Copy 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:\r
 ```\r
 C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin\r
 ```\r
@@ -169,11 +169,11 @@ Type 'dfu-programmer --help'    for a list of commands
      'dfu-programmer --targets' to list supported target devices\r
 ```\r
 If you are not getting the above result, you will not be able to flash the firmware! \r
--Try making sure your PATH variables are set correctly for both windows and cygwin\r
--Do not try to extract it with cygwin's `unzip` as it does not set the executable permissions correctly.\r
+- Try making sure your `PATH` variables are set correctly for both `Windows` and `cygwin`\r
+- 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`\r
 \r
 ####Install the USB drivers\r
-These 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:\r
+These 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:\r
 ```\r
 C:\> pnputil -i -a C:\cygwin64\home\Kevin\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf\r
 ```\r
@@ -193,9 +193,9 @@ Number successfully imported: 1
 \r
 ##Building and Flashing the Planck firmware!\r
 \r
-If you did everything else right. This part should be a snap! Grab the latest sources from github, make the Plank firmware, then flash it.\r
+If you did everything else right. This part should be a snap! Grab the latest sources from `github`, make the Plank firmware, then flash it.\r
 \r
-###build Planck and load the firmware\r
+###Build Planck and Load the Firmware\r
 ```\r
 $ cd ~/src\r
 $ git clone https://github.com/jackhumbert/qmk_firmware.git\r
@@ -225,7 +225,7 @@ Size after:
 -------- end --------\r
 ```\r
 \r
-If 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.\r
+If 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.\r
 \r
 But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then:\r
 ```\r