Added win environment variables instructions

This commit is contained in:
Kevin 2020-08-29 17:21:56 -07:00
parent 35dc46bfbb
commit 96020a469a

View file

@ -212,8 +212,7 @@ source ~/.bashrc
</TabItem>
<TabItem value = 'win'>
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`.
</TabItem>
@ -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`.
<details>
<summary> Steps to Update Environment Variables </summary>
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)
</details>
#### 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
</TabItem>
</OsTabs>
#### 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
</TabItem>
<TabItem value="cmd">
`cmd.exe` instructions coming soon!
</TabItem>
</Tabs>