top of page

Here are detailed instructions for installing Python, pip, esptool, and flashing the binary onto an ESP32 using Windows:

 

1. Installing Python:

  1. Download the Python Installer:

  2. Install Python:

    • Launch the installer.

    • At the bottom, make sure to check "Add Python to PATH" (this makes it accessible from the Command Prompt).

    • Choose "Install Now".

​

2. Verify Python & Pip Installation:

  1. Open the Windows Command Prompt.

  2. Type python --version and press Enter. This should display the installed version of Python.

  3. Type pip --version and press Enter. This should display the installed version of pip.

​

​

3. Installing esptool:

  1. In the Command Prompt, type the following and press Enter:

    Copy code

    pip install esptool

  2. After the installation, you can verify it by typing esptool.py version and pressing Enter. This should display the version of the esptool.

​

​

4. Flashing the Binary to ESP32:

  1. Connect Your ESP32:

    • Use a USB cable to connect your ESP32 to your computer.

    • Windows should recognize it and install the necessary drivers. If it doesn't, you might need to manually install drivers for the ESP32.

  2. Identify the COM Port:

    • Open "Device Manager" (you can search for it in the Start Menu).

    • Under "Ports (COM & LPT)", look for an entry that mentions "Silicon Labs CP210x" or "FTDI" or something similar. This is your ESP32. Note the COM port number (e.g., COM3).

  3. Flash the Binary:

    • In the Command Prompt, navigate to the directory where your binary file is located.

    • Use the following command to flash the binary:

      ​

      esptool.py --chip esp32 --port [YOUR_COM_PORT] write_flash -z 0x1000 [YOUR_BINARY_FILE_NAME.bin]
       

      Replace [YOUR_COM_PORT] with your ESP32's COM port (e.g., COM3) and [YOUR_BINARY_FILE_NAME.bin] with the name of your binary file.

  4. Once flashing completes, reset the ESP32. Your program should now be running on the device.

Here are the instructions for installing Python, pip, esptool, and flashing the binary onto an ESP32 using macOS:

​

1. Installing Python:

macOS comes with a version of Python pre-installed (usually Python 2.7). However, it's best to use Python 3 for modern purposes.

  1. Download the Python Installer:

  2. Install Python:

    • Open the downloaded .pkg file and follow the installation instructions.

​

2. Verify Python & Pip Installation:

  1. Open the Terminal (you can find it in Applications > Utilities > Terminal).

  2. Type python3 --version and press Enter. This should display the installed version of Python 3.

  3. Type pip3 --version and press Enter. This should display the installed version of pip for Python 3.

​

3. Installing esptool:

  1. In the Terminal, type the following and press Enter:

    Copy code

    pip3 install esptool

  2. After the installation, you can verify it by typing esptool.py version and pressing Enter. This should display the version of the esptool.

4. Flashing the Binary to ESP32:

  1. Connect Your ESP32:

    • Use a USB cable to connect your ESP32 to your Mac.

    • If you're using an ESP32 with a Silicon Labs CP210x or FTDI chipset for USB-serial, you might need to install drivers. Many newer ESP32 boards use native USB and don't require drivers.

  2. Identify the Serial Port:

    • In the Terminal, type:

      bashCopy code

      ls /dev/cu.*

    • Look for an entry that resembles /dev/cu.SLAB_USBtoUART (for Silicon Labs chipsets) or /dev/cu.usbserial-XXXXX (for FTDI chipsets) or similar. This is your ESP32's port.

  3. Flash the Binary:

    • In the Terminal, navigate to the directory where your binary file is located using the cd command.

    • Use the following command to flash the binary:

      cssCopy code

      esptool.py --chip esp32 --port /dev/cu.[YOUR_PORT_NAME] write_flash -z 0x1000 [YOUR_BINARY_FILE_NAME.bin]

      Replace [/dev/cu.YOUR_PORT_NAME] with your ESP32's port name and [YOUR_BINARY_FILE_NAME.bin] with the name of your binary file.

  4. Once flashing completes, reset the ESP32. Your program should now be running on the device.

​

Zip file with binary and source code. Source code was built using Arduino IDE.

bottom of page