Skip to content

Commit

Permalink
add config setup for Kyria rev3
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielks committed Apr 24, 2024
1 parent 588a175 commit 4834e81
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 57 deletions.
58 changes: 1 addition & 57 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,5 @@
on: [push, pull_request, workflow_dispatch]

name: Build

jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
name: Build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: cache-zephyr-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
zmk/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: West Init
run: west init -l config
- name: West Update
run: west update
- name: West Zephyr export
run: west zephyr-export
- name: West Build (tbk_mini Left)
run: west build -s zmk/app -b nice_nano -- -DSHIELD=tbk_mini_left -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: tbk_mini DTS File
if: ${{ always() }}
run: cat -n build/zephyr/nice_nano.dts.pre.tmp
- name: tbk_mini Left Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 tbk_mini_left_nice_nano.uf2
- name: Archive (tbk_mini Left)
uses: actions/upload-artifact@v2
with:
name: firmware
path: tbk_mini_left_nice_nano.uf2
- name: West Build (tbk_mini Right)
run: west build --pristine -s zmk/app -b nice_nano -- -DSHIELD=tbk_mini_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"

- name: tbk_mini Right Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 tbk_mini_right_nice_nano.uf2
- name: Archive (tbk_mini Right)
uses: actions/upload-artifact@v2
with:
name: firmware
path: tbk_mini_right_nice_nano.uf2
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
61 changes: 61 additions & 0 deletions .github/workflows/build.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on: [push, pull_request, workflow_dispatch]

name: Build

jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
name: Build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: cache-zephyr-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
zmk/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: West Init
run: west init -l config
- name: West Update
run: west update
- name: West Zephyr export
run: west zephyr-export
- name: West Build (tbk_mini Left)
run: west build -s zmk/app -b nice_nano -- -DSHIELD=tbk_mini_left -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: tbk_mini DTS File
if: ${{ always() }}
run: cat -n build/zephyr/nice_nano.dts.pre.tmp
- name: tbk_mini Left Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 tbk_mini_left_nice_nano.uf2
- name: Archive (tbk_mini Left)
uses: actions/upload-artifact@v2
with:
name: firmware
path: tbk_mini_left_nice_nano.uf2
- name: West Build (tbk_mini Right)
run: west build --pristine -s zmk/app -b nice_nano -- -DSHIELD=tbk_mini_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"

- name: tbk_mini Right Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 tbk_mini_right_nice_nano.uf2
- name: Archive (tbk_mini Right)
uses: actions/upload-artifact@v2
with:
name: firmware
path: tbk_mini_right_nice_nano.uf2
Empty file added boards/shields/.gitkeep
Empty file.
24 changes: 24 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file generates the GitHub Actions matrix.
# For simple board + shield combinations, add them to the top level board and
# shield arrays, for more control, add individual board + shield combinations
# to the `include` property. You can also use the `cmake-args` property to
# pass flags to the build command and `artifact-name` to assign a name to
# distinguish build outputs from each other:
#
# board: [ "nice_nano_v2" ]
# shield: [ "corne_left", "corne_right" ]
# include:
# - board: bdn9_rev2
# - board: nice_nano_v2
# shield: reviung41
# - board: nice_nano_v2
# shield: corne_left
# cmake-args: -DCONFIG_ZMK_USB_LOGGING=y
# artifact-name: corne_left_with_logging
#
---
include:
- board: nice_nano_v2
shield: kyria_rev3_left
- board: nice_nano_v2
shield: kyria_rev3_right
10 changes: 10 additions & 0 deletions config/kyria_rev3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Uncomment these two line to add support for encoders to your firmware
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

# Uncomment the following line to enable the Kyria OLED Display
# CONFIG_ZMK_DISPLAY=y

# Uncomment the following lines to enable RGB underglow
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
54 changes: 54 additions & 0 deletions config/kyria_rev3.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>

/* Uncomment this block if using RGB
&led_strip {
chain-length = <6>;
// chain-length = <31>; // Uncomment if using both per-key and underglow LEDs
// chain-length = <25>; // Uncomment if using only per-key LEDs.
};
*/

/ {
keymap {
compatible = "zmk,keymap";

default_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ |
// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | LAYER 1 | L SHIFT | N | M | , | . | / | CTRL |
// | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT |
bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &mo 1 &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL
&kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
function_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | |
// | | | |BTSEL3|BTSEL4| | | | | | | | |
// | | | | | | | | | | | | | | | | | | |
// | | | | | | | | | | | | |
bindings = <
&trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans
&trans &trans &trans &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
};
};
2 changes: 2 additions & 0 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
# Additional modules containing boards/shields/custom code can be listed here as well
# See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects
projects:
- name: zmk
remote: zmkfirmware
Expand Down
3 changes: 3 additions & 0 deletions zephyr/module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build:
settings:
board_root: .

0 comments on commit 4834e81

Please sign in to comment.