From a8075df8dc106586afcbce005ca8a00834c8bbff Mon Sep 17 00:00:00 2001 From: krzychb Date: Thu, 1 Jun 2017 22:44:33 +0200 Subject: [PATCH] Fixed procedures, ref. issue report #656 --- docs/get-started/add-idf_path-to-profile.rst | 17 +++++++++++------ docs/get-started/linux-setup.rst | 10 +++++++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/get-started/add-idf_path-to-profile.rst b/docs/get-started/add-idf_path-to-profile.rst index 51c044496..60ca43481 100644 --- a/docs/get-started/add-idf_path-to-profile.rst +++ b/docs/get-started/add-idf_path-to-profile.rst @@ -13,11 +13,11 @@ The user profile scripts are contained in ``C:/msys32/etc/profile.d/`` directory #. Create a new script file in ``C:/msys32/etc/profile.d/`` directory. Name it ``export_idf_path.sh``. -#. Identify the path to ESP-IDF directory. It is specific to your system configuration and may look something like ``C:\msys32\home\Krzysztof\esp\esp-idf`` +#. Identify the path to ESP-IDF directory. It is specific to your system configuration and may look something like ``C:\msys32\home\user-name\esp\esp-idf`` #. Add the ``export`` command to the script file, e.g.:: - export IDF_PATH="C:/msys32/home/Krzysztof/esp/esp-idf" + export IDF_PATH="C:/msys32/home/user-name/esp/esp-idf" Remember to replace back-slashes with forward-slashes in the original Windows path. @@ -31,7 +31,7 @@ The user profile scripts are contained in ``C:/msys32/etc/profile.d/`` directory If you do not like to have ``IDF_PATH`` set up permanently in user profile, you should enter it manually on opening of an MSYS2 window:: - export IDF_PATH="C:/msys32/home/Krzysztof/esp/esp-idf" + export IDF_PATH="C:/msys32/home/user-name/esp/esp-idf" If you got here from section :ref:`get-started-setup-path`, while installing s/w for ESP32 development, then go back to section :ref:`get-started-start-project`. @@ -41,19 +41,24 @@ If you got here from section :ref:`get-started-setup-path`, while installing s/w Linux and MacOS --------------- -Set up ``IDF_PATH`` by adding the following line to ``~/.bash`` file: :: +Set up ``IDF_PATH`` by adding the following line to ``~/.profile`` file:: export IDF_PATH=~/esp/esp-idf Log off and log in back to make this change effective. -If you do not like to have ``IDF_PATH`` set up permanently, you should enter it manually in terminal window on each restart or logout. +.. note:: + + If you have ``/bin/bash`` set as login shell, and both ``.bash_profile`` and ``.profile`` exist, then update ``.bash_profile`` instead. Run the following command to check if ``IDF_PATH`` is set:: printenv IDF_PATH -The path previously entered in ``~/.bash`` file (or set manually) should be printed out. +The path previously entered in ``~/.profile`` file (or set manually) should be printed out. +If you do not like to have ``IDF_PATH`` set up permanently, you should enter it manually in terminal window on each restart or logout:: + + export IDF_PATH=~/esp/esp-idf If you got here from section :ref:`get-started-setup-path`, while installing s/w for ESP32 development, then go back to section :ref:`get-started-start-project`. diff --git a/docs/get-started/linux-setup.rst b/docs/get-started/linux-setup.rst index 5e43ea325..c8ae0060a 100644 --- a/docs/get-started/linux-setup.rst +++ b/docs/get-started/linux-setup.rst @@ -44,17 +44,21 @@ ESP32 toolchain for Linux is available for download from Espressif website: 2. The toolchain will be extracted into ``~/esp/xtensa-esp32-elf/`` directory. - To use it, you will need to update your ``PATH`` environment variable in ``~/.bash_profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.bash_profile`` file:: + To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file:: export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin - Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.bash_profile`` file:: + Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file:: alias get_esp32="export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin" Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``. -3. Finally, run the following command to verify if ``PATH`` is correctly set:: + .. note:: + + If you have ``/bin/bash`` set as login shell, and both ``.bash_profile`` and ``.profile`` exist, then update ``.bash_profile`` instead. + +3. Log off and log in back to make the ``.profile`` changes effective. Run the following command to verify if ``PATH`` is correctly set:: printenv PATH