使用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. ...
随机推荐
- DESUtil
package com.tebon.ams.util;import sun.misc.BASE64Decoder;import javax.crypto.Cipher;import javax.cry ...
- JS创建快捷方式
转载请注明来源:https://www.cnblogs.com/hookjc/ <script type="text/javascript" language="j ...
- Ubuntu下Java JDK安装
1.仓库安装 待更新 2.手动安装 1.下载linux平台sdk. 官网:https://www.oracle.com/technetwork/java/javase/downloads/index. ...
- 计算机的网络参考模型与5G协议
计算机的网络参考模型与5G协议 1 分层思想 2 OSI参考模型 3 TCP/IP 协议族的组成 4 数据的封装与解封 5 层间通讯过程 6 空口协议 1.喝可乐的人不一定知道其生产的过 ...
- yum本地源仓库安装报错 被锁定如何解决?
yum安装报错被锁定如何解决 上图!!!!!如图的报错 解决方法: 是不是很简单 智商在地上摩擦~~~
- pytorch学习
1 torch.hub torch.hub是一个包含计算机视觉和自然语言处理领域的诸多经典模型调用中心API 我没有运行成功代码 https://blog.csdn.net/qq_38410428/a ...
- Eclipse、MyEclipse中代码提示框颜色
Matching breackets highlight = 匹配括号突出显示 Completion proposal background = 提示框背景色 Completion proposal ...
- Linux性能优化实战(二)
一.CPU使用率过高 1,CPU使用率 a>节拍率 为了维护CPU时间,Linux通过事先定义的节拍率(内核中表示为HZ),触发时间中断,并使用全局变量Jiffies记录开机以来的节拍数.每发生 ...
- 2、Golang基础--包的使用、if-else语句、循环、switch语句、数组、切片、可变函数参数、map类型
1 包的使用 // 为了便于组织代码,同一种类型的代码,写在同一个包下,便于管理 // 定义包 -新建一个文件夹 -内部有很多go文件 -在每个go文件的第一行,都要声明包名,并且包名必须一致 -在一 ...
- iptTable规范
规范之HTML 先在当前页面放入几个表格设置按钮的html(样式可能需重新调整) <div class="bottom_nav1 ta_l" style="padd ...