Thursday 26 August 2021

ZMK process 02 - Building and flashing

 https://zmk.dev/docs/development/build-flash

  1.  cd app
  2. To flash keyboard shields https://zmk.dev/docs/hardware/
  3. Sofle (sofle_left and sofle_right)
  4.  Corne (corne_left and corne_right)
  5. west build -d build/left -b nrfmicro_13 -- -DSHIELD=sofle_left
  6. double press reset button
  7. west flash

sofle keyboard config edit here:

 C:\Users\chino\ZMK\app\boards\shields\sofle

 C:/Users/chino/ZMK/app/build/left/zephyr/zmk.uf2 


issue

cant build locally, only through github actions. 

https://github.com/zmkfirmware/zmk/issues/786

you need to use corne_left and corne_right.conf separately, or point west to your config folder when building (recommended)
just add — -DZMK_CONFIG=/path/to/config

 

sorry I missed that. one recommendation I’d have is to delete the build folder before building, see if that makes a difference

 

 

----update 20210918

Complete through github action for the files, drop it at 

zmk-config

master

.config and .keymap 

----cant work because the action taken for sofle left and right

#attempt 1"

try to create locally: issue 1, not working when saying that pronton c as default

west config build.pristine always

then, 

west build -b nrfmicro_13 -- -DSHIELD=reviung41

success

Converted to uf2, output size: 317952, start address: 0x26000
Wrote 317952 bytes to C:/Users/chino/ZMK/app/build/zephyr/zmk.uf2

----update 20210922 

complete through github action 

referring to

 

 

 

 

 

Monday 23 August 2021

Zmk process -1 [zmk setup]

 https://chocolatey.org/install

 A

CHOCO INSTALATION

  1. start>cmd>right click>run asa admin
  2. powershell.exe
  3. Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
  4.  Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  5. Wait a few seconds for the command to complete.

  

https://zmk.dev/docs/development/setup/

B

  1. Type choco or choco -? now, or see Getting Started for usage instructions.
  2. choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
    choco install ninja gperf python git
  3. choco install dfu-util
  4.  (follow the steps in zmk dev above)

 

C

//Error 01: Failures
 - dfu-util (exited 404) - Error while running 'C:\ProgramData\chocolatey\lib\dfu-util\tools\chocolateyInstall.ps1'.
 See log for details.

Try choco install redis-64

Chocolatey installed 3/3 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

//error01 solved

----

D

Above all solved. Now::

  1. pip3 install -U west

//Error 02: WARNING: You are using pip version 21.1.3; however, version 21.2.4 is available.
You should consider upgrading via the 'c:\python39\python.exe -m pip install --upgrade pip' command.

upgrade as suggested: 

c:\python39\python.exe -m pip install --upgrade pip

reference: https://stackoverflow.com/questions/38376422/choco-install-issue-with-chocolateyinstall-ps1-or-nuspec-file?rq=1

Successfully installed pip-21.2.4

//Error 02 solved. 

E

  1. continue with above installation (ok)
  2. close Command Prompt and open a new session as a user for the remainder of the instructions.

F

  1. https://zmk.dev/docs/development/setup/#environment-variables
  2. Dont follow above, instead (as figure below). eg C:\Python39\Scripts
  3. Save the setting then open new cmd and close current one or refreshenv.


 G Tool chain installation

  1.  https://zmk.dev/docs/development/setup/#environment-variables
  2. create a new folder under c gnu_arm_embedded?
  3. https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
  4.  https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07win32/gcc-arm-none-eabi-10.3-2021.07-win32.exe
  5.  C:\gnu_arm_embedded\10 2021.07
  6. Check whether correct
  7.  Windows
    
     echo %ZEPHYR_TOOLCHAIN_VARIANT%
    gnuarmemb
    
     echo %GNUARMEMB_TOOLCHAIN_PATH%
    C:\gnu_arm_embedded

    set MY_VARIABLE=foo
     

 H Gitclone to zmk

  1. cmd
  2. cd ZMK (built one folder for zmk already under c user)
  3. git clone https://github.com/zmkfirmware/zmk.git


 

I Initialize & Update Zephyr Workspace

Error 03 Unable to run west init -1 app/

>>restart

 Run cmd

cd zmk

west init -l app/

 downloading...

Error 03 Solved

  1.  West update
  2. HEAD is now at 6934463 Preps for 1.7.0-rc1
    HEAD is now at 6934463 Preps for 1.7.0-rc1 [done]

 

 J export Zephyr and install Zephyr [ok]


Ends> proceed to building and flashing

https://zmk.dev/docs/development/build-flash











Saturday 21 August 2021

Issue: (physical) Certain Rows not registered



>>Row 1 and row 4?

>>check config.h



popdream suggested: D4 B4

hence, first row D4; 4th row B4, it is 4 and 8 on pro micro


Friday 20 August 2021

Error of No LAYOUTs defined! Need at least

 ☒ AK81_VE: No LAYOUTs defined! Need at least one layout defined in the keyboard.h or info.json.
avr-gcc.exe (GCC) 8.4.0

 

 A. Change the .h 

/keymap to #define LAYOUT( \


B. Change the keymap

#define _LAYER0 0
#define _LAYER1 1
#define _LAYER2 2
#define _LAYER3 3


    [_LAYER0] = LAYOUT(
        KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
        KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
        KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
        KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
        KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
        KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
    ),

    [_LAYER3] = LAYOUT(
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)

};

Tuesday 17 August 2021

Build log: Reviung 41 acrylic

This is not my first attempt to try out acrylic prototype for acrylic reviung41. As i am not the fans of bulky acrylic case provided by github, i am going to design my own. 

This post merely to record my design process.

 

Overlapping of several layers to design acrylic feet for reviung41. Trying to make use of some spaces available at the bottom of pcb after installed with hotswap socket and switches. 

 


I may need a thin and flat screw head. 

 


 

First round leg design, trying to assemble with another version.