You can find all active COM ports by the following command. This command works in Windows' command prompt, PowerShell and MSYS shell.
mode.com | findstr "COM"
Try connect and disconnect your device and run above command repeatedly. Difference of result is your device's COM port.
Open command prompt window. And input the following commands to the window.
:: Input the following commands in Windows command prompt window
mkdir C:\esp
cd /d C:\esp
exit
- Download latest prebuilt toolchain from the following URL. (note: .zip filename is usually 'esp32_win32_msys2_environment_and_toolchain-YYYYMMDD.zip') https://esp-idf.readthedocs.io/en/latest/get-started/windows-setup.html#toolchain-setup
- Extract the zip file.
- Check there's
msys32
directory in the extracted zip file. - Move
msys32
directory underC:\esp
. After moving, you have to haveC:\esp\msys32
directory. - Open command prompt again. And input the following command to make sure you've succcessfully moved
msys32
.
:: Input the following commands in Windows command prompt window
cd /d C:\esp
cd msys32
dir /b opt\xtensa-esp32-elf
If you can see directory names such as bin
, include
, lib
, etc, you've succeeded to move msys32
.
Input the following command to Windows command prompt to open msys2 window.
:: Input the following commands in Windows command prompt window
start C:\esp\msys32\mingw32.exe && exit
## Input the following commands to msys2 window.
## Get ESP-IDF
## https://esp-idf.readthedocs.io/en/latest/get-started/index.html#get-esp-idf
mkdir ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
## Setup Path to ESP-IDF
## https://esp-idf.readthedocs.io/en/latest/get-started/add-idf_path-to-profile.html#windows
echo export IDF_PATH=\"$HOME/esp/esp-idf\" > /etc/profile.d/export_idf_path.sh
source /etc/profile.d/export_idf_path.sh
printenv IDF_PATH
## Start a Project
## https://esp-idf.readthedocs.io/en/latest/get-started/index.html#start-a-project
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
## Configure
## https://esp-idf.readthedocs.io/en/latest/get-started/index.html#configure
cd ~/esp/hello_world
make menuconfig
## Here, read the following section
## https://esp-idf.readthedocs.io/en/latest/get-started/index.html#configure
## And set your COM port properly.
## If your device's COM port is "COM3", input COM3 as your "default serial port".
## Build and Flash
## https://esp-idf.readthedocs.io/en/latest/get-started/index.html#build-and-flash
make flash
## Monitor
## https://esp-idf.readthedocs.io/en/latest/get-started/index.html#monitor
make monitor
$ cp -r $IDF_PATH/examples/get-started/hello_world
cp: missing destination file operand after '/home/Vedant/esp/esp-idf/examples/get-started/hello_world'
i am getting this error after running copy command in msys32.please give me suggestion how to solve it.
Thanks