diff options
105 files changed, 35722 insertions, 40545 deletions
diff --git a/.gitignore b/.gitignore index ae342167df..8b8c45169d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +keyboard/planck/dfu-programmer.exe .dep *.o *.eep @@ -18,4 +19,5 @@ build/ # Eclipse Settings .cproject .project -.settings/
\ No newline at end of file +.settings/ + diff --git a/1-setup-path-win.bat b/1-setup-path-win.bat new file mode 100644 index 0000000000..49fb00e149 --- /dev/null +++ b/1-setup-path-win.bat @@ -0,0 +1,9 @@ +@echo off +setx /M path "%PATH%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin" > nul 2>&1 +if NOT ["%errorlevel%"]==["0"] ( + echo FAILED. Rerun with administrator privileges. + pause +) else ( + echo Success! + pause +) diff --git a/2-setup-environment-win.bat b/2-setup-environment-win.bat new file mode 100644 index 0000000000..91b6c91e39 --- /dev/null +++ b/2-setup-environment-win.bat @@ -0,0 +1,41 @@ +@echo off +setx /M test test > nul 2>&1 +if NOT ["%errorlevel%"]==["0"] ( + echo FAILED. Rerun with administrator privileges. + pause + exit +) + +echo ------------------------------------------ +echo Installing wget and unzip +echo ------------------------------------------ +mingw-get install msys-wget-bin msys-unzip-bin +cd \MinGW\bin + +mkdir temp +cd temp +echo ------------------------------------------ +echo Installing dfu-programmer. +echo ------------------------------------------ +wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip +unzip dfu-programmer-win-0.7.2.zip +copy dfu-programmer.exe .. + +echo ------------------------------------------ +echo Downloading driver +echo ------------------------------------------ +wget http://iweb.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip +unzip libusb-win32-bin-1.2.6.0.zip +cp libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll + +echo ------------------------------------------ +echo Installing driver. Accept prompt. +echo ------------------------------------------ +pnputil -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf + +cd .. +rm -rf temp + +echo ------------------------------------------ +echo Finished! +pause
\ No newline at end of file diff --git a/BUILD_GUIDE.md b/BUILD_GUIDE.md new file mode 100644 index 0000000000..81c3ec44f2 --- /dev/null +++ b/BUILD_GUIDE.md @@ -0,0 +1,55 @@ +# Build Guide + +## Build Environment Setup + +### Windows +1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. +2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. +3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. +5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! + +### Mac +If you're using [homebrew,](http://brew.sh/) you can use the following commands: + + brew tap osx-cross/avr + brew install avr-libc + brew install dfu-programmer + +This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. + +You can also try these instructions: + +1. Install Xcode from the App Store. +2. Install the Command Line Tools from `Xcode->Preferences->Downloads`. +3. Install [DFU-Programmer][dfu-prog]. + +### Linux +Install AVR GCC and dfu-progammer with your favorite package manager. + +Debian/Ubuntu example: + + sudo apt-get update + sudo apt-get install gcc-avr dfu-programmer + +### Vagrant +If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md). + +## Verify Your Installation +1. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. |