Skip to content

Commit e396d11

Browse files
committed
Merge branch 'release/v0.1.2'
2 parents 57c747d + b469154 commit e396d11

File tree

9 files changed

+1553
-1212
lines changed

9 files changed

+1553
-1212
lines changed

README.md

Lines changed: 75 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
<p align="center"><img src="https://user-images.githubusercontent.com/17078589/73821108-300bda00-482e-11ea-89f6-011a50037a12.png"/></p>
2-
<h1 align="center">Wireless ESP8266 DAP</h1>
1+
<p align="center"><img src="https://user-images.githubusercontent.com/17078589/107881245-7d7d5580-6f1e-11eb-9f66-6ac589e5f95c.png"/></p>
32

4-
[![Build Status](https://github.com/windowsair/wireless-esp8266-dap/workflows/build/badge.svg?branch=master)](https://github.com/windowsair/wireless-esp8266-dap/actions?query=branch%3Amaster) master
3+
![image](https://user-images.githubusercontent.com/17078589/107857220-05ecef00-6e68-11eb-9fa0-506b32052dba.png)
4+
5+
6+
[![Build Status](https://github.com/windowsair/wireless-esp8266-dap/workflows/build/badge.svg?branch=master)](https://github.com/windowsair/wireless-esp8266-dap/actions?query=branch%3Amaster) master 
57
[![Build Status](https://github.com/windowsair/wireless-esp8266-dap/workflows/build/badge.svg?branch=develop)](https://github.com/windowsair/wireless-esp8266-dap/actions?query=branch%3Adevelop) develop
68

7-
[![](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/windowsair/wireless-esp8266-dap/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg?style=flat-square)](https://github.com/windowsair/wireless-esp8266-dap/pulls) [![%e2%9d%a4](https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg?style=flat-square)](https://github.com/windowsair/wireless-esp8266-dap)
9+
[![](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/windowsair/wireless-esp8266-dap/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg?style=flat-square)](https://github.com/windowsair/wireless-esp8266-dap/pulls) [![%e2%9d%a4](https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg?style=flat-square)](https://github.com/windowsair/wireless-esp8266-dap)
810

911

1012
## Introduce
@@ -13,19 +15,20 @@ Wireless debugging with ***only one ESP8266*** !
1315

1416
Realized by USBIP and CMSIS-DAP protocol stack.
1517

16-
> 👉 5m distance, 100kb size firmware flash test:
18+
> 👉 5m distance, 100kb size firmware(Hex) flash test:
1719
18-
<p align="center"><img src="https://user-images.githubusercontent.com/17078589/73829782-808b3380-483e-11ea-8389-1570bc4200af.gif"/></p>
20+
<p align="center"><img src="https://user-images.githubusercontent.com/17078589/107896674-e5a95700-6f71-11eb-90f7-bf7362045537.gif"/></p>
1921

2022
## Feature
2123

22-
1. Debug Communication Mode
23-
- [x] SWD
24-
- [x] JTAG
24+
1. Debug Communication Mode & Debug Port
25+
- [x] SWD(SW-DP)
26+
- [x] JTAG(JTAG-DP)
27+
- [x] SWJ-DP
2528

2629
2. USB Communication Mode
27-
- [x] USB-HID (Default)
28-
- [x] WCID & WinUSB (Experimental)
30+
- [x] USB-HID
31+
- [x] WCID & WinUSB (Default)
2932

3033
3. Debug Trace
3134
- [ ] UART Serial Wire Output(SWO)
@@ -53,8 +56,9 @@ You can change `WIFI_SSID` and ` WIFI_PASS` in [wifi_configuration.h](main/wifi_
5356

5457
| SWD | |
5558
|----------------|--------|
56-
| SWCLK | GPIO5 |
57-
| SWDIO | GPIO4 |
59+
| SWCLK | GPIO14 |
60+
| SWDIO | GPIO12 |
61+
| SWDIO_MOSI | GPIO13 |
5862
| LED\_CONNECTED | GPIO2 |
5963
| LED\_RUNNING | GPIO15 |
6064
| TVCC | 3V3 |
@@ -66,30 +70,43 @@ You can change `WIFI_SSID` and ` WIFI_PASS` in [wifi_configuration.h](main/wifi_
6670

6771
| JTAG | |
6872
|--------------------|---------|
69-
| TCK | GPIO5 |
70-
| TMS | GPIO4 |
71-
| TDI | GPIO13 |
72-
| TDO | GPIO12 |
73+
| TCK | GPIO14 |
74+
| TMS | GPIO13 |
75+
| TDI | GPIO4 |
76+
| TDO | GPIO16 |
7377
| nTRST \(optional\) | GPIO0\* |
74-
| nRESET | GPIO14 |
78+
| nRESET | GPIO5 |
7579
| LED\_CONNECTED | GPIO2 |
7680
| LED\_RUNNING | GPIO15 |
7781
| TVCC | 3V3 |
7882
| GND | GND |
7983

80-
You can modify these pin definitions in [DAP_config.h](components/DAP/config/DAP_config.h)
8184

82-
> Tips: Try to avoid using `GPIO0`(working mode switch) and `GPIO16`(RTC)
85+
In order to use SPI acceleration, you need to physically connect `SWDIO(GPIO12)` to `SWDIO_MOSI(GPIO13)`.
86+
87+
Here, we give a simple example for reference:
88+
89+
![sch](https://user-images.githubusercontent.com/17078589/107851862-f9589e80-6e47-11eb-9eca-e80760822a6a.png)
90+
91+
Alternatively, you can connect directly with wires as we gave at the beginning, without additional circuits.
92+
93+
94+
> If you need to modify the LED or JTAG pins, please refer to the instructions in [DAP_config.h](components/DAP/config/DAP_config.h) to modify them carefully.
95+
8396

84-
## Build
97+
------
8598

86-
You can build locally or use Github Action to build online
99+
100+
## Build And Flash
101+
102+
You can build locally or use Github Action to build online and then download firmware to flash.
87103

88104
### Build with Github Action Online
89105

90106
See: [Build with Github Action](https://github.com/windowsair/wireless-esp8266-dap/wiki/Build-with-Github-Action)
91107

92-
### General build
108+
109+
### General build and Flash
93110

94111
1. Get ESP8266 RTOS Software Development Kit
95112

@@ -117,9 +134,8 @@ python ./idf.py -p /dev/ttyS5 flash
117134

118135
1. Get USBIP project
119136

120-
- Windows: [usbip-win](https://github.com/cezanne/usbip-win) .
121-
> The pre-compiled version on SourceForge is also available, for HID mode only, but it may be faster.
122-
- Linux: Distributed as part of the kernel
137+
- Windows: [usbip-win](https://github.com/cezanne/usbip-win) .
138+
- 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.
123139

124140
2. Start esp8266 and connect it to the device to be debugged
125141

@@ -131,6 +147,7 @@ python ./idf.py -p /dev/ttyS5 flash
131147
# or usbip old version
132148
.\usbip.exe -D -a <your-esp8266-ip-address> 1-1
133149

150+
# 👉 Recommend
134151
# HID Mode Or WinUSB Mode
135152
# for usbip-win 0.3.0 kmdf ude
136153
.\usbip.exe attach_ude -r <your-esp8266-ip-address> -b 1-1
@@ -139,31 +156,38 @@ python ./idf.py -p /dev/ttyS5 flash
139156

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

142-
![image](https://user-images.githubusercontent.com/17078589/73833411-eb3f6d80-4844-11ea-8501-02a008f6119d.png)
159+
![image](https://user-images.githubusercontent.com/17078589/107849548-f903d780-6e36-11eb-846f-3eaf0c0dc089.png)
143160

144161

145-
Then test it under MDK:
162+
Here, we use MDK for testing:
146163

147164
![target](https://user-images.githubusercontent.com/17078589/73830040-eb3c6f00-483e-11ea-85ee-c40b68a836b2.png)
148165

149166

167+
------
168+
169+
170+
## Speed Strategy
171+
172+
The maximum rate of esp8266 pure IO is about 2MHz.
173+
When you select max clock, we will take the following actions:
174+
175+
- `clock < 2Mhz` : Similar to the clock speed you choose.
176+
- `2MHz <= clock < 10MHz` : Use the fastest pure IO speed.
177+
- `clock >= 10MHz` : SPI acceleration using 40MHz clock.
178+
179+
> Note that the most significant speed constraint of this project is still the TCP connection speed.
150180
151181
## Develop
152182

153183
0. Check other branches to know the latest development progress.
154184

155-
1. Use WinUSB Mode:
185+
1. Use WinUSB Mode(enabled by default):
156186

157187
change `USE_WINUSB` macor in [USBd_config.h](components/USBIP/USBd_config.h)
158188

159189

160190

161-
> Credits to:
162-
> - https://github.com/thevoidnn/esp8266-wifi-cmsis-dap for adapter firmware based on CMSIS-DAP v1.0
163-
> - https://github.com/ARM-software/CMSIS_5 for CMSIS
164-
> - https://github.com/cezanne/usbip-win for usbip windows
165-
166-
167191
In this repo you can find the complete implementation of the USB protocol stack including USB-HID, WCID, WinUSB. ~~Although WinUSB-based mode currently does not work on USBIP~~ :disappointed_relieved: . They are very easy and can help you quickly build your own DAP on other hardware platforms.
168192

169193

@@ -198,6 +222,22 @@ Due to the completeness of the USBIP protocol document, we have not yet understo
198222
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
199223

200224

225+
------
226+
227+
# Credit
228+
229+
230+
Credits to the following project, people and organizations:
231+
232+
> - https://github.com/thevoidnn/esp8266-wifi-cmsis-dap for adapter firmware based on CMSIS-DAP v1.0
233+
> - https://github.com/ARM-software/CMSIS_5 for CMSIS
234+
> - https://github.com/cezanne/usbip-win for usbip windows
235+
236+
237+
- @HeavenSpree
238+
- @Zy19930907
239+
- @caiguang1997
240+
201241

202242
## License
203243
[MIT LICENSE](LICENSE)

0 commit comments

Comments
 (0)