<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      WSL2搭建基于Docker的ESP32開發環境

      WSL2 安裝

      sudo apt install esptool
      sudo apt install linux-tools-generic hwdata
      sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/*-generic/usbip 20
      

      Docker安裝和配置

      一鍵安裝腳本

      curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
      

      配置

      cat /etc/docker/daemon.json
      {
        "registry-mirrors" : ["https://docker.registry.cyou",
      	"https://docker-cf.registry.cyou",
      	"https://dockercf.jsdelivr.fyi",
      	"https://docker.jsdelivr.fyi",
      	"https://dockertest.jsdelivr.fyi",
      	"https://mirror.aliyuncs.com",
      	"https://dockerproxy.com",
      	"https://mirror.baidubce.com",
      	"https://docker.m.daocloud.io",
      	"https://docker.nju.edu.cn",
      	"https://docker.mirrors.sjtug.sjtu.edu.cn",
      	"https://docker.mirrors.ustc.edu.cn",
      	"https://mirror.iscas.ac.cn",
      	"https://docker.rainbond.cc",
      	"https://do.nark.eu.org",
      	"https://dc.j8.work",
      	"https://dockerproxy.com",
      	"https://gst6rzl9.mirror.aliyuncs.com",
      	"https://registry.docker-cn.com",
      	"http://hub-mirror.c.163.com",
      	"http://mirrors.ustc.edu.cn/",
      	"https://mirrors.tuna.tsinghua.edu.cn/",
      	"http://mirrors.sohu.com/"
      	],
      	 "insecure-registries" : [
      	    "registry.docker-cn.com",
      	    "docker.mirrors.ustc.edu.cn"
      	    ],
      	"debug": true,
      	"experimental": false
      }
      
      sudo systemctl daemon-reload
      sudo systemctl restart docker
      

      測試Docker

      sudo docker pull hello-world
      Using default tag: latest
      
      
      latest: Pulling from library/hello-world
      Digest: sha256:ec153840d1e635ac434fab5e377081f17e0e15afab27beb3f726c3265039cfff
      Status: Image is up to date for hello-world:latest
      docker.io/library/hello-world:latest
      
      sudo docker run hello-world
      [sudo] password for cmf:
      
      Hello from Docker!
      This message shows that your installation appears to be working correctly.
      
      To generate this message, Docker took the following steps:
       1. The Docker client contacted the Docker daemon.
       2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
          (amd64)
       3. The Docker daemon created a new container from that image which runs the
          executable that produces the output you are currently reading.
       4. The Docker daemon streamed that output to the Docker client, which sent it
          to your terminal.
      
      To try something more ambitious, you can run an Ubuntu container with:
       $ docker run -it ubuntu bash
      
      Share images, automate workflows, and more with a free Docker ID:
       https://hub.docker.com/
      
      For more examples and ideas, visit:
       https://docs.docker.com/get-started/
      

      設置以非 root 用戶身份管理 Docker

      創建docker組。

      sudo groupadd docker
      

      將您的用戶添加到docker組。

       sudo usermod -aG docker $USER
      

      注銷并重新登錄WSL2,在Windows Cmd下執行。

      wsl --shutdown
      

      還可以運行以下命令來激活對組的更改:

       newgrp docker
      

      驗證是否可以在沒有sudo的情況下運行命令。

      docker run hello-world
      
      Hello from Docker!
      This message shows that your installation appears to be working correctly.
      
      To generate this message, Docker took the following steps:
       1. The Docker client contacted the Docker daemon.
       2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
          (amd64)
       3. The Docker daemon created a new container from that image which runs the
          executable that produces the output you are currently reading.
       4. The Docker daemon streamed that output to the Docker client, which sent it
          to your terminal.
      
      To try something more ambitious, you can run an Ubuntu container with:
       $ docker run -it ubuntu bash
      
      Share images, automate workflows, and more with a free Docker ID:
       https://hub.docker.com/
      
      For more examples and ideas, visit:
       https://docs.docker.com/get-started/
      

      拉取Docker鏡像

      cat docker-compose.yml
      version: "3.8"
      
      services:
        esp-idf:
          image: espressif/idf
          container_name: esp-idf-builder
          working_dir: /project
          volumes:
            - .:/project
          environment:
            - HOME=/tmp
            - IDF_GIT_SAFE_DIR=/project
          tty: true
          stdin_open: true
      
      docker compose up
      

      VsCode

      需要安裝的插件

      • Dev Containers
      • Remote Development
      • ESP-IDF

      Code

      git clone https://github.com/espressif/esp-idf.git
      

      使用hello_world為示例工程

      cp -rf esp-idf/examples/get-started/hello_world .
      

      使用vscode打開hello_world工程

      cd hello_world
      code .
      

      在VsCode的菜單欄選擇 查看 > 命令面板,在彈出的對話框中輸入ESP-IDF: Add docker container configuration。
      然后當前項目的 .devcontainer 文件夾就會自動生成了。下一步在點擊左下角的連接->在容器中重新打開。
      在這里插入圖片描述
      在這里插入圖片描述

      在 Docker 容器中使用外部 USB 轉串口設備

      Windows中下載并安裝usbipd-win工具
      在這里插入圖片描述
      在這里插入圖片描述dmesg可以看到wsl2中已經識別到了一個ttyACM0,這時我們在回到VsCode。
      在這里插入圖片描述
      在下面一行配置中,串口配置端口就選擇ttyACM0,設備目標自行根據開發板選擇,然后就可以點擊Build Project,看我這里編譯成功了!
      接下載再試試燒錄。
      在這里插入圖片描述
      我選擇的用UART燒錄,看打印信息是燒錄成功了,具體我們點擊Monitor Devict試下。
      在這里插入圖片描述
      優雅!

      參考資料

      posted @ 2025-07-30 23:14  放飛夢想C  閱讀(165)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 国产精品一区二区三区卡| аⅴ天堂中文在线网| 国产偷人爽久久久久久老妇app| 亚洲欧洲精品成人久久曰| 精品无码国产日韩制服丝袜| 天堂V亚洲国产V第一次| 中文日产幕无线码一区中文 | 亚洲日韩AV秘 无码一区二区| 风韵丰满妇啪啪区老老熟女杏吧| 亚洲区小说区图片区qvod| 激情亚洲内射一区二区三区| 四虎库影成人在线播放| 国产成人无码A区在线观| 亚洲制服无码一区二区三区| 国产精品制服丝袜无码| 国产成人高清亚洲一区二区| 在线观看免费人成视频色9| 人人妻人人澡人人爽| 99久久亚洲综合精品成人网| 亚洲AV国产福利精品在现观看| 欧美日本激情| 亚洲男人天堂av在线| 欧美国产精品啪啪| 国产一级r片内射免费视频| 九九久久精品国产| 深夜精品免费在线观看| 成人免费视频一区二区三区| 国产欧美另类精品久久久 | 97色伦97色伦国产| 久久99精品国产麻豆宅宅| 精品免费看国产一区二区| 宜城市| 亚洲日本一区二区三区在线播放| 中文字幕无码不卡免费视频| 日本午夜精品一区二区三区电影| 一区二区在线观看 激情| 高清精品视频一区二区三区| 亚洲人妻一区二区精品| 乐安县| 性色在线视频精品| 欧美一区二区三区在线观看|