From 666257fa649e18e8628df71c7049886b786e7745 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 22 Nov 2021 14:44:07 -0600 Subject: [PATCH] Add readme --- zofle/{build.fish => build.bash} | 6 ++--- zofle/makefile | 2 +- zofle/readme.md | 42 ++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) rename zofle/{build.fish => build.bash} (80%) create mode 100644 zofle/readme.md diff --git a/zofle/build.fish b/zofle/build.bash similarity index 80% rename from zofle/build.fish rename to zofle/build.bash index 9deecd9..ceb138a 100755 --- a/zofle/build.fish +++ b/zofle/build.bash @@ -1,12 +1,12 @@ -#!/usr/bin/env fish +#!/usr/bin/env bash -set -q ZMK_DOCKER_IMAGE || set ZMK_DOCKER_IMAGE zmkfirmware/zmk-build-arm:2.5 +ZMK_DOCKER_IMAGE="${ZMK_DOCKER_IMAGE:-zmkfirmware/zmk-build-arm:2.5}" docker run -it --rm \ -v (pwd)/.cache:/zofle \ -v (pwd)/config:/zofle/config:ro \ -v (pwd)/build:/build \ - $ZMK_DOCKER_IMAGE sh -c 'cd /zofle + "$ZMK_DOCKER_IMAGE" sh -c 'cd /zofle west init -l config west update west zephyr-export diff --git a/zofle/makefile b/zofle/makefile index 0ed293a..f1494c8 100644 --- a/zofle/makefile +++ b/zofle/makefile @@ -1,6 +1,6 @@ .PHONY: build sleep build: - @fish build.fish + @fish build.bash flash-left: @sudo fish flash.fish ./build/sofle_left_nice_nano.uf2 diff --git a/zofle/readme.md b/zofle/readme.md new file mode 100644 index 0000000..af4a947 --- /dev/null +++ b/zofle/readme.md @@ -0,0 +1,42 @@ +# Zofle + +My Sofle+nice!nano_v2 keyboard. + +## Setup + +You will need `fish` and `docker`. + +## Build Firmware + + make build + +## Flash Firmware + +You can flash your left-half: + + make flash-left + # double-tap the reset button on the left half while plugged in + +And your right-half: + + make flash-right + # double-tap the reset button on the right half while plugged in + +### Other Flash Methods + +If, for whatever reason, the flashing scripts do not work for you, here are the +steps to flashing the nice!nano MCUs manually: + +1. Plug your nice!nano into your computer. +2. Press the reset button twice. + - This should case the blue LED to pulse slowly. + - If it pulses quickly, it is not plugged in. + - If you can't see the blue LED, you may have to contort your board to + look at the other side of the nice!nano's PCB. +3. The nice!nano should present itself to your OS as a flash drive. Mount it. +4. Copy the firmware file from `build/sofle_$SIDE_nice_nano.uf2` to the `CURRENT.UF2` on the mounted flash drive. + - Example for left-half: `cp build/sofle_left_nice_nano.uf2 /run/media/daniel/NICENANO/CURRENT.UF2` + - Example for right-half: `cp build/sofle_right_nice_nano.uf2 /run/media/daniel/NICENANO/CURRENT.UF2` + +Your nice!nano will work for a bit and once the copying is done (it can take +2 to 20 seconds) it should boot into the new firmware.