ESP8266 RTOS

MSYS2安装python_Alex-Leung的博客-CSDN博客_msys2 python

 

pacman -S python
pacman -S python-pip
# 用于安装依赖,否则无法build
pacman -S gcc
# 不装这个,安装依赖还是会报错
pacman -S python-devel

fatal error: 'crypt.h' file not found

#include <crypt.h>

^~~~~~~~~

pacman -S libcrypt

pacman -S  libcrypt-devel 

pacman -S libffi

pacman -S libffi-devel

找到libcrypt-devel 和libffi-devel压缩包,把里面的头文件复制到usr对应路径

D:\msys32\home\Administrator\ESP8266_RTOS_SDK\.git\config

修改submodule地址改为github,

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
[remote "origin"]
	url = https://gitee.com/EspressifSystems/ESP8266_RTOS_SDK.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[submodule "components/json/cJSON"]
	active = true
	url = https://gitee.com/DaveGamble/cJSON.git
[submodule "components/lwip/lwip"]
	active = true
	url = https://github.com/espressif/esp-lwip.git
[submodule "components/coap/libcoap"]
	active = true
	url = https://github.com/obgm/libcoap.git
[submodule "components/mbedtls/mbedtls"]
	active = true
	url = https://github.com/espressif/mbedtls.git
[submodule "components/mqtt/esp-mqtt"]
	active = true
	url = https://github.com/espressif/esp-mqtt.git

否则报错:

remote: [session-e1492cb1] 404 not found!
fatal: repository 'https://gitee.com/ohmyzsh/ohmyzsh.git/espressif/esp-lwip.githttps://gitee.com/ohmyzsh/ohmyzsh.git/' not found
Error: git clone of esp-lwip repo failed

用make all -j6应该会快很多,相当于一次编译6个文件,CPU可以占满

make all应该很慢的,cpu只用了30%

========================================

同样是esp8266 sdk rtos,乐鑫官方的msys32开发环境和PlatformIO是不同的,

PlatformIO只有六个示例:

arduino-asyncudp
arduino-blink
arduino-webserver
arduino-wifiscan
esp8266-nonos-sdk-blink
esp8266-rtos-sdk-blink

想搞个OTA或者MQTT都没法抄,从msys32的库复制过来是不能直接用的,没有sdkconfig。

所以PlatformIO的ESP8266 SDK RTOS框架,资源非常少,大量功能要移植,几乎没法用20220929

VsCode里,用PlatformIO插件

 Could not find one of 'package.json' manifest files in the package

删除C:\Users\Administrator\.platformio\packages里没有package.json的文件夹

Platformio环境问题集-pudn.com

Platformio环境问题集

1. vscode loading tasks解决办法

Platformio环境问题集

1. vscode loading tasks解决办法

1.1 问题原因

这状态是,打开项目时,platformio会在vscode左上角创建一些基本任务,如编译构建上传监控之类在PROJECT TASKS栏目中。

鄙人遇到的一种原因是:这些任务依赖对应开发板的环境,因为某些不知名原因,需要重新下载,而国内下载这个环境一直阻塞,一直失败所以会卡住

vscode只有一个loading tasks我们无法掌控问题发生的细节,可以关掉vscode并使用命令行在项目所在目录执行

pio run -t build

关掉vscode才使得在vscode上的任务退出,而刚才执行的命令才能继续。

鄙人执行情况如下,就是编译的时候发现了esp32环境需要重新下载,然后卡住了。如果这个下载成功了,也许问题就解决了。

在这里插入图片描述

若pio命令找不到,说明没有将pio所在路径加入PATH变量中。可以按以下方法执行:

pio路径在 当前用户目录/.platformio/penv/Scripts/下,在linux终端和powershell可以使用~代替当前用户目录。

powershell

~\.platformio\penv\Scripts\pio run -t build

linux

~/.platformio/penv/Scripts/pio run -t build

windows cmd

C:\Users\这里换成你用户文件夹名称\.platformio\penv\Scripts\pio run -t build

当然把那个目录加入PATH也是可以的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值