Skip to content

Commit

Permalink
Add env var SMING_TOOLCHAINS to allow easier change of toolchains ins…
Browse files Browse the repository at this point in the history
…tall path.
  • Loading branch information
slav-at-attachix committed Oct 23, 2024
1 parent 3892590 commit 61ba78b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Tools/export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ fi
# Common
export PYTHON=${PYTHON:=$(which python3)}

# Toolchain paths
export SMING_TOOLCHAINS=${ESP_HOME:=/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
8 changes: 8 additions & 0 deletions docs/source/getting-started/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ For Linux and WSL2, append values to your ``~/.bashrc`` file::

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

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
If you don't specify :envvar:`SMING_TOOLCHAINS` then you should set the path for the toolchains that you have installed. As given below::

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

0 comments on commit 61ba78b

Please sign in to comment.