只適合Linux環境,推薦Ubuntu。本例以Ubuntu16.04-x64爲例python
[dzlua@ubuntu: ~]$ sudo apt install git
國內較慢 github: https://github.com/Dzlua/espenv.gitgit
git clone --recursive https://github.com/Dzlua/espenv.git
國內較快 gitee : https://gitee.com/dzlua/espenv.gitgithub
git clone --recursive https://gitee.com/dzlua/espenv.git
[dzlua@ubuntu:~]$ git clone --recursive https://gitee.com/dzlua/espenv.git [dzlua@ubuntu:~]$ cd espenv/
[dzlua@ubuntu:~/espenv]$ git checkout v3.2 [dzlua@ubuntu:~/espenv]$ git submodule update
[dzlua@ubuntu:~/espenv]$ ./install.sh ... ... ... Unzipping... Generating mkenv.sh... Done! Use "source mkenv.sh" to export PATH and IDF_PATH. [dzlua@ubuntu:~/espenv]$
安裝成功如上ubuntu
[dzlua@ubuntu:~/espenv]$ source mkenv.sh [dzlua@ubuntu:~/espenv]$ cd examples/get-started/project_template/ [dzlua@ubuntu:~/espenv/examples/get-started/project_template]$ ls CMakeLists.txt components main Makefile readme.txt [dzlua@ubuntu:~/espenv/examples/get-started/project_template]$ make menuconfig # 配置設備 [dzlua@ubuntu:~/espenv/examples/get-started/project_template]$ make -j2 ... ... ... esptool.py v2.4.0 To flash all build output, run 'make flash' or: python /home/dzlua/dzlua/espenv/ESP8266_RTOS_SDK/components/esptool_py/esptool/esptool.py --chip esp8266 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 1MB 0xd000 /home/dzlua/dzlua/espenv/examples/get-started/project_template/build/ota_data_initial.bin 0x0000 /home/dzlua/dzlua/espenv/examples/get-started/project_template/build/bootloader/bootloader.bin 0x10000 /home/dzlua/dzlua/espenv/examples/get-started/project_template/build/project_template.bin 0x8000 /home/dzlua/dzlua/espenv/examples/get-started/project_template/build/partitions_two_ota.1MB.bin [dzlua@ubuntu:~/espenv/examples/get-started/project_template]$ cd build/ [dzlua@ubuntu:~/espenv/examples/get-started/project_template/build]$ ls -l ... ... -rw-rw-r-- 1 dzlua dzlua 8192 7月 15 22:19 ota_data_initial.bin -rw-rw-r-- 1 dzlua dzlua 3072 7月 15 22:19 partitions_two_ota.1MB.bin -rw-rw-r-- 1 dzlua dzlua 222944 7月 15 22:19 project_template.bin -rwxrwxr-x 1 dzlua dzlua 1327388 7月 15 22:19 project_template.elf -rw-rw-r-- 1 dzlua dzlua 1406199 7月 15 22:19 project_template.map ... ...
如上,表示make成功測試
後續在使用時,只須要在新終端中執行 source mkenv.sh
ui
[dzlua@ubuntu:~]$
[dzlua@ubuntu:~]$ cd dzlua/espenv/
source mkenv.sh
[dzlua@ubuntu:~/dzlua/espenv]$ source mkenv.sh
[dzlua@ubuntu:~/dzlua/espenv]$ cd ../examples/get-started/project_template/
[dzlua@ubuntu:~/dzlua/examples/get-started/project_template]$ make menuconfig [dzlua@ubuntu:~/dzlua/examples/get-started/project_template]$ make -j2