# LingEsp8266 **Repository Path**: pingtangnee/ling-esp8266 ## Basic Information - **Project Name**: LingEsp8266 - **Description**: 开发板:esp-12-f 开发环境 先arduino 和下载esp8266 core 记录开发过程和问题 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-29 - **Last Updated**: 2025-01-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LingEsp8266 #### 介绍 开发板:esp-12-f 开发环境 先arduino 和下载esp8266 core 记录开发过程和问题 ----- #### 硬件架构 ##### 概要 ![输入图片说明](screenshot-arduino-esp8266.readthedocs.io-2024.09.29-19_36_41.png) 部件 一块esp-12-f 和 usb烧写板,三线连接GND ,RXD ,TXD 买的烧写板的TXD和RXD 相反。 ##### 上电(原厂固件) ``` 2nd boot version : 1.7(5d6f877) SPI Speed : 40MHz SPI Mode : DOUT SPI Flash Size & Map: 8Mbit(512KB+512KB) jump to run user1 @ 1000 V2 Mo ,??rf cal sector: 251 freq trace enable 0 rf[112] : 00 rf[113] : 00 rf[114] : 01 SDK ver: 3.0.5-dev(52383f9) compiled @ Jul 8 2020 16:00:05 phy ver: 1156_0, pp ver: 10.2 ``` ``` --------设置波特率115200--------- Ai-Thinker Technology Co. Ltd. ready ``` ##### 测试无线透传 pc连接esp的热点wifi,TCP调试工具 ------ #### 软件架构 ##### 1.开发环境搭建 **选择windows 10 下编译** > (不用arduino本身的开发管理器),因为不容易下载 按照下面步骤,没用 git,直接去下载*.zip. 使用arduino-3.1.2.zip ``` Instructions - Windows 10 First, make sure you don’t already have an ESP8266 core version installed using the Board Manager (see above). If you do, uninstall it from the Board Manager before proceeding. It is also advisable to erase the Arduino15 contents. Install git for Windows (if not already; see https://git-scm.com/download/win) Open a command prompt (cmd) and go to Arduino default directory. This is typically the sketchbook directory (usually C:\users\{username}\Documents\Arduino where the environment variable %USERPROFILE% usually contains C:\users\{username}) Clone this repository into hardware/esp8266com/esp8266 directory. cd %USERPROFILE%\Documents\Arduino\ if not exist hardware mkdir hardware cd hardware if not exist esp8266com mkdir esp8266com cd esp8266com git clone https://github.com/esp8266/Arduino.git esp8266 You should end up with the following directory structure in C:\Users\{your username}\Documents\ Arduino | --- libraries --- hardware | --- esp8266com | --- esp8266 | --- bootloaders --- cores --- doc --- libraries --- package --- tests --- tools --- variants --- platform.txt --- programmers.txt --- README.md --- boards.txt --- LICENSE Initialize the submodules cd %USERPROFILE%\Documents\Arduino\hardware\esp8266com\esp8266 git submodule update --init If error messages about missing files related to SoftwareSerial are encountered during the build process, it should be because this step was missed and is required. Download binary tools cd tools python3 get.py Restart Arduino If using the Arduino IDE for Visual Studio (https://www.visualmicro.com/), be sure to click Tools - Visual Micro - Rescan Toolchains and Libraries When later updating your local library, goto the esp8266 directory and do a git pull cd %USERPROFILE%\Documents\Arduino\hardware\esp8266com\esp8266 git status git pull Note that you could, in theory install in C:\Program Files (x86)\Arduino\hardware however this has security implications, not to mention the directory often gets blown away when re-installing Arduino IDE. It does have the benefit (or drawback, depending on your perspective) - of being available to all users on your PC that use Arduino. ``` 说明一下, (a) esp8266 的源码放在arduino中,arduino中工具栏-开发板-esp8266 的选项 (b) python3 get.py 下载tooschain 和 python3.7 (c) 没用git submodule update --init ,直接下载里面的包,放到指定目录 ##### 2.编译和上传 重新打开arduino 工具-esp8266(3.1.2)- ESPino 编译 ##### 3.样例程序 (1) GPIO 读写 和 串口读写 ------ #### 问题 ##### 1.关于开发环境搭建的问题 ###### (a). python3 get.py 下载太慢 下载地址: https://github.com/earlephilhower/esp-quick-toolchain/releases/ 下载合适版本查看下面 C:\Arduino\hardware\esp8266com\esp8266\package\package_esp8266com_index.template.json 根据上面的json 下载四个文件 > ESP8266 Quick Toolchain for 3.1.0-gcc10.3 下: ``` python3-3.7.2.post1-embed-win32v2a (2).zip x86_64-w64-mingw32.esptool-f80ae31.220621.zip 19.3 KB Jun 22, 2022 x86_64-w64-mingw32.mklittlefs-30b7fc1.220621.zip 339 KB Jun 22, 2022 x86_64-w64-mingw32.mkspiffs-7fefeac.220621.zip 342 KB Jun 22, 2022 x86_64-w64-mingw32.xtensa-lx106-elf-e5f9fec.220621.zip ``` ###### (b). git submodle init 问题直接下载*.zip 太慢 手动下载 最好下载3.0,存放指定的文件夹中 ``` [submodule "lwip2"] path = tools/sdk/lwip2/builder url = https://github.com/d-a-v/esp82xx-nonos-linklayer.git [submodule "tools/sdk/ssl/bearssl"] path = tools/sdk/ssl/bearssl url = git clone https://github.com/earlephilhower/bearssl-esp8266.git [submodule "libraries/SoftwareSerial"] path = libraries/SoftwareSerial url = git clone https://github.com/plerup/espsoftwareserial.git [submodule "libraries/LittleFS/lib/littlefs"] path = libraries/LittleFS/lib/littlefs url = git clone https://github.com/ARMmbed/littlefs.git [submodule "libraries/ESP8266SdFat"] path = libraries/ESP8266SdFat url = git clone https://github.com/earlephilhower/ESP8266SdFat.git [submodule "tools/pyserial"] path = tools/pyserial url = git clone https://github.com/pyserial/pyserial.git [submodule "tools/esptool"] path = tools/esptool url = git clone https://github.com/espressif/esptool.git [submodule "libraries/Ethernet"] path = libraries/Ethernet url = git clone https://github.com/arduino-libraries/Ethernet.git [submodule "tools/sdk/uzlib"] path = tools/sdk/uzlib url = git clone https://github.com/pfalcon/uzlib.git ``` ##### 2. 关于编译和烧写的问题 烧写中上传问题 pyserial or esptool directories not found next to this upload.py tool 更换esptool > Download https://github.com/espressif/esptool/archive/v3.0.zip > Download https://github.com/pyserial/pyserial/archive/v3.4.zip 2. xxxx 3. xxxx #### 使用说明 1. xxxx 2. xxxx 3. xxxx