Skip to content

Commit

Permalink
Merge pull request MangoIV#8 from microfortnight/dev/migrate-to-zephy…
Browse files Browse the repository at this point in the history
…r-3-5

Zephyr 3.5 Update
  • Loading branch information
MangoIV authored May 27, 2024
2 parents 1cb4abb + e4c6a1a commit e79994d
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 90 deletions.
87 changes: 3 additions & 84 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,7 @@
name: Build
name: le_chiff_ble build

env:
config-path: zmk-config

on:
push:
paths:
- ".github/workflows/build.yml"
- "zmk-config/**"
pull_request:
paths:
- ".github/workflows/build.yml"
- "zmk-config/**"
workflow_dispatch:
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-20.04
container:
image: zmkfirmware/zmk-build-arm:3.5-branch-20231114235846-3.5.0-0.16.3-6c450465d1dd-6870957618
strategy:
fail-fast: false
matrix:
# List the firmware to build here. Each item use the following properties.
# board: (required) the board to build.
# shield: (optional) the shield to build. Omit for a standalone board.
# cmake-args: (optional) extra arguments to pass to CMake as a string.
include:
- board: le_chiff_ble
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: cache-zephyr-modules
with:
path: |
bootloader/
modules/
tools/
zephyr/
zmk/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('${{ env.config-path }}/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
run: west init -l ${{ env.config-path }}
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Prepare variables
id: variables
run: |
if [ -n "${{ matrix.shield }}" ]; then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk"
else
SHIELD_ARG=
ARTIFACT_NAME="${{ matrix.board }}-zmk"
fi
echo ::set-output name=shield-arg::${SHIELD_ARG}
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
- name: Build (west build)
run: |
west build -s zmk/app -b ${{ matrix.board }} -- \
${{ steps.variables.outputs.shield-arg }} \
-DZMK_CONFIG="${GITHUB_WORKSPACE}/${{ env.config-path }}" \
${{ matrix.cmake-args }}
# - name: Generated DTS file
# if: always()
# run: cat -n build/zephyr/${{ matrix.board }}.dts.pre.tmp
- name: Rename artifacts
run: |
mkdir build/artifacts
[ -f build/zephyr/zmk.hex ] && cp build/zephyr/zmk.hex "build/artifacts/${{ steps.variables.outputs.artifact-name }}.hex"
[ -f build/zephyr/zmk.uf2 ] && cp build/zephyr/zmk.uf2 "build/artifacts/${{ steps.variables.outputs.artifact-name }}.uf2"
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: "${{ steps.variables.outputs.artifact-name }}"
path: build/artifacts
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
board: [ "le_chiff_ble" ]
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ config I2C
config SSD1306
default y

config SSD1306_REVERSE_MODE
default y


endif # ZMK_DISPLAY

if LVGL
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@
status = "okay";

compatible = "nordic,nrf-twi";
sda-pin = <24>;
scl-pin = <22>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
Expand All @@ -122,6 +123,24 @@
com-invdir;
com-sequential;
prechargep = <0x22>;
inversion-on;
};
};

&pinctrl {
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 24)>,
<NRF_PSEL(TWIM_SCL, 0, 22)>;
};
};

i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 24)>,
<NRF_PSEL(TWIM_SCL, 0, 22)>;
low-power-enable;
};
};
};

Expand Down
File renamed without changes.

0 comments on commit e79994d

Please sign in to comment.