Skip to content

Commit

Permalink
Merge pull request #5 from jackhumbert/master
Browse files Browse the repository at this point in the history
Sync with upstream
  • Loading branch information
alexjj committed Apr 5, 2016
2 parents 4889967 + 931b0a7 commit 1facc53
Show file tree
Hide file tree
Showing 114 changed files with 12,942 additions and 3,408 deletions.
80 changes: 71 additions & 9 deletions 1-setup-path-win.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,71 @@
@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
)
@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
@ECHO OFF
SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe

SET NEWPATH1="C:\MinGW\msys\1.0\bin"
SET NEWPATH2="C:\MinGW\bin"

:: Make sure paths exist
IF NOT EXIST !NEWPATH1! (ECHO Path not found: %NEWPATH1% && GOTO ExitBatch)
IF NOT EXIST !NEWPATH2! (ECHO Path not found: %NEWPATH2% && GOTO ExitBatch)

:: Add paths
CALL :AddPath %NEWPATH1%
CALL :AddPath %NEWPATH2%

:: Branch to UpdateEnv if we need to update
IF DEFINED UPDATE (GOTO UpdateEnv)

GOTO ExitBatch

:: -----------------------------------------------------------------------------

:UpdateEnv
ECHO Making updated PATH go live . . .
REG delete HKCU\Environment /F /V TEMPVAR > nul 2>&1
setx TEMPVAR 1 > nul 2>&1
REG delete HKCU\Environment /F /V TEMPVAR > nul 2>&1
IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer)
GOTO ExitBatch

:: -----------------------------------------------------------------------------

:ExitBatch
ENDLOCAL
PAUSE
EXIT /b

:: -----------------------------------------------------------------------------

:AddPath <pathToAdd>
ECHO %PATH% | FINDSTR /C:"%~1" > nul
IF ERRORLEVEL 1 (
REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH /t REG_SZ /d "%PATH%;%~1" > nul 2>&1
IF ERRORLEVEL 0 (
ECHO Adding %1 . . . Success!
SET "PATH=%PATH%;%~1"
SET UPDATE=1
) ELSE (
ECHO Adding %1 . . . FAILED. Run this script with administrator privileges.
)
) ELSE (
ECHO Skipping %1 - Already in PATH
)
EXIT /b

:: -----------------------------------------------------------------------------

:KillExplorer

ECHO Your desktop is being restarted, please wait. . .
ping -n 5 127.0.0.1 > NUL 2>&1
ECHO Killing process Explorer.exe. . .
taskkill /f /im explorer.exe
ECHO.
ECHO Your desktop is now loading. . .
ping -n 5 127.0.0.1 > NUL 2>&1
ECHO.
ping -n 5 127.0.0.1 > NUL 2>&1
START explorer.exe
START explorer.exe %CD%
EXIT /b
23 changes: 14 additions & 9 deletions BUILD_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
## 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!
1. If you have ever installed WinAVR, uninstall it.
2. 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**.
3. 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.
4. 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.
5. 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.
6. 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!
7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell".

### Mac
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
Expand All @@ -25,12 +27,12 @@ You can also try these instructions:
3. Install [DFU-Programmer][dfu-prog].

### Linux
Install AVR GCC and dfu-progammer with your favorite package manager.
Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager.

Debian/Ubuntu example:

sudo apt-get update
sudo apt-get install gcc-avr dfu-programmer
sudo apt-get install gcc-avr avr-libc 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).
Expand All @@ -42,7 +44,10 @@ If you have any problems building the firmware, you can try using a tool called
4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process.

## Customizing, Building, and Deploying Your Firmware
1. Running the `make` command from your keyboard's folder will generate a .hex file based on the default keymap. All keymaps for a particular keyboard live in the `keymaps` folder in that keyboard's folder. To create your own keymap, copy `keymaps/default/keymap.c` to the `keymaps` folder, and rename it with your name, for example jack.c. Or, if you don't care about the ability to share your keymap with the community via GitHub, you can just modify the default keymap itself. Details on how to program keymap files can be found in other guides.

Note: Some keyboard folders have non-standard organizations, and may not even support specifying alternate keymaps. Until these get reorganized, you will need to edit their default keymaps directly.

