使用windows自带linux子系统开发esp32
步骤:
1.打开windows商店,搜索ubuntu,安装18.04版本。
2.控制面板 /程序和功能 /打开或关闭windows功能

3.关机重启
4.打开刚安装得ubuntu,设置用户名和密码。
5.更换为清华源,以提高安装软件得数据。https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
Ubuntu 的软件源配置文件是 /etc/apt/sources.list。将系统自带的该文件做个备份,将该文件替换为下面内容,即可使用 TUNA 的软件源镜像。
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
sudo apt-get update 更新源sudo apt-get upgrade 更新软件
6.新建esp目录
cd ~
mkdir esp
7.将下载好的esp-idf复制到linux,windows得盘符在目录 /mnt/c d ...等
blue@%#*¥&#%¥&6$:~/esp/esp-idf$ cp /mnt/d/esp32/esp-idf-v4.0.zip .
8.安装unzip解压软件并解压,更名
sudo apt install unzip
unzip esp-idf-v4.0.zip
mv esp-idf-v4.0 esp-idf
9.安装所需得软件包
sudo apt-get install git wget flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache libffi-dev libssl-dev
10.继续安装
sudo apt-get install gawk gperf grep gettext libncurses-dev python python-dev automake bison flex texinfo help2man libtool make
11.安装解压好的esp-idf
cd ~/esp/esp-idf
sh install.sh
12.设置环境变量
刚才安装的xtensa-esp32-elf在目录 ~/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf
在 ~/.barchrc中,将工具和esp-idf添加到PATH中
cd ~
vi .barhrc
在最后添加:
export PATH="$HOME/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin:$PATH"
export IDF_PATH="$HOME/esp/esp-idf"
:wq 保存退出
exit 推出终端,并重新打开,让PATH生效。
13.拷贝hello_world测试
cd ~/esp
cp -r esp-idf/examples/get-started/hello_world/ .
make
14.推荐一个比较好用的 终端Windows Terminal,可在商店获取,输入bash即可启动 linux,如下:

15.配合 vscode使用,可安装WSL插件,可通过该插件通过linux编译本地项目,vscode的默认终端改为wsl.exe。
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\wsl.exe",

使用windows自带linux子系统开发esp32的更多相关文章
- WSL(Windows上的Linux子系统)
WSL(Windows上的Linux子系统) WSL,Windows Subsystem for Linux,就是之前的Bash on [Ubuntu on] Windows(嗯,微软改名部KPI++ ...
- Windows 10 下 Linux 子系统的安装和使用
介绍 适用于 Windows 的 Linux 子系统(英语:Windows Subsystem for Linux,简称 WSL)是一个为在 Windows 10 和 Windows Server 2 ...
- Windows下的Linux子系统安装,WSL 2下配置docker
Windows下的Linux子系统安装,WSL 2下配置docker 前提条件: 安装WSL 2需要Windows 10版本是Build 18917或更高,首先先确认系统版本已升级. 在“启用或关闭W ...
- 在Windows下配置Linux远程开发环境
在Windows下配置Linux远程开发环境 欢迎光临我的个人博客 https://source.chens.life/Configure-Linux-remote-development-envir ...
- windows 下使用Linux子系统
在 Windows 上进行 web 开发,比较普遍的方案是使用 phpstudy 或者别的一些集成环境软件进行环境搭建,写好代码后将代码上传至版本管理工具 git/svn,再将代码同步到 Linux ...
- 关于WSL(Windows上的Linux子系统)的介绍
WSL,Windows Subsystem for Linux,就是之前的Bash on [Ubuntu on] Windows(嗯,微软改名部KPI++ 首先要说一句,其实Windows 10在一周 ...
- 关于WSL(Windows上的Linux子系统)的简单介绍及安装
WSL,Windows Subsystem for Linux,就是之前的Bash on [Ubuntu on] Windows(嗯,微软改名部KPI++),在wsl环境下我们可以运行一些Linux程 ...
- Windows下的Linux子系统
强调!!!必须是Windows专业版!!! 一.安装运行过程 第一步:打开开发人员模式 第二步:进入 '控制面板 '--'程序'--'启用的Windows功能'--勾选Linux子系统(根据提示进行重 ...
- WSL2:Windows 亲生的 Linux 子系统
作 者:道哥,10+年的嵌入式开发老兵. 公众号:[IOT物联网小镇],专注于:C/C++.Linux操作系统.应用程序设计.物联网.单片机和嵌入式开发等领域. 公众号回复[书籍],获取 Linux. ...
随机推荐
- Vue 之 浏览本地图片功能
template <input type="file" ref="input_file" @change="fileChange" ...
- CKKS Part2: CKKS的编码和解码
该文章翻译自CKKS EXPLAINED, PART 2: FULL ENCODING AND DECODING,主要介绍CKKS方案中是如何编码和解码的(如何将复数向量转成整数多项式,以及如何求逆运 ...
- AT2645 [ARC076D] Exhausted?
解法一 引理:令一个二分图两部分别为 \(X, Y(|X| \le |Y|)\),若其存在完美匹配当且仅当 \(\forall S \subseteq X, f(S) \ge |S|\)(其中 \(f ...
- CF388C Fox and Card Game
基于观察可以发现,双方都一定能保证取到每一列靠近自己的 \(\lfloor \frac{k}{2} \rfloor\) 个元素. 那么一旦一个人想要取另一个人能必然能取的部分,另一个人必然可以不让其取 ...
- Gitee 自已提交的代码提交人头像为他人、码云上独自开发的项目显示为 2 个开发者
简介 自己写的代码提交到码云(Gitee)上却变成了两个人,一个被正确的代码提交统计了,另一个却没有,并且确信自己输入的Gitee账号是自己绑定的邮箱,具体如下: 解决办法 查看自己的用户名 git ...
- SpringBoot集成AOP
AOP简介 面向切面编程,通过预编译方式和运行期动态代理实现程序功能的统一维护的一种技术,AOP是OOP的延续.简单的说它就是把我们程序重复的代码抽取出来,在需要执行的时候,使用动态代理技术,在不修改 ...
- JVM学习一:常用JVM配置参数
原文链接:https://www.cnblogs.com/pony1223/p/8661219.html 在IDE的后台打印GC日志: 既然学习JVM,阅读GC日志是处理Java虚拟机内存问题的基础技 ...
- Media Player播放
转载请注明来源:https://www.cnblogs.com/hookjc/ <object id="player" height="64" width ...
- ORM要用到的数组转对象和对象转数组函数
<?php function array2object($array) { if (is_array($array)) { $obj = new StdClass(); foreach ($ar ...
- undefined index: php中提示Undefined ...
我们经常接收表单POST过来的数据时报Undefined index错误,如下:$act=$_POST['action'];用以上代码总是提示Notice: Undefined index: act ...