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   //前面有‘.’和空格 

 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值