# Installation with VScode extension on MacOS/Linux ## Step 1. Install Prerequisites ```{eval-rst} In order to use ROGO_ESP32_WILE_SDK with the WILE ESP32 device, you need to install some software packages based on your Operating System. This setup guide helps you on getting everything installed on Linux and macOS based systems. For Linux Users ~~~~~~~~~~~~~~~ To compile using ROGO_ESP32_WILE_SDK, you need to get the following packages. The command to run depends on which distribution of Linux you are using: - Ubuntu and Debian:: sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 - CentOS 7 & 8:: sudo yum -y update && sudo yum install git wget flex bison gperf python3 cmake ninja-build ccache dfu-util libusbx CentOS 7 is still supported but CentOS version 8 is recommended for a better user experience. - Arch:: sudo pacman -S --needed gcc git make flex bison gperf python cmake ninja ccache dfu-util libusb .. note:: - CMake version 3.16 or newer is required for use with ROGO_ESP32_WILE_SDK. Run "tools/idf_tools.py install cmake" to install a suitable version if your OS versions does not have one. - If you do not see your Linux distribution in the above list then please check its documentation to find out which command to use for package installation. For macOS Users ~~~~~~~~~~~~~~~ ROGO_ESP32_WILE_SDK uses the version of Python installed by default on macOS. - Install CMake & Ninja build: - If you have HomeBrew_, you can run:: brew install cmake ninja dfu-util - If you have MacPorts_, you can run:: sudo port install cmake ninja dfu-util - Otherwise, consult the CMake_ and Ninja_ home pages for macOS installation downloads. - It is strongly recommended to also install ccache_ for faster builds. If you have HomeBrew_, this can be done via ``brew install ccache`` or ``sudo port install ccache`` on MacPorts_. .. note:: If an error like this is shown during any step:: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Then you need to install the XCode command line tools to continue. You can install these by running ``xcode-select --install``. Apple M1 Users ~~~~~~~~~~~~~~ If you use Apple M1 platform and see an error like this:: WARNING: directory for tool xtensa-esp32-elf version esp-2021r2-patch3-8.4.0 is present, but tool was not found ERROR: tool xtensa-esp32-elf has no installed versions. Please run 'install.sh' to install it. or:: zsh: bad CPU type in executable: ~/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Then you need to install Apple Rosetta 2 by running .. code-block:: bash /usr/sbin/softwareupdate --install-rosetta --agree-to-license Installing Python 3 ~~~~~~~~~~~~~~~~~~~ Based on macOS `Catalina 10.15 release notes`_, use of Python 2.7 is not recommended and Python 2.7 is not included by default in future versions of macOS. Check what Python you currently have:: python --version If the output is like ``Python 2.7.17``, your default interpreter is Python 2.7. If so, also check if Python 3 is not already installed on your computer:: python3 --version If the above command returns an error, it means Python 3 is not installed. Below is an overview of the steps to install Python 3. - Installing with HomeBrew_ can be done as follows:: brew install python3 - If you have MacPorts_, you can run:: sudo port install python38 .. _get-started-get-esp-idf: ``` ## Step 2 Download ROGO_ESP32_WILE_SDK To get ROGO_ESP32_WILE_SDK, navigate to your installation directory and clone the repository with ``git clone``, following instructions below specific to your operating system. Open Terminal, and run the following commands: .. code-block:: bash mkdir -p ~/esp cd ~/esp git clone -b dev/v5.1.1 --recursive https://github.com/RogoSolutions/rogo-esp32-sdk.git ROGO_ESP32_WILE_SDK is downloaded into ``~/esp/rogo-esp32-sdk``. **Alternatively** you can also directly download from the [ROGO_ESP32_WILE_SDK's github page](https://github.com/RogoSolutions/rogo-esp32-sdk/tree/dev/v5.1.1)