From 96020a469a5524817732dec59c2b22e0e6172504 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 29 Aug 2020 17:21:56 -0700 Subject: [PATCH] Added win environment variables instructions --- docs/docs/dev-setup.md | 45 +++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/docs/docs/dev-setup.md b/docs/docs/dev-setup.md index 1c5c9dde..151a032b 100644 --- a/docs/docs/dev-setup.md +++ b/docs/docs/dev-setup.md @@ -212,8 +212,7 @@ source ~/.bashrc -1. Go to the Start Menu and type "environment variables" to find and open the "Edit the system environment variables" option. -2. Click "Environment Variables...", and select the "Path" variable under System variables. +1. See the [Environment Variables](#environment-variables) section on how to get to the Environment Variables page. 3. Click "Edit..." and then "New" to add the directory where your west.exe is located. By default this should be something like `C:\Python38\Scripts`. @@ -359,10 +358,41 @@ pip3 install --user -r zephyr/scripts/requirements-base.txt ### Environment Variables +#### GNU ARM Embedded on Windows + +On Windows, you will have to set two environment variables for ZMK to build properly: `ZEPHYR_TOOLCHAIN_VARIANT` and `GNUARMEMB_TOOLCHAIN_PATH`. + +
+ Steps to Update Environment Variables + +1. Open Start Menu and type 'env' to find the 'Edit the system environment variables' option. Open it. + +![start menu](assets/env-var/start_menu.png) + +2. Click 'Environment Variables...'. + +![start menu](assets/env-var/env_var.png) + +3. Click "New..." under System variables to create a new system variable. + +![start menu](assets/env-var/new_variable.png) + +4. Set the variable name to 'ZEPHYR_TOOLCHAIN_VARIANT' and value to 'gnuarmemb'. Click OK to save. + +![start menu](assets/env-var/zephyr_toolchain.png) + +5. Create another variable with variable name 'GNUARMEMB_TOOLCHAIN_PATH' and value set to wherever you installed your toolchain. Click OK to save. + +![start menu](assets/env-var/gnuarmemb.png) + +
+ +#### For Zephyr + By default, the Zephyrâ„¢ SDK will create a file named `~/.zephyrrc` with the correct environment variables to build ZMK. We suggest two main [options](https://docs.zephyrproject.org/2.3.0/guides/env_vars.html?highlight=zephyrrc) for how to load those settings. -#### Per Shell +##### Per Shell To load the Zephyr environment properly for just one transient shell, run the following from your ZMK checkout directory: @@ -408,7 +438,7 @@ source zephyr/zephyr-env.cmd -#### All Shells +##### All Shells To load the environment variables for your shell every time, append the existing `~/.zephyrrc` file to your shell's RC file and then start a new shell. @@ -419,7 +449,6 @@ defaultValue="bash" values={[ {label: 'bash', value: 'bash'}, {label: 'zsh', value: 'zsh'}, -{label: 'cmd.exe', value: 'cmd'}, ] }> @@ -439,10 +468,4 @@ cat ~/.zephyrrc >> ~/.zshrc - - -`cmd.exe` instructions coming soon! - - -