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