步骤:

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的更多相关文章

  1. WSL(Windows上的Linux子系统)

    WSL(Windows上的Linux子系统) WSL,Windows Subsystem for Linux,就是之前的Bash on [Ubuntu on] Windows(嗯,微软改名部KPI++ ...

  2. Windows 10 下 Linux 子系统的安装和使用

    介绍 适用于 Windows 的 Linux 子系统(英语:Windows Subsystem for Linux,简称 WSL)是一个为在 Windows 10 和 Windows Server 2 ...

  3. Windows下的Linux子系统安装,WSL 2下配置docker

    Windows下的Linux子系统安装,WSL 2下配置docker 前提条件: 安装WSL 2需要Windows 10版本是Build 18917或更高,首先先确认系统版本已升级. 在“启用或关闭W ...

  4. 在Windows下配置Linux远程开发环境

    在Windows下配置Linux远程开发环境 欢迎光临我的个人博客 https://source.chens.life/Configure-Linux-remote-development-envir ...

  5. windows 下使用Linux子系统

     在 Windows 上进行 web 开发,比较普遍的方案是使用 phpstudy 或者别的一些集成环境软件进行环境搭建,写好代码后将代码上传至版本管理工具 git/svn,再将代码同步到 Linux ...

  6. 关于WSL(Windows上的Linux子系统)的介绍

    WSL,Windows Subsystem for Linux,就是之前的Bash on [Ubuntu on] Windows(嗯,微软改名部KPI++ 首先要说一句,其实Windows 10在一周 ...

  7. 关于WSL(Windows上的Linux子系统)的简单介绍及安装

    WSL,Windows Subsystem for Linux,就是之前的Bash on [Ubuntu on] Windows(嗯,微软改名部KPI++),在wsl环境下我们可以运行一些Linux程 ...

  8. Windows下的Linux子系统

    强调!!!必须是Windows专业版!!! 一.安装运行过程 第一步:打开开发人员模式 第二步:进入 '控制面板 '--'程序'--'启用的Windows功能'--勾选Linux子系统(根据提示进行重 ...

  9. WSL2:Windows 亲生的 Linux 子系统

    作 者:道哥,10+年的嵌入式开发老兵. 公众号:[IOT物联网小镇],专注于:C/C++.Linux操作系统.应用程序设计.物联网.单片机和嵌入式开发等领域. 公众号回复[书籍],获取 Linux. ...

随机推荐

  1. lambda表达式的学习

    Lambda表达式 为什么使用lambda表达式 Lambda表达式可以简化我们的代码,使我们只需要关注主要的代码就可以. //测试用的实体类 public class Employee { priv ...

  2. jsp 中 include指令 用法, <%@ include file="..."%> 和 <jsp:include page="..." flush="true" />的区别?

    原文链接https://blog.csdn.net/u012187452/article/details/51779052 1. 什么是jsp 文件? 个人理解.  jsp 是一个容器,可以将我们编写 ...

  3. Arduino+ESP32 之 驱动GC9A01圆形LCD(二),移植LVGL,跑示例程序,显示自制图片

    在前文Arduino+ESP32 之 驱动GC9A01圆形LCD(一), 我们已经移植好了arduino GFX库, 该库的示例程序内,还有LVGL的示例程序哦. arduino环境下移植lvgl是很 ...

  4. 深入聊一下const关键字

    const是一个C语言的关键字,它限定一个变量不允许被改变.使用const在一定程序上可以提高程序的健壮性,另外,在观看别人代码的时候,清晰理解const所起的作用,对理解别人的程序有所帮助. 1.c ...

  5. laravel 依赖注入 接口设计

    假设我现在需要做一个支付服务,那么我先设计一个接口 interface PayInterface{ public function pay(Order $order) : string; } 然后实现 ...

  6. 读取.properties配置文件的方式

    一.Properties类解读: 1.Properties类本质其实还是HashTabe,及底层的实现是HashTable public class Properties extends Hashta ...

  7. 有关MVC设计模式 #DF

    模型(Model).视图(View).控制器(Controller) -- MVC是 Cocoa 中的一种行为模块,并且也是所有 Cocoa 设计模式中使用最多的.在程序中按照它们的角色来分类这些对象 ...

  8. HTML与HTTP协议

    HTML与HTTP协议 目录 HTML与HTTP协议 一.HTML 1. HTML概述 2. HTML编辑 3. HTML语法规则 4. HTML文件结构 5. HTML基本标签 (1)头标签中常用标 ...

  9. 统计学习:逻辑回归与交叉熵损失(Pytorch实现)

    1. Logistic 分布和对率回归 监督学习的模型可以是概率模型或非概率模型,由条件概率分布\(P(Y|\bm{X})\)或决 策函数(decision function)\(Y=f(\bm{X} ...

  10. Lesson10——NumPy 迭代数组

    NumPy 教程目录 NumPy 迭代数组 NumPy 迭代器对象  numpy.nditer  提供了一种灵活访问一个或者多个数组元素的方式. 迭代器最基本的任务的可以完成对数组元素的访问. Exa ...