Skip to the content
2 layers40 × 20 mmESP8266, the printed circuit board in 3D

CMSIS-DAP compatible wireless debugger for ESP8266/ESP32/ESP32C3/ESP32S3. Optional 40MHz SPI acceleration, etc. 适配多种ESP芯片的无线调试器

Size
40 × 20 mm
Copper layers
2
Thickness
1.6 mm
Parts
39
Nets
42
Pads
152
Tracks, vias
268, 75
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
4 Feb 2020
Updated
24 Oct 2026

Overview

ESP8266 is an open-source printed circuit board by windowsair, from the windowsair/wireless-esp8266-dap repository on GitHub, published under the MIT licence. It is a 2-layer board of 40 × 20 mm with 39 parts on 42 nets, routed with 268 tracks and 75 vias.

It is built around the CH330N and ESP8266EX. Its parts include 17 capacitors, 10 resistors, 4 ICs, 2 connectors and 2 switches. It belongs with the radio and wireless boards and the ESP32, ESP8266 and RISC-V boards of this library.

Main components

2

README

README.md

image

Build Status master  Build Status develop

 PRs Welcome %e2%9d%a4

中文

Introduce

Wireless debugging with only one ESP Chip !

Realized by USBIP and CMSIS-DAP protocol stack.

👉 5m range, 100kb size firmware(Hex) earse and download test:


For Keil users, we now also support elaphureLink. No need for usbip to start your wireless debugging!

Feature

  1. SoC Compatibility

    • ESP8266/8285
    • ESP32
    • ESP32C3
    • ESP32S3
  2. Debug Communication Mode

    • SWD
    • JTAG
  3. USB Communication Mode

    • USB-HID
    • WCID & WinUSB (Default)
  4. Debug Trace (Uart)

    • Uart TCP Bridge
  5. More..

    • SWD protocol based on SPI acceleration (Up to 40MHz)
    • Support for elaphureLink, fast Keil debug without drivers
    • Support for elaphure-dap.js, online ARM Cortex-M firmware flash
    • Support for OpenOCD-elaphureLink, Get rid of USBIP!
    • Support for OpenOCD/pyOCD
    • ...

Link your board

WIFI

The default connected WIFI SSID is DAP or OTA , password 12345678

Support for specifying multiple possible WAP. It can be added here: wifi_configuration.h

You can also specify your IP in the above file (We recommend using the static address binding feature of the router).

WIFI

There is built-in ipv4 only mDNS server. You can access the device using dap.local.

The mDNS in ESP8266 only supports ipv4.

mDNS

Debugger

ESP8266
SWD
SWCLKGPIO14
SWDIOGPIO13
TVCC3V3
GNDGND

JTAG
TCKGPIO14
TMSGPIO13
TDIGPIO4
TDOGPIO16
nTRST (optional)GPIO0*
nRESETGPIO5
TVCC3V3
GNDGND

Other
LED_WIFI_STATUSGPIO15
TxGPIO2
RxGPIO3 (U0RXD)

Rx and Tx is used for uart bridge, not enabled by default.

ESP32
SWD
SWCLKGPIO14
SWDIOGPIO13
TVCC3V3
GNDGND

JTAG
TCKGPIO14
TMSGPIO13
TDIGPIO18
TDOGPIO19
nTRST (optional)GPIO25
nRESETGPIO26
TVCC3V3
GNDGND

Other
LED_WIFI_STATUSGPIO27
TxGPIO23
RxGPIO22

Rx and Tx is used for uart bridge, not enabled by default.

ESP32C3
SWD
SWCLKGPIO6
SWDIOGPIO7
TVCC3V3
GNDGND

JTAG
TCKGPIO6
TMSGPIO7
TDIGPIO9
TDOGPIO8
nTRST (optional)GPIO4
nRESETGPIO5
TVCC3V3
GNDGND

Other
LED_WIFI_STATUSGPIO10
TxGPIO19
RxGPIO18

Rx and Tx is used for uart bridge, not enabled by default.

ESP32S3
SWD
SWCLKGPIO12
SWDIOGPIO11
TVCC3V3
GNDGND

JTAG
TCKGPIO12
TMSGPIO11
TDIGPIO10
TDOGPIO9
nTRST (optional)GPIO14
nRESETGPIO13
TVCC3V3
GNDGND

Hardware Reference

Only a hardware reference for the ESP8266 is currently available.

Here we provide a simple example for reference:

sch

Alternatively, you can connect directly with wires as we gave at the beginning, without additional circuits.

In addition, a complete hardware reference design is available from contributors, see circuit


Build And Flash

You can build locally or use Github Action to build online and then download firmware to flash.

Build with Github Action Online

See: Build with Github Action

General build and Flash

ESP8266
  1. Get ESP8266 RTOS Software Development Kit

    The SDK is already included in the project. Please don't use other versions of the SDK.

  2. Build & Flash

    Build with ESP-IDF build system. More information can be found at the following link: Build System

