diff options
-rw-r--r-- | .github/workflows/build.yml | 5 | ||||
-rw-r--r-- | app/boards/shields/corne/Kconfig.defconfig | 58 | ||||
-rw-r--r-- | app/boards/shields/corne/Kconfig.shield | 8 | ||||
-rw-r--r-- | app/boards/shields/corne/boards/nice_nano.overlay | 29 | ||||
-rw-r--r-- | app/boards/shields/corne/corne.conf | 5 | ||||
-rw-r--r-- | app/boards/shields/corne/corne.dtsi | 79 | ||||
-rw-r--r-- | app/boards/shields/corne/corne.keymap | 22 | ||||
-rw-r--r-- | app/boards/shields/corne/corne_left.conf | 2 | ||||
-rw-r--r-- | app/boards/shields/corne/corne_left.overlay | 18 | ||||
-rw-r--r-- | app/boards/shields/corne/corne_right.conf | 2 | ||||
-rw-r--r-- | app/boards/shields/corne/corne_right.overlay | 23 | ||||
-rw-r--r-- | app/src/keymap.c | 29 | ||||
-rw-r--r-- | docs/docs/dev-boards-shields-keymaps.md | 6 | ||||
-rw-r--r-- | docs/docs/dev-guide-new-shield.md | 12 | ||||
-rw-r--r-- | docs/docs/dev-posix-board.md | 6 | ||||
-rw-r--r-- | docs/docs/dev-setup.md | 19 | ||||
-rw-r--r-- | docs/docs/hardware.md | 1 | ||||
-rw-r--r-- | docs/docs/user-setup.md | 2 | ||||
-rw-r--r-- | docs/static/setup.sh | 3 |
19 files changed, 306 insertions, 23 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4109161..5eb7971 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,10 +10,15 @@ jobs: matrix: board: [proton_c, nice_nano] shield: + - corne_left + - corne_right - kyria_left - kyria_right - lily58_left - lily58_right + include: + - board: proton_c + shield: clueboard_california steps: # To use this repository's private action, # you must check out the repository diff --git a/app/boards/shields/corne/Kconfig.defconfig b/app/boards/shields/corne/Kconfig.defconfig new file mode 100644 index 0000000..8878da3 --- /dev/null +++ b/app/boards/shields/corne/Kconfig.defconfig @@ -0,0 +1,58 @@ + +if SHIELD_CORNE_LEFT + +config ZMK_KEYBOARD_NAME + default "Corne Left" + +endif + + +if SHIELD_CORNE_RIGHT + +config ZMK_KEYBOARD_NAME + default "Corne Right" + +endif + +if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT + +config ZMK_SPLIT + default y + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +config SSD1306_REVERSE_MODE + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LVGL_HOR_RES + default 128 + +config LVGL_VER_RES + default 32 + +config LVGL_VDB_SIZE + default 64 + +config LVGL_DPI + default 148 + +config LVGL_BITS_PER_PIXEL + default 1 + +choice LVGL_COLOR_DEPTH + default LVGL_COLOR_DEPTH_1 +endchoice + +endif # LVGL + +endif diff --git a/app/boards/shields/corne/Kconfig.shield b/app/boards/shields/corne/Kconfig.shield new file mode 100644 index 0000000..3cac86f --- /dev/null +++ b/app/boards/shields/corne/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: MIT + +config SHIELD_CORNE_LEFT + def_bool $(shields_list_contains,corne_left) + +config SHIELD_CORNE_RIGHT + def_bool $(shields_list_contains,corne_right) diff --git a/app/boards/shields/corne/boards/nice_nano.overlay b/app/boards/shields/corne/boards/nice_nano.overlay new file mode 100644 index 0000000..c7c3eb8 --- /dev/null +++ b/app/boards/shields/corne/boards/nice_nano.overlay @@ -0,0 +1,29 @@ +&spi1 { + compatible = "nordic,nrf-spi"; + /* Cannot be used together with i2c0. */ + status = "okay"; + mosi-pin = <6>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <5>; + miso-pin = <7>; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "SK6812mini"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/corne/corne.conf b/app/boards/shields/corne/corne.conf new file mode 100644 index 0000000..c8e3c00 --- /dev/null +++ b/app/boards/shields/corne/corne.conf @@ -0,0 +1,5 @@ +# Uncomment the following line to enable the Corne RGB Underglow +# ZMK_RGB_UNDERGLOW=y + +# Uncomment the following line to enable the Corne OLED Display +# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/corne/corne.dtsi b/app/boards/shields/corne/corne.dtsi new file mode 100644 index 0000000..70d6495 --- /dev/null +++ b/app/boards/shields/corne/corne.dtsi @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include <dt-bindings/zmk/matrix-transform.h> + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; +// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | +// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | +// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,12) +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,12) +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,12) + RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | +// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | +// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + map = < +RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) +RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) +RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) + RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + }; + + // TODO: per-key RGB node(s)? +}; + +&pro_micro_i2c { + status = "okay"; + + ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <63>; + prechargep = <0x22>; + }; +}; diff --git a/app/boards/shields/corne/corne.keymap b/app/boards/shields/corne/corne.keymap new file mode 100644 index 0000000..2f7f38b --- /dev/null +++ b/app/boards/shields/corne/corne.keymap @@ -0,0 +1,22 @@ +#include <behaviors.dtsi> +#include <dt-bindings/zmk/keys.h> + +/ { + 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 | | N | M | , | . | / | CTRL | +// | GUI | DEL | RET | | 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 SCLN &kp QUOT + &kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RCTL + &kp LGUI &kp DEL &kp RET &kp TAB &kp BKSP &kp RALT + >; + }; + }; +}; diff --git a/app/boards/shields/corne/corne_left.conf b/app/boards/shields/corne/corne_left.conf new file mode 100644 index 0000000..e51dee4 --- /dev/null +++ b/app/boards/shields/corne/corne_left.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
\ No newline at end of file diff --git a/app/boards/shields/corne/corne_left.overlay b/app/boards/shields/corne/corne_left.overlay new file mode 100644 index 0000000..399bddd --- /dev/null +++ b/app/boards/shields/corne/corne_left.overlay @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "corne.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + ; +}; diff --git a/app/boards/shields/corne/corne_right.conf b/app/boards/shields/corne/corne_right.conf new file mode 100644 index 0000000..a835adc --- /dev/null +++ b/app/boards/shields/corne/corne_right.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
\ No newline at end of file diff --git a/app/boards/shields/corne/corne_right.overlay b/app/boards/shields/corne/corne_right.overlay new file mode 100644 index 0000000..652d5ed --- /dev/null +++ b/app/boards/shields/corne/corne_right.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "corne.dtsi" + +&default_transform { + col-offset = <6>; +}; + +&kscan0 { + col-gpios + = <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + ; +}; + diff --git a/app/src/keymap.c b/app/src/keymap.c index aee0577..ff494f7 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -34,9 +34,6 @@ static u8_t zmk_keymap_layer_default = 0; #define TRANSFORMED_LAYER(node) \ { UTIL_LISTIFY(DT_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, node) }, -static struct zmk_behavior_binding zmk_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_LEN] = { - DT_INST_FOREACH_CHILD(0, TRANSFORMED_LAYER) -}; #if ZMK_KEYMAP_HAS_SENSORS #define _TRANSFORM_SENSOR_ENTRY(idx, layer) \ @@ -50,6 +47,21 @@ static struct zmk_behavior_binding zmk_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_ ({ UTIL_LISTIFY(DT_PROP_LEN(node, sensor_bindings), _TRANSFORM_SENSOR_ENTRY, node) }), \ ({})), +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + +// State + +// When a behavior handles a key position "down" event, we record that layer +// here so that even if that layer is deactivated before the "up", event, we +// still send the release event to the behavior in that layer also. +static u8_t zmk_keymap_active_behavior_layer[ZMK_KEYMAP_LEN]; + +static struct zmk_behavior_binding zmk_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_LEN] = { + DT_INST_FOREACH_CHILD(0, TRANSFORMED_LAYER) +}; + +#if ZMK_KEYMAP_HAS_SENSORS + static struct zmk_behavior_binding zmk_sensor_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_SENSORS_LEN] = { DT_INST_FOREACH_CHILD(0, SENSOR_LAYER) }; @@ -74,11 +86,18 @@ int zmk_keymap_layer_deactivate(u8_t layer) SET_LAYER_STATE(layer, false); }; +bool is_active_position(u32_t position, u8_t layer) +{ + return (zmk_keymap_layer_state & BIT(layer)) == BIT(layer) + || layer == zmk_keymap_layer_default + || zmk_keymap_active_behavior_layer[position] == layer; +} + int zmk_keymap_position_state_changed(u32_t position, bool pressed) { for (int layer = ZMK_KEYMAP_LAYERS_LEN - 1; layer >= zmk_keymap_layer_default; layer--) { - if ((zmk_keymap_layer_state & BIT(layer)) == BIT(layer) || layer == zmk_keymap_layer_default) + if (is_active_position(position, layer)) { struct zmk_behavior_binding *binding = &zmk_keymap[layer][position]; struct device *behavior; @@ -104,8 +123,10 @@ int zmk_keymap_position_state_changed(u32_t position, bool pressed) continue; } else if (ret < 0) { LOG_DBG("Behavior returned error: %d", ret); + zmk_keymap_active_behavior_layer[position] = 0; return ret; } else { + zmk_keymap_active_behavior_layer[position] = pressed ? layer : 0; return ret; } } diff --git a/docs/docs/dev-boards-shields-keymaps.md b/docs/docs/dev-boards-shields-keymaps.md index bda7d9f..cfe5252 100644 --- a/docs/docs/dev-boards-shields-keymaps.md +++ b/docs/docs/dev-boards-shields-keymaps.md @@ -8,11 +8,11 @@ title: Boards, Shields, and Keymaps The foundational elements needed to get a specific keyboard working with ZMK can be broken down into: - A [KSCAN driver](https://docs.zephyrproject.org/2.3.0/reference/peripherals/kscan.html), which uses `compatible="zmk,kscan-gpio-matrix"` for GPIO matrix based keyboards, or uses `compatible="zmk,kscan-gpio-direct"` for small direct wires. -- An optional matrix transform, which defines how the KSCAN row/column events are translated into logical "key positions". This is required for non-rectangular keyboards/matrixes, where the key positions don't naturally follow the row/columns from the GPIO matrix. +- An optional matrix transform, which defines how the KSCAN row/column events are translated into logical "key positions". This is required for non-rectangular keyboards/matrices, where the key positions don't naturally follow the row/columns from the GPIO matrix. - A keymap, which binds each key position to a behavior, e.g. key press, mod-tap, momentary layer, in a set of layers. -These three core architectural elements are defined per-keyboard, and _where_ they are defined depeneds on the specifics of how that -keyboard works. For an overview on the general concepts of boards and shields, please see the [FAQs on boards and sheilds](/docs/faq#why-boards-and-shields--why-not-just-keyboard). +These three core architectural elements are defined per-keyboard, and _where_ they are defined depends on the specifics of how that +keyboard works. For an overview on the general concepts of boards and shields, please see the [FAQs on boards and shields](/docs/faq#why-boards-and-shields--why-not-just-keyboard). ## Self-Contained Keyboard diff --git a/docs/docs/dev-guide-new-shield.md b/docs/docs/dev-guide-new-shield.md index d562033..1119806 100644 --- a/docs/docs/dev-guide-new-shield.md +++ b/docs/docs/dev-guide-new-shield.md @@ -11,14 +11,14 @@ The high level steps are: - Create a new shield directory. - Add the base Kconfig files. - Add the shield overlay file to define the [KSCAN driver]() for detecting key press/release. -- (Optional) Add the mateix transform for mapping KSCAN row/coluk values to sane key positions. This is needed for non-rectangular keyboards, or where the underlying row/column pin arrangement does not map one to one with logical locations on the keyboard. +- (Optional) Add the matrix transform for mapping KSCAN row/column values to sane key positions. This is needed for non-rectangular keyboards, or where the underlying row/column pin arrangement does not map one to one with logical locations on the keyboard. - Add a default keymap, which users can override in their own configs as needed. It may be helpful to review the upstream [shields documentation](https://docs.zephyrproject.org/2.3.0/guides/porting/shields.html#shields) to get a proper understanding of the underlying system before continuing. ## New Shield Directory -Shields for Zephyr applications go into the `boards/shields/` directory; since ZMK's Zephyr appliction linves in the `app/` subdirectory of the repository, that means the new shield directory should be: +Shields for Zephyr applications go into the `boards/shields/` directory; since ZMK's Zephyr application lives in the `app/` subdirectory of the repository, that means the new shield directory should be: ```bash mkdir app/boards/shields/<keyboard_name> @@ -60,7 +60,7 @@ endif ## Shield Overlay -The `<shield_name>.overlay` is the devicetree description of the keyboard shield that is merged with the primary board devicetree description before the build. For ZMK, this file at a minumum should include the [chosen]() node named `zmk,kscan` that refernces a KSCAN driver instance. For a simple 3x3 macropad matrix, +The `<shield_name>.overlay` is the devicetree description of the keyboard shield that is merged with the primary board devicetree description before the build. For ZMK, this file at a minimum should include the [chosen]() node named `zmk,kscan` that references a KSCAN driver instance. For a simple 3x3 macropad matrix, this might look something like: ``` @@ -97,7 +97,7 @@ Internally ZMK translates all row/column events into "key position" events to ma 1. For non rectangular keyboards with thumb clusters, non `1u` locations, etc. A "key position" is the numeric index (zero-based) of a given key, which identifies -the logical key location as percieved by the end user. All _keymap_ mappings actually bind behaviors to _key positions_, not to row/column values. +the logical key location as perceived by the end user. All _keymap_ mappings actually bind behaviors to _key positions_, not to row/column values. _Without_ a matrix transform, that intentionally map each key position to the row/column pair that position corresponds to, the default equation to determine that is: @@ -141,13 +141,13 @@ RC(7,0) RC(7,1) RC(7,2) RC(7,3) RC(7 Some important things to note: -- The `#include <dt-bindings/zmk/matrix-transform.h>` is critical. The `RC` macro is used to generate the interanl storage in the matrix transform, and is actually replaced by a C preprocessor before the final devicetree is compiled into ZMK. +- The `#include <dt-bindings/zmk/matrix-transform.h>` is critical. The `RC` macro is used to generate the internal storage in the matrix transform, and is actually replaced by a C preprocessor before the final devicetree is compiled into ZMK. - `RC(row, column)` is placed sequentially to define what row and column values that position corresponds to. - If you have a keyboard with options for `2u` keys in certain positions, or break away portions, it is a good idea to set the chosen `zmk,matrix_transform` to the default arrangement, and include _other_ possible matrix transform nodes in the devicetree that users can select in their user config by overriding the chosen node. ## Default Keymap -Each keyboard should provide an OOTB default keymap to be used when building the firmware, which can be overriden and customized by user configs. For "shield keyboards", this should be placed in the `app/boards/shields/<shield_name>/keymap/keymap.overlay` file. The keymap is configured as an additional devicetree overlay that includes the following: +Each keyboard should provide an OOTB default keymap to be used when building the firmware, which can be overridden and customized by user configs. For "shield keyboards", this should be placed in the `app/boards/shields/<shield_name>/keymap/keymap.overlay` file. The keymap is configured as an additional devicetree overlay that includes the following: - A node with `compatible="zmk,layers"` where each child node is a layer with a `bindings` array that binds each key position to a given behavior (e.g. key press, momentarily layer, etc). - A node with `compatible="zmk,keymap"` that references the layers with a `layers` phandle-array property. diff --git a/docs/docs/dev-posix-board.md b/docs/docs/dev-posix-board.md index dc33ea0..e146bf1 100644 --- a/docs/docs/dev-posix-board.md +++ b/docs/docs/dev-posix-board.md @@ -10,7 +10,7 @@ flowing into the handler functions. ## Prerequisites -In order to build targetting the `native_posix` board, you need to setup your system +In order to build targeting the `native_posix` board, you need to setup your system with a compiler that can target 32-bit POSIX. On Debian, you can do this with: @@ -21,7 +21,7 @@ apt install -y gcc-multilib ## Building -To do this, you can build ZMK targetting the +To do this, you can build ZMK targeting the `native_posix` board. ``` @@ -36,4 +36,4 @@ Once built, you can run the firmware locally: ## Virtual Key Events -The virtual key presses are hardcoded in `boards/native_posix.overlay` file. should you want to change the sequence to test various actions like Mod-Tap, etc. +The virtual key presses are hardcoded in `boards/native_posix.overlay` file, should you want to change the sequence to test various actions like Mod-Tap, etc. diff --git a/docs/docs/dev-setup.md b/docs/docs/dev-setup.md index 016b14c..5cceb73 100644 --- a/docs/docs/dev-setup.md +++ b/docs/docs/dev-setup.md @@ -34,7 +34,7 @@ A unix-like environment with the following base packages installed: <OsTabs> <TabItem value="debian"> -On Debian and Ubuntu, we'll use apt to install our base dependencies: +On Debian and Ubuntu, we'll use `apt` to install our base dependencies: First, if you haven't updated recently, or if this is a new install, you should update to get the latest package information: @@ -200,7 +200,7 @@ source ~/.bashrc ### Toolchain Installation -The toolchain provides the compiler, linker, etc necessary to build for the target +The toolchain provides the compiler, linker, etc., necessary to build for the target platform. <OsTabs> @@ -217,7 +217,7 @@ wget -q "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZSDK_ rm "zephyr-toolchain-arm-${ZSDK_VERSION}-setup.run" ``` -The installation will prompt with several questions about installation location, and creating a default `~/.zephyrrc` for you with various variables. The defaults shouldn normally work as expected. +The installation will prompt with several questions about installation location, and creating a default `~/.zephyrrc` for you with various variables. The defaults should normally work as expected. </TabItem> <TabItem value="raspberryos"> @@ -252,7 +252,7 @@ wget -q "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZSDK_ rm "zephyr-toolchain-arm-\${ZSDK_VERSION}-setup.run" ``` -The installation will prompt with several questions about installation location, and creating a default `~/.zephyrrc` for you with various variables. The defaults shouldn normally work as expected. +The installation will prompt with several questions about installation location, and creating a default `~/.zephyrrc` for you with various variables. The defaults should normally work as expected. </TabItem> <TabItem value="win"> @@ -275,11 +275,20 @@ wget -q "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZSDK_ rm "zephyr-toolchain-arm-\${ZSDK_VERSION}-setup.run" ``` -The installation will prompt with several questions about installation location, and creating a default `~/.zephyrrc` for you with various variables. The defaults shouldn normally work as expected. +The installation will prompt with several questions about installation location, and creating a default `~/.zephyrrc` for you with various variables. The defaults should normally work as expected. </TabItem> </OsTabs> +:::note +If you intend to build firmware straight away, make sure to correctly setup the current shell. + +Notes on setting this up can be found in the [Environment Variables](#environment-variables) section. +The transient instructions can be used to setup the current shell, and the automatic instructions can setup any newly made shells automatically. + +The transient instructions must be run to build firmware using the current shell. +::: + ### Source Code Next, you'll need to clone the ZMK source repository if you haven't already: diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md index 015b21d..951cee0 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -22,6 +22,7 @@ That being said, there are currently only a few specific [boards](/docs/faq#what ## Keyboard Shields - [Kyria](https://splitkb.com/products/kyria-pcb-kit) (`kyria_left` and `kyria_right`) +- [Corne](https://github.com/foostan/crkbd) (`corne_left` and `corne_right`) - [Lily58](https://github.com/kata0510/Lily58) (`lily58_left` and `lily58_right`) ## Other Hardware diff --git a/docs/docs/user-setup.md b/docs/docs/user-setup.md index b79b573..be230d2 100644 --- a/docs/docs/user-setup.md +++ b/docs/docs/user-setup.md @@ -36,7 +36,7 @@ Following the steps in this guide, you will: ## Prerequisites -The remainder of this guide assumes the following prequisites: +The remainder of this guide assumes the following prerequisites: 1. You have an active, working [GitHub](https://github.com/) account. 1. You have installed and configured the [`git`](https://git-scm.com/) version control tool. diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 327fc84..4208943 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -37,7 +37,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58") +options=("Kyria" "Lily58" "Corne") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. @@ -48,6 +48,7 @@ select opt in "${options[@]}" "Quit"; do 1 ) shield_title="Kyria" shield="kyria"; split="y"; break;; 2 ) shield_title="Lily58" shield="lily58"; split="y"; break;; + 3 ) shield_title="Corne" shield="corne"; split="y"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;; |