Skip to content

Latest commit

 

History

History
237 lines (190 loc) · 7.16 KB

Installations.md

File metadata and controls

237 lines (190 loc) · 7.16 KB

Table Of Contents

For Windows

The first step is to install the ESP-IDF v4.2.

Step 1:Download the installer from here

Please download the offline version pointed by the arrow

Step 2: After Downloading open .exe file, select I accept the agreement then click Next >

Once you reach this step, click next.

We recommend to keep the default installation path and click next.

Step 3: In Select Components section, keep everything as default and click next

Step 4: In Ready to Install section, click on install which will take a few minutes. And then later Click next

Step 5: Make sure all the checkbox are marked before clicking finish

Step 6: Once you click On Finish, this is what you should be getting.

Step 7: Open ESP-IDF 4.2 CMD which should be on your desktop

Step 8: Cloning the Wall-E Git Repo

To clone the Repo just execute the following command on ESP-IDF Command Prompt. We are making the project folder in Desktop

cd %userprofile%\Desktop 
git clone https://github.com/SRA-VJTI/Wall-E.git --recurse-submodules
cd Wall-E

Pro Tip: cd %userprofile%\Desktop\Wall-E takes you to the Wall-E directory which contains all the required code

For Linux

Step 1 : Cloning the Wall-E Git repo

Open the terminal to clone the repo,execute the following commands on terminal. Installing the project in the Home folder.

cd $HOME
git clone https://github.com/SRA-VJTI/Wall-E.git --recurse-submodules
cd Wall-E 

Step 2 : Installing the necessary prerequisites.

Run the following commands for a quick install on Linux-based systems:

cd $HOME/Wall-E
sudo chmod +x wall_e_install.sh
./wall_e_install.sh

For MacOS

STEP 1 : Installing the necessary file

  • Download the file "wall_e_install.sh" given in the root folder itself and put it in the "Downloads" folder
  • Download the driver by clicking on this link , unzip it, then install it on the system

STEP 2 : Opening The Terminal

Open the terminal by pressing command+space and then typing terminal.

Note: If you're an M1 mac os user refer this link to open the terminal.

STEP 3 : Installing the Pre-Requisites

Copy this command in the command in the terminal , then press return

 source ~/Downloads/wall_e_install.sh

Note:- when you are asked to type the password in the terminal, password will not be visible to you. Just type the password and then press return.

  • Test the hello_world example in the same terminal; if it runs without any errors, log out & log back in. (Connect ESP32 to your device before running the below commands)
cd ~/esp/esp-idf/examples/get-started/hello_world
idf.py flash monitor

STEP 4 : Cloning Wall-E git repo

Cloning the Wall-E Git repo To clone the repo,execute the following commands on terminal.

cd $HOME
git clone https://github.com/SRA-VJTI/Wall-E.git --recurse-submodules
cd Wall-E

It will take some time to install, make sure you have an active internet connection. It will take around 2GB of data.

Commands

This is the basic procedure for compiling and flashing a code on the ESP32

Step 1 : Start a Project

Now you are ready to prepare your application for ESP32.

  • For Linux/MacOS -
get_idf # To use esp-idf commands 

cd ~/esp
cp -r ~/esp/esp-idf/examples/get-started/hello_world .
ls 

  • For Windows -
cd %userprofile%\Desktop\Wall-E
xcopy /e /i %IDF_PATH%\examples\get-started\hello_world hello_world

Step 2 : Connect Your Device

Connect your ESP32 board to the computer and check under what serial port the board is visible.

  • Linux : /dev/tty
  • MacOS : /dev/cu
  • Windows : COM1

Step 3 : Configure

  • For Linux/MacOS -
cd ~/esp/esp-idf/examples/get-started/hello_world #Navigating to the file
idf.py set-target esp32 #Command for Setting the Target 
idf.py menuconfig # Command for Opening the Configuration Menu
  • For Windows -
cd %userprofile%\Desktop\Wall-E\hello_world #Navigating to the file
idf.py set-target esp32 #Command for Setting the Target
idf.py menuconfig #Command for Opening the Configuration

If the previous steps have been executed correctly, you screen will show this:

Step 4 : Build the Project

Build the project by running:

  • Same for Both Linux and Windows
idf.py build #Command for building the code

This command will compile the application and all ESP-IDF components, then it will generate the bootloader, partition table, and application binaries.

Step 5 : Flash onto the Device

Flash the binaries that you just built (bootloader.bin, partition-table.bin and hello-world.bin) onto your ESP32 board by running.:

idf.py -p PORT [-b BAUD] flash 
  • For Linux
    • PORT - /dev/ttyUSB0 (idf.py -p /dev/ttyUSB0 -b 2000000 flash)
  • For MacOS
    • PORT - /dev/cu.usbserial-0001(idf.py -p /dev/cu.usbserial-0001 -b 2000000 flash)
  • For Windows
    • PORT - /COM1 (idf.py -p /COM1 -b 2000000 flash)
  • Depending on the port you used for connecting the board the port can vary from /dev/ttyUSB0 and Zero can be replaced by any other consecutive number and for windows /COM1 one can be replaced by other number depending on the port to which you have connected esp.
  • Note : In case you are unable to flash Press Down the Boot Button on ESP32 and then execute the Flash command

Step 6 : Flash onto the Device

  • For seeing the output given by esp32 we use this command after flashing
idf.py flash monitor