Skip to content

Commit

Permalink
Merge branch 'KinesisCorporation:V3.0' into V3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongjis authored Feb 18, 2024
2 parents cb6484a + b4165d6 commit fd9aff7
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Build
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get version data
id: get_info
run: |
Expand All @@ -21,7 +21,7 @@ jobs:
echo "file_prefix=$file_prefix" >> $GITHUB_OUTPUT
bin/get_version.sh $branch_name $commit
- name: Cache west modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-zephyr-modules
with:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Rename zmk.uf2
run: cp build/left/zephyr/zmk.uf2 ${{ steps.get_info.outputs.file_prefix }}-left.uf2 && cp build/right/zephyr/zmk.uf2 ${{ steps.get_info.outputs.file_prefix }}-right.uf2
- name: Archive (Adv360)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: firmware
path: |
Expand Down
35 changes: 29 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Here's all notable changes and commits to both the configuration repo and the ba
Many thanks to all those who have submitted issues and pull requests to make this firmware better!
## Config repo

12/2/2024 - Update GitHub build workflow to use the latest actions [#376](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/376)

2/2/2024 - Makefile enhancements (build left side firmware only, separate clean targets for firmware and docker, reset of version.dtsi after build) [#363](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/363)

1/16/2024 - Change the makefile to fis WSL2 compatibility [#335](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/335)

1/14/2024 - Update base ZMK, change KConfig attributes to support, Enable experimental BLE features for improved stability [#326](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/326)

12/27/2023 - Change how the characters are used in the versioning script for improved MacOS experience [#303](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/303)

12/15/2022 - Update keymap.json to reflect new versioning macro [#300](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/300)
Expand All @@ -16,11 +24,11 @@ Many thanks to all those who have submitted issues and pull requests to make thi

11/16/2023 - Update changelog with base ZMK update [#268](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/268)

11/15/2023 - Add and document the new automatic versioning system [#267](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/267)
11/15/2023 - Add and document the new automatic versioning system [#267](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/267)

11/7/2023 - Add and document a new configuration option for extended NKRO ranges [#264](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/264)
11/7/2023 - Add and document a new configuration option for extended NKRO ranges [#264](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/264)

11/2/2023 - Update the documentation to note the new configuration options, other miscellaneous improvements based on feedback [#260](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/260)
11/2/2023 - Update the documentation to note the new configuration options, other miscellaneous improvements based on feedback [#260](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/260)

10/30/2023 - Update the [settings_reset.uf2](/settings-reset.uf2) file to improve reset behaviour with the new update

Expand Down Expand Up @@ -88,15 +96,30 @@ Many thanks to all those who have submitted issues and pull requests to make thi

## Base ZMK

There have beeen 4 branches of ZMK used for the 360 Pro so far. Beta branches are not changelogged as they are subject to frequent changes and tweaks.
There have beeen 5 branches of ZMK used for the 360 Pro so far. Beta branches are not changelogged as they are subject to frequent changes and tweaks.

| Branch | Date From | Date To | Config Branch |
| -------- | ------- |-------|-----|
| [adv360-beta](https://github.com/ReFil/zmk/tree/adv360-beta) | 3/1/2022 | 9/17/2022 | V1.0 (since deleted) |
| [adv360-z3](https://github.com/ReFil/zmk/tree/adv360-z3) | 9/17/2022 | 7/6/2023 | V2.0 (since deleted) |
| [adv360-z3.2](https://github.com/ReFil/zmk/tree/adv360-z3.2) | 7/6/2023 | 20/10/2023 | [V3.0](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/tree/V3.0) (Up to commit 82494e7) |
| [adv360-z3.2-2](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) | 20/10/2023 | To date | [V3.0](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/tree/V3.0) (current) |
| [adv360-z3.2-2](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) | 20/10/2023 | 1/14/2024 | [V3.0](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/tree/V3.0) (Up to commit XXXXXXX) |
| [adv360-z3.2-3](https://github.com/ReFil/zmk/tree/adv360-z3.2-3) | 1/14/2024 | To date | [V3.0](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/tree/V3.0) (current) |


### adv360-z3.2-3

1/8/2023 - Merge latest upstream ZMK (Commit 7652fbeb)

12/17/2023 - Add KConfig line to ensure compatibility with previous NKRO extended report is maintained

12/17/2023 - Fix conflicts with upstream HID indicators code for split communication

12/17/2023 - Add defines for HID indicator LEDs to maintain compatibility with lighting code

12/17/2023 - Merge latest upstream ZMK (Commit 78fa1e77)

Note: Several features that used to be custom to this branch (BT battery reporting disable, Extended NKRO, HID Indicators) are now upstream

### adv360-z3.2-2

Expand All @@ -108,7 +131,7 @@ There have beeen 4 branches of ZMK used for the 360 Pro so far. Beta branches ar

11/1/2023 - Change order of RGB initialisation to prevent situations where lighting could get stuck in battery reporting mode

10/27/2023 - Change HID max NKRO usage to allow usage of F13-F24 and other rarely used keycodes with NKRO enabled
10/27/2023 - Change HID max NKRO usage to allow usage of F13-F24 and other rarely used keycodes with NKRO enabled

10/18/2023 - Disable saving certain RGB elements to flash memory to help with flash wear

Expand Down
30 changes: 24 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DOCKER := $(shell { command -v podman || command -v docker; })
TIMESTAMP := $(shell date -u +"%Y%m%d%H%M")
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
detected_OS := $(shell uname) # Classify UNIX OS
DOCKER := "$(shell { command -v podman || command -v docker; })"
TIMESTAMP := "$(shell date -u +"%Y%m%d%H%M")"
COMMIT := "$(shell git rev-parse --short HEAD 2>/dev/null)"
detected_OS := "$(shell uname)" # Classify UNIX OS
ifeq ($(strip $(detected_OS)),Darwin) #We only care if it's OS X
SELINUX1 :=
SELINUX2 :=
Expand All @@ -10,7 +10,7 @@ SELINUX1 := :z
SELINUX2 := ,z
endif

.PHONY: all clean
.PHONY: all left clean_firmware clean_image clean

all:
$(shell bin/get_version.sh >> /dev/null)
Expand All @@ -20,8 +20,26 @@ all:
-v $(PWD)/config:/app/config:ro$(SELINUX2) \
-e TIMESTAMP=$(TIMESTAMP) \
-e COMMIT=$(COMMIT) \
-e BUILD_RIGHT=true \
zmk
$(shell git checkout config/version.dtsi)

clean:
left:
$(shell bin/get_version.sh >> /dev/null)
$(DOCKER) build --tag zmk --file Dockerfile .
$(DOCKER) run --rm -it --name zmk \
-v $(PWD)/firmware:/app/firmware$(SELINUX1) \
-v $(PWD)/config:/app/config:ro$(SELINUX2) \
-e TIMESTAMP=$(TIMESTAMP) \
-e COMMIT=$(COMMIT) \
-e BUILD_RIGHT=false \
zmk
$(shell git checkout config/version.dtsi)

clean_firmware:
rm -f firmware/*.uf2

clean_image:
$(DOCKER) image rm zmk docker.io/zmkfirmware/zmk-build-arm:stable

clean: clean_firmware clean_image
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,33 @@ Certain ZMK features (e.g. combos) require knowing the exact key positions in th
* Install make using `sudo apt-get install make` inside the WSL2 instance.
* The repository can be cloned directly into the WSL2 instance or accessed through the C: mount point WSL provides by default (`/mnt/c/path-to-repo`).

### Build firmware
#### macOS specific

On macOS [brew](https://brew.sh) can be used to install the required components.

* docker
* [colima](https://github.com/abiosoft/colima) can be used as the docker engine

```shell
brew install docker colima
colima start
```
> Note: On Apple Silicon (ARM based) systems you need to make sure to start colima with the correct architecture for the container being used.
> ```
> colima start --arch x86_64
> ```
1. Execute `make`.
2. Check the `firmware` directory for the latest firmware build.

### Build firmware locally

1. Execute `make` to build firmware for both halves or `make left` to only build firmware for the left hand side.
2. Check the `firmware` directory for the latest firmware build. The first part of the filename is the timestamp when the firmware was built.

### Cleanup

The built docker container and compiled firmware files can be deleted with `make clean`. This might be necessary if you updated your fork from V2.0 to V3.0 and are encountering build failures.
The built docker container and compiled firmware files can be deleted with `make clean`. This might be necessary if you updated your fork from V2.0 to V3.0 and are encountering build failures.

Creating the docker container takes some time. Therefore `make clean_firmware` can be used to only clean firmware without removing the docker container. Similarly `make clean_image` can be used to remove the docker container without removing compiled firmware files.

## Flashing firmware

Expand Down Expand Up @@ -116,4 +135,4 @@ Further support resources can be found on Kinesis.com:
* https://kinesis-ergo.com/support/kb360pro/#manuals

In the event of a hardware issue it may be necessary to open a support ticket directly with Kinesis as opposed to a GitHub issue in this repository.
* https://kinesis-ergo.com/support/kb360pro/#ticket
* https://kinesis-ergo.com/support/kb360pro/#ticket
16 changes: 11 additions & 5 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ COMMIT="${COMMIT:-$(echo xxxxxx)}"
west build -s zmk/app -d build/left -b adv360_left -- -DZMK_CONFIG="${PWD}/config"
# Adv360 Left Kconfig file
grep -vE '(^#|^$)' build/left/zephyr/.config
# West Build (right)
west build -s zmk/app -d build/right -b adv360_right -- -DZMK_CONFIG="${PWD}/config"
# Adv360 Right Kconfig file
grep -vE '(^#|^$)' build/right/zephyr/.config
# Rename zmk.uf2
cp build/left/zephyr/zmk.uf2 "./firmware/${TIMESTAMP}-${COMMIT}-left.uf2" && cp build/right/zephyr/zmk.uf2 "./firmware/${TIMESTAMP}-${COMMIT}-right.uf2"
cp build/left/zephyr/zmk.uf2 "./firmware/${TIMESTAMP}-${COMMIT}-left.uf2"

# Build right side if selected
if [ "${BUILD_RIGHT}" = true ]; then
# West Build (right)
west build -s zmk/app -d build/right -b adv360_right -- -DZMK_CONFIG="${PWD}/config"
# Adv360 Right Kconfig file
grep -vE '(^#|^$)' build/right/zephyr/.config
# Rename zmk.uf2
cp build/right/zephyr/zmk.uf2 "./firmware/${TIMESTAMP}-${COMMIT}-right.uf2"
fi
6 changes: 0 additions & 6 deletions config/boards/arm/adv360/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ config SPI
config BT_CTLR
default BT

config ZMK_BLE
default y

config ZMK_USB
default y

if USB

config USB_NRFX
Expand Down
7 changes: 5 additions & 2 deletions config/boards/arm/adv360/adv360.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan0;
zmk,backlight = &backlight;
zmk,battery = &vbatt;
Expand All @@ -43,9 +44,8 @@

>;
};
ext-power {
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};

Expand Down Expand Up @@ -90,6 +90,9 @@

&usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};


Expand Down
7 changes: 7 additions & 0 deletions config/boards/arm/adv360/adv360_left_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_HID_KEYBOARD_EXTENDED_REPORT=n #Set this to y for F13-F24 and intl keys with NKRO
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
CONFIG_BUILD_OUTPUT_UF2=y

CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
CONFIG_ZMK_BLE_PASSKEY_ENTRY=n

CONFIG_ZMK_BLE=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_HID_INDICATORS=y
5 changes: 5 additions & 0 deletions config/boards/arm/adv360/adv360_right_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
CONFIG_BUILD_OUTPUT_UF2=y

CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y

CONFIG_ZMK_BLE=y
CONFIG_ZMK_USB=y
2 changes: 1 addition & 1 deletion config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ manifest:
projects:
- name: zmk
remote: refil
revision: adv360-z3.2-2
revision: adv360-z3.2-3
import: app/west.yml
self:
path: config

0 comments on commit fd9aff7

Please sign in to comment.