diff --git a/Tools/export.sh b/Tools/export.sh index b619427169..3a6f885d06 100755 --- a/Tools/export.sh +++ b/Tools/export.sh @@ -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 diff --git a/docs/source/getting-started/config.rst b/docs/source/getting-started/config.rst index 28b4089475..7157afc439 100644 --- a/docs/source/getting-started/config.rst +++ b/docs/source/getting-started/config.rst @@ -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