Skip to content

Commit 99506a8

Browse files
committed
Emphasize how to pin/change release
1 parent a0f1b1a commit 99506a8

File tree

7 files changed

+101
-26
lines changed

7 files changed

+101
-26
lines changed

Justfile

+33
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,36 @@ update:
104104
# upgrade zephyr-sdk and python dependencies
105105
upgrade-sdk:
106106
nix flake update --flake .
107+
108+
[no-cd]
109+
test $testpath:
110+
#!/usr/bin/env bash
111+
set -euo pipefail
112+
testcase=$(basename "$testpath")
113+
build_dir="{{ build / "tests" / '$testcase' }}"
114+
config_dir="{{ '$(pwd)' / '$testpath' }}"
115+
cd {{ justfile_directory() }}
116+
117+
echo "Running $testcase..."
118+
rm -rf "$build_dir"
119+
west build -s zmk/app -d "$build_dir" -b native_posix_64 -- -DCONFIG_ASSERT=y -DZMK_CONFIG="$config_dir"
120+
121+
${build_dir}/zephyr/zmk.exe | sed -e "s/.*> //" |
122+
tee ${build_dir}/keycode_events.full.log |
123+
sed -n -f ${config_dir}/events.patterns > ${build_dir}/keycode_events.log
124+
diff -auZ ${config_dir}/keycode_events.snapshot ${build_dir}/keycode_events.log
125+
126+
[no-cd]
127+
parse-test $testpath:
128+
#!/usr/bin/env bash
129+
set -euo pipefail
130+
testcase=$(basename "$testpath")
131+
build_dir="{{ build / "tests" / '$testcase' }}"
132+
config_dir="{{ '$(pwd)' / '$testpath' }}"
133+
cd {{ justfile_directory() }}
134+
135+
${build_dir}/zephyr/zmk.exe | sed -e "s/.*> //" |
136+
tee ${build_dir}/keycode_events.full.log |
137+
sed -n -f ${config_dir}/events.patterns > ${build_dir}/keycode_events.log
138+
cat ${build_dir}/keycode_events.log
139+
diff -auZ ${config_dir}/keycode_events.snapshot ${build_dir}/keycode_events.log

build.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
include:
1616
- board: planck_rev6
1717
- board: corneish_zen_v2_left
18+
# snippet: zmk-usb-logging
1819
- board: corneish_zen_v2_right
1920
- board: glove80_lh
2021
- board: glove80_rh

config/base.keymap

+18-1
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,26 @@ MASK_MODS(masked_end, (MOD_LCTL), &kp END)
108108

109109
/* Caps-word, num-word and smart-mouse */
110110

111+
/ {
112+
behaviors {
113+
magic: adaptive_key {
114+
compatible = "zmk,behavior-adaptive-key";
115+
#binding-cells = <0>;
116+
bindings = <&sk LSHFT>;
117+
118+
repeat {
119+
trigger-keys = <A B C D E F G H I J K L M N O P Q R S T U V W X Y Z>;
120+
bindings = <&key_repeat>;
121+
max-prior-idle-ms = <1200>;
122+
strict-modifiers;
123+
};
124+
};
125+
};
126+
};
127+
111128
// tap: sticky-shift | shift + tap/ double-tap: caps-word | hold: shift
112129
ZMK_MOD_MORPH(smart_shft,
113-
bindings = <&sk LSHFT>, <&caps_word>;
130+
bindings = <&magic>, <&caps_word>;
114131
mods = <(MOD_LSFT)>;
115132
)
116133
&caps_word { // mods deactivate caps-word, requires PR #1451

config/corneish_zen.keymap

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
/* map Zen's extra keys */
55
#define X_LH &kp LGUI // thumb row, left
6-
#define X_RH &smart_mouse // thumb row, right
6+
#define X_RH &leader // thumb row, right
77

88
/* activate bluetooth */
99
#define CONFIG_WIRELESS

config/west.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
manifest:
2020
defaults:
2121
remote: urob
22-
revision: v0.1
22+
revision: v0.1 # Pin everything to v0.1
2323

2424
remotes:
2525
- name: urob

flake.lock

+38-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
inputs = {
3-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
44

55
# Version of requirements.txt installed in pythonEnv
6-
zephyr.url = "github:zephyrproject-rtos/zephyr/v3.5.0";
6+
zephyr.url = "github:zmkfirmware/zephyr/v3.5.0+zmk-fixes";
77
zephyr.flake = false;
88

99
# Zephyr sdk and toolchain
10-
zephyr-nix.url = "github:urob/zephyr-nix";
10+
zephyr-nix.url = "github:adisbladis/zephyr-nix";
1111
zephyr-nix.inputs.zephyr.follows = "zephyr";
1212
zephyr-nix.inputs.nixpkgs.follows = "nixpkgs";
1313
};
@@ -22,17 +22,19 @@
2222
keymap_drawer = pkgs.python3Packages.callPackage ./draw { };
2323

2424
in {
25-
default = pkgs.mkShell {
25+
default = pkgs.mkShellNoCC {
2626
packages = [
2727
keymap_drawer
2828

2929
zephyr.pythonEnv
30-
(zephyr.sdk.override { targets = [ "arm-zephyr-eabi" ]; })
30+
(zephyr.sdk-0_16.override { targets = [ "arm-zephyr-eabi" ]; })
3131

32-
pkgs.cmake
32+
pkgs.cmake # part of the toolchain? not detected by which
3333
pkgs.dtc
3434
pkgs.ninja
35-
pkgs.qemu # needed for native_posix target
35+
# pkgs.ccache
36+
# pkgs.dfu-util
37+
# pkgs.qemu # needed for native_posix target
3638

3739
# Uncomment these if you don't have system-wide versions:
3840
# pkgs.gawk # awk

0 commit comments

Comments
 (0)