The following example shows a possible way to build on Windows:

bash
# Build
python ./idf.py build
# Flash
python ./idf.py -p /dev/ttyS5 flash
ESP32/ESP32C3
  1. Get esp-idf

    For now, please use esp-idf v6.1 : https://github.com/espressif/esp-idf/releases/tag/v6.1

  2. Build & Flash

    Build with ESP-IDF build system. More information can be found at the following link: Build System

The following example shows a possible way to build:

bash
# Set build target
idf.py set-target esp32
# Build
idf.py build
# Flash
idf.py -p /dev/ttyS5 flash

The idf.py in the project root directory is only applicable to the old ESP8266 target. Don't use it in ESP32.

We also provided sample firmware for quick evaluation. See Releases

Usage

  1. Get USBIP project
  • Windows: usbip-win .
  • Linux: Distributed as part of the Linux kernel, but we have not yet tested on Linux platform, and the following instructions are all under Windows platform.
  1. Start ESP chip and connect it to the device to be debugged

  2. Connect it with usbip:

bash
# HID Mode only
# for pre-compiled version on SourceForge
# or usbip old version
.\usbip.exe -D -a <your-esp-device-ip-address>  1-1

# 👉 Recommend
# HID Mode Or WinUSB Mode
# for usbip-win 0.3.0 kmdf ude
.\usbip.exe attach_ude -r <your-esp-device-ip-address> -b 1-1

If all goes well, you should see your device connected.

image

Here, we use MDK for testing:

target


FAQ

Keil is showing a "RDDI-DAP ERROR" or "SWD/JTAG Communication Failure" message.

  1. Check your line connection. Don't forget the 3v3 connection cable.
  2. Check that your network connection is stable.

DAP is slow or often abnormal.

Note that this project is sensitive to the network environment. If you are using a hotspot on your computer, you can try using network analyzer such as wireshark to observe the status of your AP network. During the idle time, the network should stay silent, while in the working state, there should be no too much packet loss.

Some LAN broadcast packets can cause serious impact, including:

  • DropBox LAN Sync
  • Logitech Arx Control
  • ...

For ESP8266, this is not far from UDP FLOOD...😰

It is also affected by the surrounding radio environment, your AP situation (some NICs have terrible AP performance), distance, etc.


Document

Speed Strategy

The maximum rate of esp8266 pure IO is about 2MHz. When you select max clock, we will take the following actions:

  • clock < 2Mhz : Similar to the clock speed you choose.
  • 2MHz <= clock < 10MHz : Use the fastest pure IO speed.
  • clock >= 10MHz : SPI acceleration using 40MHz clock.

Note that the most significant speed constraint of this project is still the TCP connection speed.

For OpenOCD user

This project was originally designed to run on Keil, but now you can also perform firmware flash on OpenOCD.

bash
> halt
> flash write_image [erase] [unlock] filename [offset] [type]

pyOCD is now supported.

System OTA

When this project is updated, you can update the firmware over the air.

Visit the following website for OTA operations: online OTA

For most devices, you don't need to care about flash size. However, improper setting of the flash size may cause the OTA to fail. In this case, please change the flash size with idf.py menuconfig, or modify sdkconfig:

text
# Choose a flash size.
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y

# Then set a flash size
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"

If flash size is 2MB, the sdkconfig file might look like this:

text
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"

For devices with 1MB flash size such as ESP8285, the following changes must be made:

text
CONFIG_PARTITION_TABLE_FILENAME="partitions_two_ota.1MB.csv"
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="1MB"
CONFIG_ESP8266_BOOT_COPY_APP=y

The flash size of the board can be checked with the esptool.py tool:

bash
esptool.py -p (PORT) flash_id

Uart TCP Bridge

This feature provides a bridge between TCP and Uart:

text
Send data   ->  TCP  ->  Uart TX -> external devices

Recv data   <-  TCP  <-  Uart Rx <- external devices

uart_tcp_bridge

When the TCP connection is established, bridge will try to resolve the text sent for the first packet. When the text is a valid baud rate, bridge will switch to it. For example, sending the ASCII text 115200 will switch the baud rate to 115200.

For performance reasons, this feature is not enabled by default. You can modify wifi_configuration.h to turn it on.

elaphure-dap.js

For the ESP8266, this feature is turned off by default. You can turn it on in menuconfig:

text
CONFIG_USE_WEBSOCKET_DAP=y

Develop

Check other branches to know the latest development progress.

Any kind of contribute is welcome, including but not limited to new features, ideas about circuits, documentation.

You can also ask questions to make this project better.

Issue

2020.12.1

TCP transmission speed needs to be further improved.

2020.11.11

Winusb is now available, but it is very slow.

2020.2.4

