ubuntu14.04平台 esp32初探

依照ESP32 Get Started操作成功在ubuntu14.04上运行hello_world应用

工具链xtensa-esp32-elf-xx的设置与uboot arm交叉编译工具类似

安装相应工具:

apt-get install git wget make libncurses-devflex bison gperf python python-serial

下载工具链压缩包并解压设置环境变量,其实这一点的设置上与文档有点差异,可以在 /etc/bash.bashrc中加入对应的路径就能正确使用工具

ubuntu14.04平台 esp32初探

获取ESP-IDF

git clone --recursivehttps://github.com/espressif/esp-idf.git

工具链通过IDF_PATH环境变量访问ESP_IDF

exportIDF_PATH=/home/zfl/esp32/esp32_20180421/repository/esp-idf

电脑宿主系统是win7,首先在windows安装cp210x的驱动,并通过vmware虚拟机设置识别串行设备,在编辑虚拟机设置->添加->串行设备,是虚拟机开启后自动识别相应的串行设备

然后依照linux的方式安装cp210x的驱动并成功识别设备,ls /dev/tty*

ubuntu14.04平台 esp32初探

然后使用串口工具输出打印日志,试过putty不成功,改用minicom,设置之后成功运行

ubuntu14.04平台 esp32初探

另外运行make monitor时会出现异常,更新pyserial版本

pip install pyserial

pip install --upgrade  pyserial

ubuntu14.04平台 esp32初探