Skip to content

Commit

Permalink
BREAKING CHANGE: update firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
simoneruffini committed Jan 9, 2024
1 parent fa5a64c commit b308275
Show file tree
Hide file tree
Showing 10 changed files with 159 additions and 86 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.5
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 (Lily58 Left)
run: west build -s zmk/app -b nice_nano -- -DSHIELD=lily58_left -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Lily58 DTS File
if: ${{ always() }}
run: cat -n build/zephyr/nice_nano.dts.pre.tmp
- name: Lily58 Left Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 lily58_left_nice_nano.uf2
- name: Archive (Lily58 Left)
uses: actions/upload-artifact@v2
with:
name: firmware
path: lily58_left_nice_nano.uf2
- name: West Build (Lily58 Right)
run: west build --pristine -s zmk/app -b nice_nano -- -DSHIELD=lily58_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"

- name: Lily58 Right Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 lily58_right_nice_nano.uf2
- name: Archive (Lily58 Right)
uses: actions/upload-artifact@v2
with:
name: firmware
path: lily58_right_nice_nano.uf2
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
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
shield: lily58_left
- board: nice_nano
shield: lily58_right
59 changes: 30 additions & 29 deletions config/lily58.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
#include <dt-bindings/zmk/ext_power.h>

/ {
// Combo keys are a way to combine multiple keypresses to output a different key.
combos {
compatible = "zmk,combos";

Clear_bluetooth {
bindings = <&bt BT_CLR>;
key-positions = <52 51 0>;
combo_clear_bluetooth {
timeout-ms = <50>; // Press all the below keys within 50ms to activate mapping
key-positions = <52 42 0>; // Press 52=LOWER, 42=[, 0=tilde
bindings = <&bt BT_CLR>; // activate clear bluetooth bindings for current channel
};
};

Expand All @@ -31,49 +33,48 @@
// | ALT | GUI | LOWER| SPACE | | BSPC | ENTER| RAISE | CTRL |

bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp EQUAL
&mt LCTRL ESC &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 LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LALT &kp LMETA &mo 2 &kp SPACE &kp BSPC &kp RET &mo 1 &kp RCTRL
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp EQUAL
&mt LCTRL ESC &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 LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LALT &kp LMETA &mo 2 &kp SPACE &kp BSPC &kp RET &mo 1 &kp RCTRL
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

raise_layer {
// ------------------------------------------------------------------------------------------------------------
// | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
// |hCTRL tESC | | | | | | | <- | ^ | v | -> | | |
// | SHIFT | | | | | | | | | + | - | = | [ | ] | \ |
// | | | | | | | | | |
// | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
// |CTRL/ESC | | | | | | | <- | ^ | v | -> | | |
// | SHIFT | | | | | | | | | + | - | = | [ | ] | \ |
// | | | | | | | | | |

bindings = <
&kp F12 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&mt LCTRL ESC &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHIFT &trans &trans &trans &trans &trans &trans &trans &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp RIGHT_SHIFT
&trans &trans &trans &trans &trans &trans &trans &trans
&kp F12 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&mt LCTRL ESC &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHIFT &trans &trans &trans &trans &trans &trans &trans &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp RIGHT_SHIFT
&trans &trans &trans &trans &trans &trans &trans &trans
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

lower_layer {
// ------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | | | | | | | | | | | | | \ |
// | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | _ |
// | SHIFT | EP_ON | EP_OFF | | ( | { | extpwr TOG | | DEL | } | ) | + | { | } | SHIFT |
// | | | | | | | | | |

// | EXT PWR TOGGLE | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | | | | | | | | | | | | | \ |
// | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | _ |
// | SHIFT | EP_ON | EP_OFF | | ( | { | | | DEL | } | ) | + | { | } | SHIFT |
// | | | | | | | | | |
bindings = <
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp BSLH
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp UNDER
&kp LSHIFT &ext_power EP_ON &ext_power EP_OFF &trans &kp LPAR &kp LBRC &trans &kp DEL &kp RBRC &kp RPAR &kp KP_PLUS &kp LBRC &kp RBRC &kp RSHFT
&trans &trans &trans &trans &trans &trans &trans &trans
&ext_power EP_TOG &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp BSLH
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp UNDER
&kp LSHIFT &trans &trans &kp LPAR &kp LBRC &trans &trans &kp DEL &kp RBRC &kp RPAR &kp KP_PLUS &kp LBRC &kp RBRC &kp RSHFT
&trans &trans &trans &trans &trans &trans &trans &trans
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
Expand Down
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
6 changes: 6 additions & 0 deletions config2/lily58.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Uncomment to enable encoder
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

# Uncomment the following line to enable the Lily58 OLED Display
# CONFIG_ZMK_DISPLAY=y
File renamed without changes.
82 changes: 82 additions & 0 deletions config2/lily58.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

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

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

Clear_bluetooth {
bindings = <&bt BT_CLR>;
key-positions = <52 51 0>;
};
};

keymap {
compatible = "zmk,keymap";

default_layer {
// ------------------------------------------------------------------------------------------------------------
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | = |
// |hCTRL tESC| A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHIFT | Z | X | C | V | B | "[" | | "]" | N | M | , | . | / | SHIFT |
// | ALT | GUI | LOWER| SPACE | | BSPC | ENTER| RAISE | CTRL |

bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp EQUAL
&mt LCTRL ESC &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 LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LALT &kp LMETA &mo 2 &kp SPACE &kp BSPC &kp RET &mo 1 &kp RCTRL
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

raise_layer {
// ------------------------------------------------------------------------------------------------------------
// | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
// |hCTRL tESC | | | | | | | <- | ^ | v | -> | | |
// | SHIFT | | | | | | | | | + | - | = | [ | ] | \ |
// | | | | | | | | | |

bindings = <
&kp F12 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&mt LCTRL ESC &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHIFT &trans &trans &trans &trans &trans &trans &trans &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp RIGHT_SHIFT
&trans &trans &trans &trans &trans &trans &trans &trans
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

lower_layer {
// ------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | | | | | | | | | | | | | \ |
// | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | _ |
// | SHIFT | EP_ON | EP_OFF | | ( | { | extpwr TOG | | DEL | } | ) | + | { | } | SHIFT |
// | | | | | | | | | |

bindings = <
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp BSLH
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp UNDER
&kp LSHIFT &ext_power EP_ON &ext_power EP_OFF &trans &kp LPAR &kp LBRC &trans &kp DEL &kp RBRC &kp RPAR &kp KP_PLUS &kp LBRC &kp RBRC &kp RSHFT
&trans &trans &trans &trans &trans &trans &trans &trans
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
};
};
11 changes: 11 additions & 0 deletions config2/west.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
self:
path: config
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 b308275

Please sign in to comment.