Due to the limitation of USB-HID (I'm not sure if this is a problem with USBIP or Windows), now each URB packet can only reach 255 bytes (About 1MBps bandwidth), which has not reached the upper limit of ESP8266 transmission bandwidth.

I now have an idea to construct a Man-in-the-middle between the two to forward traffic, thereby increasing the bandwidth of each transmission.

2020.1.31

At present, the adaptation to WCID, WinUSB, etc. has all been completed. However, when transmitting data on the endpoint, we received an error message from USBIP. This is most likely a problem with the USBIP project itself.

Due to the completeness of the USBIP protocol document, we have not yet understood its role in the Bulk transmission process, which may also lead to errors in subsequent processes.

We will continue to try to make it work on USB HID. Once the USBIP problem is solved, we will immediately transfer it to work on WinUSB


Credit

Credits to the following project, people and organizations:

License

MIT LICENSE

Parts

39
QtyValueFootprintReferences
11100nFCapacitor_SMD:C_0603_1608MetricC3, C5, C6, C8, C9, C12, C13, C14, C15, C16, C17
610kRResistor_SMD:R_0603_1608MetricR2, R4, R5, R6, R9, R10
218pFCapacitor_SMD:C_0603_1608MetricC10, C11
2SW_DIP_x01Button_Switch_SMD:SW_Push_SPST_NO_Alps_SKRKK1, K2
110uFCapacitor_SMD:C_0603_1608MetricC1
112kRResistor_SMD:R_0603_1608MetricR3
11kRResistor_SMD:R_0603_1608MetricR1
11uFCapacitor_SMD:C_0603_1608MetricC4
12.2nHInductor_SMD:L_0603_1608MetricL1
12.4pFCapacitor_SMD:C_0603_1608MetricC2
1200RResistor_SMD:R_0603_1608MetricR7
126MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
13.0pFCapacitor_SMD:C_0603_1608MetricC7
1499RResistor_SMD:R_0603_1608MetricR8
1CH330NPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU4
1Conn_01x02RF_Antenna:Johanson_2450AT18x100ANT1
1Conn_02x04_Odd_EvenConnector_PinHeader_1.27mm:PinHeader_2x04_P1.27mm_Vertical_SMDJ1
1ESP8266EXESP8266:ESP8266U2
1HX9193Package_TO_SOT_SMD:SOT-23-5U3
1LEDLED_SMD:LED_0603_1608MetricD1
1USB_C_Plug_USB2.0Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12P1
1W25Q64Package_SO:SOIC-8_5.23x5.23mm_P1.27mmU1

Similar boards

  • 2 layers36.1 × 21 mmLinux ch32v003, the printed circuit board in 3D

    Linux ch32v003

    tvlad1234/linux-ch32v003

    Linux on a $0.15 RISC-V microcontroller

    16 parts289MIT
  • 2 layers38.3 × 20.8 mmESP AHT10-Extra, the printed circuit board in 3D

    ESP AHT10-Extra

    c-/ESP-AHT10-Extra

    minimalist ESP-8266 temperature/humidity sensor

    27 parts20
  • 2 layers60 × 40 mmForcegauge, the printed circuit board in 3D

    Forcegauge

    szbeni/forcegauge

    Traning for climbing. Load cell with HX711 and real time plotting,

    77 parts18GPL-3.0
  • 2 layers68.5 × 84.2 mmAm32stc8051u, the printed circuit board in 3D

    Am32stc8051u

    Icey7122/AM32_AI8051U

    Using PWMA to output 3 sets of complementary PWM for driving MOSFEET, Using PWMB for capturing external throttle signals, Using ADC to sample voltage and current, for low voltage protection and over current…

    110 parts17
  • 2 layers93 × 20 mmWiFi VFD, the printed circuit board in 3D

    WiFi VFD

    ciisaichan/WiFi-VFD

    开源的ESP8266驱动VFD屏电路,支持BiliBili粉丝数、时间、温度、湿度

    23 parts8MIT
  • 2 layers160 × 100 mm36C3 Badge Hardware, the printed circuit board in 3D

    36C3 Badge Hardware

    CatoLynx/36C3-Badge

    VFD and LED badge fitting the 36C3 design

    159 parts5GPL-3.0
  • 2 layers18.3 × 14.2 mmStm8s001ch330, the printed circuit board in 3D

    Stm8s001ch330

    TG9541/stm8s001ch330

    USB Dongle STM8S001J3M3 with CH330N, e.g. for STM8 eForth

    14 parts4CC0-1.0

Questions

How big is the ESP8266 PCB?

It measures 40 × 20 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ESP8266 use?

39 parts, built around the CH330N and ESP8266EX. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the ESP8266 KiCad files?

From the windowsair/wireless-esp8266-dap repository on GitHub, at the commit this page was made from: the board is circuit/ESP8266.kicad_pcb and its schematic circuit/ESP8266.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ESP8266 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).