esp32 setup ---linux

refer to the esp website:
http://esp-idf.readthedocs.io/en/latest/get-started/index.html

Step1.Install Prerequisites
$sudo apt-get install git wget libncurses-dev flex bison gperf python python-pip python-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util

for ubuntu system,default python verison is 2.7 , esp suggest to update to python3.5. please don't do that

Step2. Get ESP-IDF  下载源码包
$cd ~/esp
$git clone -b v4.0.1 --recursive https://github.com/espressif/esp-idf.git

Step3.Set up the tools  下载编译工具和设置python的环境.
$cd ~/esp/esp-idf
$./install.sh 
(1)工具和python env下载路径: /home/jason/.espressif


(2)编译工具:
jason@jason:~/.espressif$ cd tools/
esp32s2ulp-elf/     openocd-esp32/      xtensa-esp32s2-elf/
esp32ulp-elf/       xtensa-esp32-elf/
(3)python env
jason@jason:~/.espressif/python_env/idf4.2_py2.7_env$ ls
bin  include  lib  pyvenv.cfg
下载python env的文件经常出问题:
 ERROR: cryptography 1.9 requires enum34, which is not installed.
 ERROR: cryptography 1.9 requires ipaddress, which is not installed.
 ERROR: cryptography 1.9 requires six>=1.4.1, which is not installed.
>$python -m pip install  --user -r $IDF_PATH/requirements.txt    
$pip install --ignore-installed cffi

ImportError: No module named 'pip._internal'
>pip install --upgrade pip

linux:
安装Python2.7版本的虚拟环境 env-py2:
virtualenv env-py2
1
安装Python3.5版本的虚拟环境env-py3:
virtualenv -p /usr/bin/python3.5 env-py3

windows
windows系统中默认是没有安装Python的,首先需要安装Python2.7与Python3.6。具体怎么安装可以查看相关教程。

安装Python2.7版本的虚拟环境 env-py2:

virtualenv -p C:\Python27\python.exe env-py21
安装Python3.6版本的虚拟环境env-py3:
 

step4: Set up the environment variables 设置路径IDF_PATH,编译工具和python evn路径
$ . ./export.sh   //前面有‘.’和空格 


 

猜你喜欢

转载自blog.csdn.net/fanxianchao_2012/article/details/106803321