From 94f2d2900f0902afddb741ad03dcf3528c59cf63 Mon Sep 17 00:00:00 2001 From: Hello9999901 Date: Fri, 2 Dec 2022 12:17:37 -0500 Subject: [PATCH] Added macos specific .zephyrrc configuration --- docs/docs/development/setup.md | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/docs/docs/development/setup.md b/docs/docs/development/setup.md index bf1bd122..7eed6c9f 100644 --- a/docs/docs/development/setup.md +++ b/docs/docs/development/setup.md @@ -467,6 +467,7 @@ pip3 install --user -r zephyr/scripts/requirements-base.txt defaultValue="win" values={[ {label: 'Windows', value: 'win'}, +{label: 'macOS', value: 'mac'}, {label: 'Other OS', value: 'other'}, ]}> @@ -499,6 +500,64 @@ On Windows, only two environment variables need to be set for ZMK to build prope + + +#### 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.5.0/guides/env_vars.html#option-3-using-zephyrrc-files) for how to load those settings. + +#### `~/.zephyrrc` Setup + +If the toolchain was installed through Homebrew as stated above, the `~/.zephyrrc` file should be set up as such: + +``` +export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb +export GNUARMEMB_TOOLCHAIN_PATH="/opt/homebrew/" +``` + +##### Per Shell + +To load the Zephyr environment properly for just one transient shell, run the following from your ZMK checkout directory: + +``` +source zephyr/zephyr-env.sh +``` + +##### 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. + + + + + +``` +cat ~/.zephyrrc >> ~/.bashrc +``` + + + + + +``` +cat ~/.zephyrrc >> ~/.zshrc +``` + + + + + + + #### For Zephyr