diff --git a/Tools/export.sh b/Tools/export.sh index b619427169..8343260bb3 100755 --- a/Tools/export.sh +++ b/Tools/export.sh @@ -38,15 +38,18 @@ fi 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 diff --git a/docs/source/getting-started/config.rst b/docs/source/getting-started/config.rst index 28b4089475..6e31560a05 100644 --- a/docs/source/getting-started/config.rst +++ b/docs/source/getting-started/config.rst @@ -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