esp8266 ubuntu16安装

esp8266 SDK安装编译,基本按照https://xuhong.blog.csdn.net/article/details/104736261安装就可以了
这里主要说一下我自己安装遇到的问题:
1.需要安装Python环境,我虚拟机安装Python的pip安装就是卡了我很长时间,最后我将pip的版本升级到pip --version 查看pip 20.3.4 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)`升级到20.3.4
但是后面报错

 DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.

说的是Python3的版本低了,但是我好像用的是Python2.7的嘛,应该后面有用到Python3,ubuntu16自带的Python3.5不提供更新了,,那就只有升级Python3.5了

2.把ubuntu16的Python3升级到3.9。
参考https://www.pythonheidong.com/blog/article/803124/c734374bc8a9e05cedad/

最后效果是这样:
	root@fengyang-virtual-machine:~# python3
Python 3.9.0 (default, Aug 31 2021, 11:35:51) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.

于是乎又出现问题:在Ubuntu 16.04.6 LTS上安装python3.7和pip3后出现Command ‘(‘lsb_release’, ‘-a’)’
问题的解决办法:https://blog.csdn.net/tao_627/article/details/90901563

加入SDK根目录,运行./install.sh没有报错,运行结束了。
接着加入历程里面运行make menuconfig弹出配置串口,没问题
make all
3问题:.fatal: 在 .gitmodules 中没有发现路径 ‘components/mqtt/esp-mqtt’ 的子模组映射,没有子模块,我就进入sdk的目录打开gedit .gitmodules 发现如何:

 	[submodule "components/json/cJSON"]
       path = components/json/cJSON
       url = https://gitee.com/xuhongv/cJSON.git

[submodule "components/mbedtls/mbedtls"]
       path = components/mbedtls/mbedtls
       url = https://gitee.com/xuhongv/mbedtls.git

[submodule "components/lwip/lwip"]
       path = components/lwip/lwip
       url = https://gitee.com/xuhongv/esp-lwip.git


于是在后面添加

[submodule "components/mqtt/esp-mqtt"]
       path = components/mqtt/esp-mqtt
       #url = https://gitee.com/xuhongv/esp-lwip.git
        url = https://github.com/tuanpmt/esp_mqtt

完成报错。
最后 make all

/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 16MB 
0x0 ESP8266_RTOS_SDK/examples/get-started/hello_world/build/bootloader/bootloader.bin
0x10000 ESP8266_RTOS_SDK/examples/get-started/hello_world/build/hello-world.bin 
0x8000 ESP8266_RTOS_SDK/examples/get-started/hello_world/build/partitions_singleapp.bin


这就准备好了要烧录到esp8266的bin文件

使用SDK 的make flash烧录板子

1,问题:A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
解决:使用win的烧写工具烧写
ESPFlashDownloadTool_v3.6.4.exe
链接:https://www.espressif.com/zh-hans/support/download/other-tools
然后按照 make all 中提示的文件和烧录地址

0x0 ESP8266_RTOS_SDK/examples/get-started/hello_world/build/bootloader/bootloader.bin
0x10000 ESP8266_RTOS_SDK/examples/get-started/hello_world/build/hello-world.bin 
0x8000 ESP8266_RTOS_SDK/examples/get-started/hello_world/build/partitions_singleapp.bin

在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值