1. Running the `make` command from your keyboard's folder will generate a .hex file based on the default keymap. All keymaps for a particular keyboard live in the `keymaps` folder in that keyboard's folder. To create your own keymap, copy `keymaps/default/keymap.c` to the `keymaps` folder, and rename it with your name, for example jack.c. Or, if you don't care about the ability to share your keymap with the community via GitHub, you can just modify the default keymap itself. Details on how to program keymap files can be found in other guides.
2. To build a keymap other than the default, type `KEYMAP=<name>` after `make`. So if I've named my keymap jack.c, the full command would be `make KEYMAP=jack`.
3. How you deploy the firmware will depend on whether you are using a PCB or a Teensy. In both cases, you'll need to put the keyboard in bootloader mode, either by pressing a button on the PCB/Teensy or pressing the key with the `RESET` keycode. Then, if you're using a PCB, just run `make KEYMAP=<name> dfu` to both build and deploy the firmware. If you're using a Teensy, you'll probably need to take the <keyboardname>.hex file that make produces in the keyboard's folder, and deploy it using the [Teensy Loader.](https://www.pjrc.com/teensy/loader.html)

Expand All @@ -52,4 +57,4 @@ If you have any problems building the firmware, you can try using a tool called
## Troubleshooting
1. Try running `make clean` if the make command fails.

WIP
WIP
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring

RGBLIGHT_ENABLE = yes

Please note that the underglow is not compatible with MIDI functions. So you cannot enable both of them at the same time.
Please note that the underglow is not compatible with audio output. So you cannot enable both of them at the same time.

Please add the following options into your config.h, and set them up according your hardware configuration.

Expand Down Expand Up @@ -309,4 +309,4 @@ what things are (and likely aren't) too risky.
- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
firmware repeatedly and continually; that'll burn the EEPROM
eventually.


4 changes: 2 additions & 2 deletions keyboard/alps64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ SRC = keymap_common.c \
led.c

ifdef KEYMAP
SRC := keymap_$(KEYMAP).c $(SRC)
SRC := keymaps/$(KEYMAP).c $(SRC)
else
SRC := keymap_plain.c $(SRC)
SRC := keymaps/default.c $(SRC)
endif

CONFIG_H = config.h
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions keyboard/atomic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ SRC = atomic.c \
backlight.c

ifdef KEYMAP
SRC := keymaps/keymap_$(KEYMAP).c $(SRC)
SRC := keymaps/$(KEYMAP).c $(SRC)
else
SRC := keymaps/keymap_default.c $(SRC)
SRC := keymaps/default.c $(SRC)
endif

CONFIG_H = config.h
Expand Down
4 changes: 2 additions & 2 deletions keyboard/atomic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Depending on which keymap you would like to use, you will have to compile slight
To build with the default keymap, simply run `make`.

### Other Keymaps
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.

To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
```
$ make KEYMAP=[default|jack|<name>]
```
Keymaps follow the format **__keymap\_\<name\>.c__** and are stored in the `keymaps` folder.
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions keyboard/atreus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ TARGET_DIR = .
SRC = atreus.c

ifdef KEYMAP
SRC := keymaps/keymap_$(KEYMAP).c $(SRC)
SRC := keymaps/$(KEYMAP).c $(SRC)
else
SRC := keymaps/keymap_default.c $(SRC)
SRC := keymaps/default.c $(SRC)
endif

ifdef TEENSY2
Expand Down
4 changes: 2 additions & 2 deletions keyboard/atreus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ Depending on which keymap you would like to use, you will have to compile slight
To build with the default keymap, simply run `make`.
### Other Keymaps
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
```
$ make KEYMAP=[default|jack|<name>]
```
Keymaps follow the format **__keymap\_\<name\>.c__** and are stored in the `keymaps` folder.
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions keyboard/ergodox_ez/keymaps/dvorak_intl_squisher/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ErgoDox EZ Dvorak International Squisher

Dvorak layout adjusted with several (linux) applications in mind:

* Easier Escape for VIM
* Windows/Super key for awesome WM
* Alt+Shift for international characters
* PrintScreen for sys-rq
* Insert for the X11 clip-board

Major layer changes:

* Common multimedia keys are integrated into layer 0, less common into layer 1
* No mouse keys
* Layer 2 is qwerty (for easier gaming & less fortunate keyboard users)

Known issues:

* Alt+Shift does not work reliably (depends on the X11 kb layout? Not
entirely clear...)

![layer0](keyboard-layout0.png)
![layer1](keyboard-layout1.png)
![layer2](keyboard-layout2.png)

## Changelog

* 2016-03-29
* Initial release
Loading

0 comments on commit 1facc53

Please sign in to comment.