sudo apt-get install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
sudo apt remove python3-pip python3-virtualenv -y
rm -r ~/.espressif/python_env && python get-pip.py
mkdir -p ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
cd ~/esp/esp-idf
./install.sh
. $HOME/esp/esp-idf/export.sh
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
Linux: starting with /dev/tty
cd ~/esp/hello_world
idf.py set-target esp32
idf.py menuconfig
idf.py build
idf.py -p PORT [-b BAUD] flash
example
idf.py -p /dev/ttyUSB0 -b 460800 flash
idf.py -p /dev/ttyUSB0 monitor
Go to Silab webpage and select Downloads tab.
Reference: http://headstation.com/archives/instructions-installing-cp210x-serial-bridge-driver/
-
Install dependencies
sudo apt install linux-headers-$(uname -r) -y mkdir -p Linux_3.x.x_4.x.x_VCP_Driver_Source/ cd Linux_3.x.x_4.x.x_VCP_Driver_Source/ printf "obj-m = cp210x.o KDIR = /lib/modules/`uname -r`/build SRCDIR = \$(PWD) # try this instead if you don't have PWD defined # SRCDIR = \$(shell dirname \$(realpath \$(lastword \$(MAKEFILE_LIST)))) all: \$(MAKE) -C \$(KDIR) M=\$(SRCDIR) modules clean: \$(MAKE) -C \$(KDIR) M=\$(SRCDIR) clean " > Makefile
-
Download
cp210x.ccorresponding to the kernel version and place inLinux_3.x.x_4.x.x_VCP_Driver_Source/. -
Then run
make allto build modulemake all sudo cp cp210x.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial sudo insmod /lib/modules/$(uname -r)/kernel/drivers/usb/serial/usbserial.ko sudo insmod cp210x.ko # run `sudo rmmod cp210x.ko` if existed
-
Install dependencies
sudo apt install linux-headers-$(uname -r) -y mkdir -p CH341_LINUX/ cd CH341_LINUX/ printf "ifeq (\$(KERNELRELEASE), ) KERNELDIR := /lib/modules/\$(shell uname -r)/build PWD :=\$(shell pwd) default: \$(MAKE) -C \$(KERNELDIR) M=\$(PWD) clean: rm -rf .tmp_versions Module.symvers *.mod.c *.o *.ko .*.cmd Module.markers modules.order load: modprobe usbserial insmod ch34x.ko unload: rmmod ch34x else obj-m := ch34x.o endif " > Makefile
-
Download
ch341.ccorresponding to the kernel version and place inCH341_LINUX, and save toch34x.c. -
Then run
make allto build modulemake sudo make load # load ch34x chips driver # sudo make unload # unload ch34x chips driver
- Step 1: Install
C/C++extention - Step 2:
mkdir .vscode - Step 3: Create new file named as
c_cpp_properties.jsonwith content:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"~/esp/esp-idf/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"/home/m/esp/esp-idf/components/**",
"${workspaceFolder}/**"
],
"limitSymbolsToIncludedHeaders": false
},
"compilerPath": "~/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc",
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}