Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add env var SMING_TOOLCHAINS to allow easier change of toolchains ins… #2894

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Tools/export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@ fi

export PYTHON=${PYTHON:=$(which python3)}

# Toolchain paths
export SMING_TOOLCHAINS=${SMING_TOOLCHAINS:=/opt}

# Esp8266
export ESP_HOME=${ESP_HOME:=/opt/esp-quick-toolchain}
export ESP_HOME=${ESP_HOME:=$SMING_TOOLCHAINS/esp-quick-toolchain}

# Esp32
export IDF_PATH=${IDF_PATH:=/opt/esp-idf}
export IDF_TOOLS_PATH=${IDF_TOOLS_PATH:=/opt/esp32}
export IDF_PATH=${IDF_PATH:=$SMING_TOOLCHAINS/esp-idf}
export IDF_TOOLS_PATH=${IDF_TOOLS_PATH:=$SMING_TOOLCHAINS/esp32}

# Rp2040
export PICO_TOOLCHAIN_PATH=${PICO_TOOLCHAIN_PATH:=/opt/rp2040}
export PICO_TOOLCHAIN_PATH=${PICO_TOOLCHAIN_PATH:=$SMING_TOOLCHAINS/rp2040}

# Provide non-apple CLANG (e.g. for rbpf library)
if [ -n "$GITHUB_ACTIONS" ] && [ "$(uname)" = "Darwin" ]; then
Expand Down
14 changes: 12 additions & 2 deletions docs/source/getting-started/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@ and integrated development environments (IDEs) work correctly.

You can find a list of these in :source:`Tools/export.sh`.

For Linux and WSL2, append values to your ``~/.bashrc`` file::
For Linux and WSL2, append :envvar:`SMING_HOME` to your ``~/.bashrc`` file::

# All architectures
export SMING_HOME=/opt/sming/Sming


:envvar:`SMING_HOME` is the only mandatory environmental variable.

If you want to change the location where the toolchain will be downloaded and installed you can append the values below::

# Specifies a common toolchains directory
export SMING_TOOLCHAINS=/opt

The :envvar:`SMING_TOOLCHAINS` is optional. As are the ones below. You can append them to your ``~/.bashrc`` file only
if you need to change the location of the installed toolchains::

# Esp8266
export ESP_HOME=/opt/esp-quick-toolchain

Expand Down
Loading