tasmota-webserial-esptool 6.5.3 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +2 -0
- package/README.md +4 -3
- package/READ_FLASH_FEATURE.md +130 -0
- package/css/light.css +11 -0
- package/css/style.css +213 -45
- package/dist/const.d.ts +42 -3
- package/dist/const.js +102 -4
- package/dist/esp_loader.d.ts +27 -3
- package/dist/esp_loader.js +376 -17
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/partition.d.ts +26 -0
- package/dist/partition.js +129 -0
- package/dist/stubs/esp32.json +4 -4
- package/dist/stubs/esp32c2.json +4 -4
- package/dist/stubs/esp32c3.json +4 -4
- package/dist/stubs/esp32c5.json +4 -4
- package/dist/stubs/esp32c6.json +4 -4
- package/dist/stubs/esp32c61.json +4 -4
- package/dist/stubs/esp32h2.json +4 -4
- package/dist/stubs/esp32p4.json +4 -4
- package/dist/stubs/esp32p4r3.json +4 -4
- package/dist/stubs/esp32s2.json +4 -4
- package/dist/stubs/esp32s3.json +4 -4
- package/dist/stubs/esp8266.json +3 -3
- package/dist/stubs/index.d.ts +1 -1
- package/dist/stubs/index.js +7 -1
- package/dist/web/esp32-CijhsJH1.js +1 -0
- package/dist/web/esp32c2-C17SM4gO.js +1 -0
- package/dist/web/esp32c3-DxRGijbg.js +1 -0
- package/dist/web/esp32c5-3mDOIGa4.js +1 -0
- package/dist/web/esp32c6-h6U0SQTm.js +1 -0
- package/dist/web/esp32c61-BKtexhPZ.js +1 -0
- package/dist/web/esp32h2-RtuWSEmP.js +1 -0
- package/dist/web/esp32p4-5nkIjxqJ.js +1 -0
- package/dist/web/esp32p4r3-CpHBYEwI.js +1 -0
- package/dist/web/esp32s2-IiDBtXxo.js +1 -0
- package/dist/web/esp32s3-6yv5yxum.js +1 -0
- package/dist/web/esp8266-CUwxJpGa.js +1 -0
- package/dist/web/index.js +1 -1
- package/index.html +158 -34
- package/js/modules/esp32-CijhsJH1.js +1 -0
- package/js/modules/esp32c2-C17SM4gO.js +1 -0
- package/js/modules/esp32c3-DxRGijbg.js +1 -0
- package/js/modules/esp32c5-3mDOIGa4.js +1 -0
- package/js/modules/esp32c6-h6U0SQTm.js +1 -0
- package/js/modules/esp32c61-BKtexhPZ.js +1 -0
- package/js/modules/esp32h2-RtuWSEmP.js +1 -0
- package/js/modules/esp32p4-5nkIjxqJ.js +1 -0
- package/js/modules/esp32p4r3-CpHBYEwI.js +1 -0
- package/js/modules/esp32s2-IiDBtXxo.js +1 -0
- package/js/modules/esp32s3-6yv5yxum.js +1 -0
- package/js/modules/esp8266-CUwxJpGa.js +1 -0
- package/js/modules/esptool.js +1 -1
- package/js/script.js +456 -11
- package/package.json +6 -6
- package/src/const.ts +109 -5
- package/src/esp_loader.ts +491 -18
- package/src/index.ts +3 -1
- package/src/partition.ts +155 -0
- package/src/stubs/README.md +1 -1
- package/src/stubs/esp32.json +4 -4
- package/src/stubs/esp32c2.json +4 -4
- package/src/stubs/esp32c3.json +4 -4
- package/src/stubs/esp32c5.json +4 -4
- package/src/stubs/esp32c6.json +4 -4
- package/src/stubs/esp32c61.json +4 -4
- package/src/stubs/esp32h2.json +4 -4
- package/src/stubs/esp32p4.json +4 -4
- package/src/stubs/esp32p4r3.json +4 -4
- package/src/stubs/esp32s2.json +4 -4
- package/src/stubs/esp32s3.json +4 -4
- package/src/stubs/esp8266.json +3 -3
- package/src/stubs/index.ts +14 -2
- package/BUGFIX_GET_SECURITY_INFO.md +0 -126
- package/IMPLEMENTATION_SUMMARY.md +0 -232
- package/SECURITY_INFO_EXPLANATION.md +0 -145
- package/dist/web/esp32-BNIFdu1P.js +0 -1
- package/dist/web/esp32c2-BqxquOKw.js +0 -1
- package/dist/web/esp32c3-BOOqe8me.js +0 -1
- package/dist/web/esp32c5-mcj52-K1.js +0 -1
- package/dist/web/esp32c6-Cg5qYgg7.js +0 -1
- package/dist/web/esp32c61-CzCdsydk.js +0 -1
- package/dist/web/esp32h2-DZa_lpff.js +0 -1
- package/dist/web/esp32p4-DyGqUAeZ.js +0 -1
- package/dist/web/esp32p4r3-Cle9QJmZ.js +0 -1
- package/dist/web/esp32s2-Bk4mqADi.js +0 -1
- package/dist/web/esp32s3-Df3OUCOC.js +0 -1
- package/dist/web/esp8266-CQFcqJ_a.js +0 -1
- package/js/modules/esp32-BNIFdu1P.js +0 -1
- package/js/modules/esp32c2-BqxquOKw.js +0 -1
- package/js/modules/esp32c3-BOOqe8me.js +0 -1
- package/js/modules/esp32c5-mcj52-K1.js +0 -1
- package/js/modules/esp32c6-Cg5qYgg7.js +0 -1
- package/js/modules/esp32c61-CzCdsydk.js +0 -1
- package/js/modules/esp32h2-DZa_lpff.js +0 -1
- package/js/modules/esp32p4-DyGqUAeZ.js +0 -1
- package/js/modules/esp32p4r3-Cle9QJmZ.js +0 -1
- package/js/modules/esp32s2-Bk4mqADi.js +0 -1
- package/js/modules/esp32s3-Df3OUCOC.js +0 -1
- package/js/modules/esp8266-CQFcqJ_a.js +0 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# WebSerial ESPTool
|
|
2
2
|
|
|
3
|
-
JavaScript package to install
|
|
3
|
+
JavaScript package to install and make backups of firmwares on ESP devices via the browser using WebSerial.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
WebSerial ESPTool is **not** based on esptool.js
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
## Local development
|
|
@@ -16,5 +16,6 @@ This fork is **not** based on esptool.js
|
|
|
16
16
|
|
|
17
17
|
This project was originally written by [Melissa LeBlanc-Williams](https://github.com/makermelissa). [Nabu Casa](https://www.nabucasa.com) ported the code over to TypeScript and in March 2022 took over maintenance from Adafruit. In July 2022, the Nabucasa stopped maintaining the project in favor of an official, but very early release of Espressif's [esptool-js](https://github.com/espressif/esptool-js/). Due to the instability of the tool, Adafruit updated their fork with Nabucasa's changes in November 2022 and took over maintenance once again. In December 2024, the tool was once again updated to use Espressif's esptool-js as the backend.
|
|
18
18
|
Since Adafruit is slow in adding new MCUs (support for C2, C6 and H2 is from this fork) and uses now esptool.js which is still buggy, i decided to maintain my own version and do not provide PRs upstream anymore.
|
|
19
|
+
In 12/2025 support for new MCUs and chip variant support for the different P4 revisions and flash read was added.
|
|
19
20
|
|
|
20
21
|
Copyright: Adafruit, Nabu Casa and Johann Obermeier
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Read Flash Partition Feature
|
|
2
|
+
|
|
3
|
+
## Übersicht
|
|
4
|
+
|
|
5
|
+
Die Read Flash Partition Funktionalität wurde erfolgreich aus esptool.js in WebSerial_ESPTool implementiert. Diese Funktion ermöglicht es, Flash-Speicher direkt vom ESP-Chip zu lesen und als Binärdatei herunterzuladen.
|
|
6
|
+
|
|
7
|
+
## Implementierte Änderungen
|
|
8
|
+
|
|
9
|
+
### 1. Backend (TypeScript)
|
|
10
|
+
|
|
11
|
+
#### `src/const.ts`
|
|
12
|
+
- Hinzugefügt: `ESP_READ_FLASH = 0xd2` Konstante
|
|
13
|
+
- Hinzugefügt: `FLASH_READ_TIMEOUT = 100` Konstante
|
|
14
|
+
|
|
15
|
+
#### `src/esp_loader.ts`
|
|
16
|
+
- Neue Methode `readFlash()` in der `EspStubLoader` Klasse implementiert
|
|
17
|
+
- Die Methode unterstützt:
|
|
18
|
+
- Lesen von Flash-Speicher ab einer bestimmten Adresse
|
|
19
|
+
- Angabe der zu lesenden Größe in Bytes
|
|
20
|
+
- Optional: Callback-Funktion für Fortschrittsanzeige
|
|
21
|
+
- Rückgabe der Daten als `Uint8Array`
|
|
22
|
+
|
|
23
|
+
### 2. Frontend (HTML/JavaScript/CSS)
|
|
24
|
+
|
|
25
|
+
#### `index.html`
|
|
26
|
+
- Neue UI-Sektion "Read Flash" hinzugefügt mit:
|
|
27
|
+
- Eingabefeld für Adresse (hexadezimal)
|
|
28
|
+
- Eingabefeld für Größe (dezimal in Bytes)
|
|
29
|
+
- "Read Flash" Button
|
|
30
|
+
- Fortschrittsbalken
|
|
31
|
+
|
|
32
|
+
#### `js/script.js`
|
|
33
|
+
- Neue Funktion `clickReadFlash()` implementiert
|
|
34
|
+
- Automatischer Download der gelesenen Daten als `.bin` Datei
|
|
35
|
+
- Fortschrittsanzeige während des Lesevorgangs
|
|
36
|
+
- Fehlerbehandlung und Logging
|
|
37
|
+
|
|
38
|
+
#### `css/style.css`
|
|
39
|
+
- Styling für die neue "Read Flash" Sektion
|
|
40
|
+
- Responsive Layout-Anpassungen
|
|
41
|
+
|
|
42
|
+
## Verwendung
|
|
43
|
+
|
|
44
|
+
### Über die Web-Oberfläche
|
|
45
|
+
|
|
46
|
+
#### Flash direkt lesen
|
|
47
|
+
|
|
48
|
+
1. Verbinden Sie sich mit einem ESP-Gerät über den "Connect" Button
|
|
49
|
+
2. Scrollen Sie zur "Read Flash" Sektion
|
|
50
|
+
3. Geben Sie die Startadresse ein (z.B. `0` für den Anfang des Flash-Speichers)
|
|
51
|
+
4. Geben Sie die Größe in Bytes ein (z.B. `4096` für 4KB)
|
|
52
|
+
5. Klicken Sie auf "Read Flash"
|
|
53
|
+
6. Die Daten werden automatisch als `.bin` Datei heruntergeladen
|
|
54
|
+
|
|
55
|
+
#### Partitionstabelle lesen
|
|
56
|
+
|
|
57
|
+
1. Verbinden Sie sich mit einem ESP-Gerät über den "Connect" Button
|
|
58
|
+
2. Scrollen Sie zur "Partition Table" Sektion
|
|
59
|
+
3. Klicken Sie auf "Read Partition Table"
|
|
60
|
+
4. Die Partitionstabelle wird gelesen und angezeigt
|
|
61
|
+
5. Klicken Sie auf "Download" neben einer Partition, um diese herunterzuladen
|
|
62
|
+
|
|
63
|
+
### Programmatisch
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
// Beispiel: 4KB vom Offset 0x0 lesen
|
|
67
|
+
const data = await espStubLoader.readFlash(
|
|
68
|
+
0x0, // Adresse
|
|
69
|
+
4096, // Größe in Bytes
|
|
70
|
+
(packet, progress, totalSize) => {
|
|
71
|
+
// Optional: Fortschritts-Callback
|
|
72
|
+
console.log(`Progress: ${progress}/${totalSize} bytes`);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
// data ist ein Uint8Array mit den gelesenen Daten
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Technische Details
|
|
80
|
+
|
|
81
|
+
### Protokoll
|
|
82
|
+
|
|
83
|
+
Die Implementierung folgt dem ESP Serial Protocol:
|
|
84
|
+
1. Sende `ESP_READ_FLASH` Kommando mit Parametern (Adresse, Größe, Block-Größe, Anzahl Blöcke)
|
|
85
|
+
2. Warte auf Bestätigung
|
|
86
|
+
3. Empfange Datenpakete über SLIP-Protokoll
|
|
87
|
+
4. Sende Acknowledgment nach jedem Paket
|
|
88
|
+
5. Wiederhole bis alle Daten empfangen wurden
|
|
89
|
+
|
|
90
|
+
### Kompatibilität
|
|
91
|
+
|
|
92
|
+
Die Funktion ist nur im Stub-Modus verfügbar (nach `runStub()`), da der ROM-Bootloader diesen Befehl nicht unterstützt.
|
|
93
|
+
|
|
94
|
+
Unterstützte Chips:
|
|
95
|
+
- ESP32
|
|
96
|
+
- ESP32-S2
|
|
97
|
+
- ESP32-S3
|
|
98
|
+
- ESP32-C2
|
|
99
|
+
- ESP32-C3
|
|
100
|
+
- ESP32-C5
|
|
101
|
+
- ESP32-C6
|
|
102
|
+
- ESP32-C61
|
|
103
|
+
- ESP32-H2
|
|
104
|
+
- ESP32-P4
|
|
105
|
+
- ESP8266
|
|
106
|
+
|
|
107
|
+
## Beispiel-Anwendungsfälle
|
|
108
|
+
|
|
109
|
+
1. **Backup erstellen**: Kompletten Flash-Speicher sichern
|
|
110
|
+
2. **Partition lesen**: Spezifische Partitionen extrahieren (z.B. NVS, OTA)
|
|
111
|
+
3. **Debugging**: Flash-Inhalt zur Fehleranalyse untersuchen
|
|
112
|
+
4. **Firmware-Extraktion**: Installierte Firmware vom Gerät lesen
|
|
113
|
+
5. **Partitionstabelle analysieren**: Übersicht über alle Partitionen erhalten
|
|
114
|
+
6. **Einzelne Partitionen sichern**: Nur bestimmte Partitionen herunterladen
|
|
115
|
+
|
|
116
|
+
## Bekannte Einschränkungen
|
|
117
|
+
|
|
118
|
+
- Die Funktion erfordert, dass der Stub-Loader läuft
|
|
119
|
+
- Große Lesevorgänge können einige Zeit in Anspruch nehmen
|
|
120
|
+
- Die maximale Größe ist durch den verfügbaren Flash-Speicher des Chips begrenzt
|
|
121
|
+
|
|
122
|
+
## Build-Prozess
|
|
123
|
+
|
|
124
|
+
Nach Änderungen am TypeScript-Code:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npm run prepublishOnly
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Dies kompiliert den TypeScript-Code und erstellt die Distributionsdateien in `dist/`.
|
package/css/light.css
CHANGED
|
@@ -61,6 +61,17 @@ button {
|
|
|
61
61
|
background-color: #ddd;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
#commands button {
|
|
65
|
+
border-color: #333;
|
|
66
|
+
background-color: #fff;
|
|
67
|
+
color: #333;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#commands button:hover {
|
|
71
|
+
background-color: #333;
|
|
72
|
+
color: #fff;
|
|
73
|
+
}
|
|
74
|
+
|
|
64
75
|
#commands .buttons button {
|
|
65
76
|
border-color: #333;
|
|
66
77
|
}
|
package/css/style.css
CHANGED
|
@@ -6,26 +6,62 @@
|
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
font-size: 16px;
|
|
8
8
|
height: 85px;
|
|
9
|
-
|
|
10
|
-
padding: 20px 70px 0px 70px; /* TRouBLe */
|
|
9
|
+
padding: 15px 70px;
|
|
11
10
|
position: fixed;
|
|
12
11
|
width: 100%;
|
|
13
12
|
z-index: 1000;
|
|
14
13
|
margin: 0;
|
|
15
14
|
border-bottom: 5px solid #00a7e9;
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
|
+
top: 0;
|
|
19
|
+
transition: transform 0.3s ease-in-out;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
.header
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
.header-hidden {
|
|
23
|
+
transform: translateY(-100%);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.header .left {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.header .title {
|
|
32
|
+
font-size: 24px;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
margin-right: 30px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.header .right {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 15px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.header .controls-row {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: 8px;
|
|
47
|
+
margin-right: 20px;
|
|
48
|
+
padding-right: 20px;
|
|
49
|
+
border-right: 2px solid #ccc;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.header .controls-row label {
|
|
53
|
+
font-size: 13px;
|
|
54
|
+
margin-left: 12px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.header .controls-row label:first-child {
|
|
58
|
+
margin-left: 0;
|
|
22
59
|
}
|
|
23
60
|
|
|
24
61
|
.header button {
|
|
25
62
|
border: solid 2px #fff;
|
|
26
63
|
background-color: #000;
|
|
27
64
|
color: #fff;
|
|
28
|
-
margin-left: 20px;
|
|
29
65
|
height: 30px;
|
|
30
66
|
}
|
|
31
67
|
|
|
@@ -34,6 +70,10 @@
|
|
|
34
70
|
color: #000;
|
|
35
71
|
}
|
|
36
72
|
|
|
73
|
+
.header select {
|
|
74
|
+
height: 30px;
|
|
75
|
+
}
|
|
76
|
+
|
|
37
77
|
button,
|
|
38
78
|
.firmware {
|
|
39
79
|
height: 25px;
|
|
@@ -82,7 +122,12 @@ div.clear {
|
|
|
82
122
|
.main {
|
|
83
123
|
overflow-x: hidden;
|
|
84
124
|
overflow-y: auto;
|
|
85
|
-
padding-top:
|
|
125
|
+
padding-top: 90px;
|
|
126
|
+
transition: padding-top 0.3s ease-in-out;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.main.no-header-padding {
|
|
130
|
+
padding-top: 0;
|
|
86
131
|
}
|
|
87
132
|
|
|
88
133
|
.hidden {
|
|
@@ -95,32 +140,63 @@ div.clear {
|
|
|
95
140
|
margin-bottom: 1em;
|
|
96
141
|
}
|
|
97
142
|
|
|
98
|
-
.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
padding-
|
|
143
|
+
.log-controls {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: 8px;
|
|
147
|
+
padding-left: 12px;
|
|
148
|
+
border-left: 1px solid #ccc;
|
|
103
149
|
}
|
|
104
150
|
|
|
105
|
-
.
|
|
106
|
-
|
|
107
|
-
|
|
151
|
+
.log-controls.hidden {
|
|
152
|
+
display: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.small-btn {
|
|
156
|
+
padding: 4px 12px;
|
|
157
|
+
font-size: 13px;
|
|
158
|
+
border-radius: 12px;
|
|
159
|
+
border-width: 2px;
|
|
160
|
+
border-style: solid;
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
height: 26px;
|
|
163
|
+
line-height: 14px;
|
|
108
164
|
}
|
|
109
165
|
|
|
110
166
|
#app.connected #commands {
|
|
111
|
-
height:
|
|
167
|
+
height: auto;
|
|
168
|
+
max-height: 70vh;
|
|
169
|
+
overflow-y: auto;
|
|
112
170
|
}
|
|
113
171
|
|
|
114
172
|
#app.connected #log {
|
|
115
|
-
height: calc(100vh -
|
|
173
|
+
height: calc(100vh - 320px);
|
|
174
|
+
min-height: 200px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
#app.connected #log.hidden {
|
|
178
|
+
height: 0;
|
|
179
|
+
min-height: 0;
|
|
180
|
+
padding: 0;
|
|
181
|
+
border: 0;
|
|
116
182
|
}
|
|
117
183
|
|
|
118
184
|
#app #commands {
|
|
119
185
|
height: 0;
|
|
186
|
+
overflow: hidden;
|
|
120
187
|
}
|
|
121
188
|
|
|
122
189
|
#app #log {
|
|
123
|
-
height: calc(100vh -
|
|
190
|
+
height: calc(100vh - 220px);
|
|
191
|
+
min-height: 200px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
#app #log.hidden {
|
|
195
|
+
height: 0;
|
|
196
|
+
min-height: 0;
|
|
197
|
+
padding: 0;
|
|
198
|
+
border: 0;
|
|
199
|
+
overflow: hidden;
|
|
124
200
|
}
|
|
125
201
|
|
|
126
202
|
#commands,
|
|
@@ -157,21 +233,8 @@ div.clear {
|
|
|
157
233
|
}
|
|
158
234
|
|
|
159
235
|
.footer {
|
|
160
|
-
padding
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.footer a {
|
|
165
|
-
color: blue;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.footer .controls {
|
|
169
|
-
line-height: 45px;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.footer button {
|
|
173
|
-
font-size: 14px;
|
|
174
|
-
margin: 0 10px;
|
|
236
|
+
padding: 10px 70px;
|
|
237
|
+
height: 20px;
|
|
175
238
|
}
|
|
176
239
|
|
|
177
240
|
.remix {
|
|
@@ -195,11 +258,11 @@ div.clear {
|
|
|
195
258
|
display: inline-block;
|
|
196
259
|
position: relative;
|
|
197
260
|
width: 50px;
|
|
198
|
-
margin-right:
|
|
261
|
+
margin-right: 5px;
|
|
199
262
|
-webkit-user-select: none;
|
|
200
263
|
-moz-user-select: none;
|
|
201
264
|
-ms-user-select: none;
|
|
202
|
-
margin-left:
|
|
265
|
+
margin-left: 5px;
|
|
203
266
|
}
|
|
204
267
|
|
|
205
268
|
.onoffswitch-checkbox {
|
|
@@ -280,14 +343,7 @@ div.clear {
|
|
|
280
343
|
border-color: #67ac38;
|
|
281
344
|
}
|
|
282
345
|
|
|
283
|
-
.footer .onoffswitch {
|
|
284
|
-
margin-right: 20px;
|
|
285
|
-
top: 7px;
|
|
286
|
-
}
|
|
287
346
|
|
|
288
|
-
#butClear {
|
|
289
|
-
margin-top: 10px;
|
|
290
|
-
}
|
|
291
347
|
|
|
292
348
|
#commands {
|
|
293
349
|
min-width: 600px;
|
|
@@ -297,11 +353,17 @@ div.clear {
|
|
|
297
353
|
}
|
|
298
354
|
|
|
299
355
|
#commands .upload {
|
|
300
|
-
width: 600px;
|
|
356
|
+
max-width: 600px;
|
|
301
357
|
display: flex;
|
|
302
358
|
align-items: center;
|
|
303
359
|
margin: 5px auto;
|
|
304
|
-
justify-content:
|
|
360
|
+
justify-content: flex-start;
|
|
361
|
+
padding-left: calc(50% - 300px);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* Hide upload rows 2-8 by default, show dynamically via JavaScript */
|
|
365
|
+
#commands .upload:nth-child(n+2):nth-child(-n+8) {
|
|
366
|
+
display: none;
|
|
305
367
|
}
|
|
306
368
|
|
|
307
369
|
#commands .upload .offset {
|
|
@@ -374,7 +436,113 @@ div.clear {
|
|
|
374
436
|
margin-right: 10px;
|
|
375
437
|
border-width: 2px;
|
|
376
438
|
border-style: solid;
|
|
439
|
+
cursor: pointer;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
#commands button {
|
|
443
|
+
cursor: pointer;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
#commands .read-flash {
|
|
447
|
+
width: 800px;
|
|
448
|
+
margin: 20px auto 10px auto;
|
|
449
|
+
padding-top: 20px;
|
|
450
|
+
border-top: 2px solid #ccc;
|
|
451
|
+
display: flex;
|
|
452
|
+
flex-direction: column;
|
|
453
|
+
align-items: center;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
#commands .read-flash .progress-bar {
|
|
457
|
+
width: 400px;
|
|
458
|
+
margin-bottom: 10px;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
#commands .read-flash-inputs {
|
|
462
|
+
display: flex;
|
|
463
|
+
align-items: center;
|
|
464
|
+
gap: 15px;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
#commands .read-flash label {
|
|
468
|
+
display: flex;
|
|
469
|
+
align-items: center;
|
|
470
|
+
gap: 5px;
|
|
471
|
+
white-space: nowrap;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
#commands .read-flash input {
|
|
475
|
+
width: 100px;
|
|
476
|
+
padding: 5px;
|
|
477
|
+
border-radius: 5px;
|
|
478
|
+
border: 2px solid #ccc;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
#commands .read-flash button {
|
|
482
|
+
border-width: 2px;
|
|
483
|
+
border-style: solid;
|
|
484
|
+
padding: 2px 30px;
|
|
485
|
+
cursor: pointer;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
#commands .partition-table {
|
|
489
|
+
width: 800px;
|
|
490
|
+
margin: 20px auto 10px auto;
|
|
491
|
+
padding-top: 20px;
|
|
492
|
+
border-top: 2px solid #ccc;
|
|
493
|
+
display: flex;
|
|
494
|
+
flex-direction: column;
|
|
495
|
+
align-items: center;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
#commands .partition-table button {
|
|
499
|
+
margin: 0 0 10px 0;
|
|
500
|
+
border-width: 2px;
|
|
501
|
+
border-style: solid;
|
|
502
|
+
padding: 2px 30px;
|
|
503
|
+
cursor: pointer;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
#commands .partition-table .progress-bar {
|
|
507
|
+
width: 400px;
|
|
508
|
+
margin-bottom: 10px;
|
|
377
509
|
}
|
|
510
|
+
|
|
511
|
+
.partition-table-display {
|
|
512
|
+
width: 100%;
|
|
513
|
+
margin-top: 20px;
|
|
514
|
+
border-collapse: collapse;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.partition-table-display th,
|
|
518
|
+
.partition-table-display td {
|
|
519
|
+
padding: 8px 12px;
|
|
520
|
+
text-align: left;
|
|
521
|
+
border: 1px solid #ccc;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.partition-table-display th {
|
|
525
|
+
font-weight: 600;
|
|
526
|
+
background-color: #f0f0f0;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.partition-download-btn {
|
|
530
|
+
padding: 5px 15px;
|
|
531
|
+
font-size: 14px;
|
|
532
|
+
border-radius: 10px;
|
|
533
|
+
border-width: 2px;
|
|
534
|
+
border-style: solid;
|
|
535
|
+
cursor: pointer;
|
|
536
|
+
background-color: transparent;
|
|
537
|
+
transition: background-color 0.2s, color 0.2s;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.partition-download-btn:hover {
|
|
541
|
+
background-color: #00a7e9;
|
|
542
|
+
color: #fff;
|
|
543
|
+
border-color: #00a7e9;
|
|
544
|
+
}
|
|
545
|
+
|
|
378
546
|
.justify {
|
|
379
547
|
display: flex;
|
|
380
548
|
justify-content: space-between;
|
package/dist/const.d.ts
CHANGED
|
@@ -134,7 +134,7 @@ export declare const ESP32C61_SPI_W0_OFFS = 88;
|
|
|
134
134
|
export declare const ESP32C61_UART_DATE_REG_ADDR = 1610612860;
|
|
135
135
|
export declare const ESP32C61_BOOTLOADER_FLASH_OFFSET = 0;
|
|
136
136
|
export declare const ESP32H2_SPI_REG_BASE = 1610625024;
|
|
137
|
-
export declare const ESP32H2_BASEFUSEADDR =
|
|
137
|
+
export declare const ESP32H2_BASEFUSEADDR = 1611335680;
|
|
138
138
|
export declare const ESP32H2_MACFUSEADDR: number;
|
|
139
139
|
export declare const ESP32H2_SPI_USR_OFFS = 24;
|
|
140
140
|
export declare const ESP32H2_SPI_USR1_OFFS = 28;
|
|
@@ -144,6 +144,28 @@ export declare const ESP32H2_SPI_MISO_DLEN_OFFS = 40;
|
|
|
144
144
|
export declare const ESP32H2_SPI_W0_OFFS = 88;
|
|
145
145
|
export declare const ESP32H2_UART_DATE_REG_ADDR = 1610612860;
|
|
146
146
|
export declare const ESP32H2_BOOTLOADER_FLASH_OFFSET = 0;
|
|
147
|
+
export declare const ESP32H4_SPI_REG_BASE = 1611239424;
|
|
148
|
+
export declare const ESP32H4_BASEFUSEADDR = 1611339776;
|
|
149
|
+
export declare const ESP32H4_MACFUSEADDR: number;
|
|
150
|
+
export declare const ESP32H4_SPI_USR_OFFS = 24;
|
|
151
|
+
export declare const ESP32H4_SPI_USR1_OFFS = 28;
|
|
152
|
+
export declare const ESP32H4_SPI_USR2_OFFS = 32;
|
|
153
|
+
export declare const ESP32H4_SPI_MOSI_DLEN_OFFS = 36;
|
|
154
|
+
export declare const ESP32H4_SPI_MISO_DLEN_OFFS = 40;
|
|
155
|
+
export declare const ESP32H4_SPI_W0_OFFS = 88;
|
|
156
|
+
export declare const ESP32H4_UART_DATE_REG_ADDR: number;
|
|
157
|
+
export declare const ESP32H4_BOOTLOADER_FLASH_OFFSET = 8192;
|
|
158
|
+
export declare const ESP32H21_SPI_REG_BASE = 1610625024;
|
|
159
|
+
export declare const ESP32H21_BASEFUSEADDR = 1611350016;
|
|
160
|
+
export declare const ESP32H21_MACFUSEADDR: number;
|
|
161
|
+
export declare const ESP32H21_SPI_USR_OFFS = 24;
|
|
162
|
+
export declare const ESP32H21_SPI_USR1_OFFS = 28;
|
|
163
|
+
export declare const ESP32H21_SPI_USR2_OFFS = 32;
|
|
164
|
+
export declare const ESP32H21_SPI_MOSI_DLEN_OFFS = 36;
|
|
165
|
+
export declare const ESP32H21_SPI_MISO_DLEN_OFFS = 40;
|
|
166
|
+
export declare const ESP32H21_SPI_W0_OFFS = 88;
|
|
167
|
+
export declare const ESP32H21_UART_DATE_REG_ADDR = 1610612860;
|
|
168
|
+
export declare const ESP32H21_BOOTLOADER_FLASH_OFFSET = 0;
|
|
147
169
|
export declare const ESP32P4_SPI_REG_BASE = 1342754816;
|
|
148
170
|
export declare const ESP32P4_BASEFUSEADDR = 1343410176;
|
|
149
171
|
export declare const ESP32P4_EFUSE_BLOCK1_ADDR: number;
|
|
@@ -156,6 +178,18 @@ export declare const ESP32P4_SPI_MISO_DLEN_OFFS = 40;
|
|
|
156
178
|
export declare const ESP32P4_SPI_W0_OFFS = 88;
|
|
157
179
|
export declare const ESP32P4_UART_DATE_REG_ADDR: number;
|
|
158
180
|
export declare const ESP32P4_BOOTLOADER_FLASH_OFFSET = 8192;
|
|
181
|
+
export declare const ESP32S31_SPI_REG_BASE = 542113792;
|
|
182
|
+
export declare const ESP32S31_BASEFUSEADDR = 544296960;
|
|
183
|
+
export declare const ESP32S31_EFUSE_BLOCK1_ADDR: number;
|
|
184
|
+
export declare const ESP32S31_MACFUSEADDR: number;
|
|
185
|
+
export declare const ESP32S31_SPI_USR_OFFS = 24;
|
|
186
|
+
export declare const ESP32S31_SPI_USR1_OFFS = 28;
|
|
187
|
+
export declare const ESP32S31_SPI_USR2_OFFS = 32;
|
|
188
|
+
export declare const ESP32S31_SPI_MOSI_DLEN_OFFS = 36;
|
|
189
|
+
export declare const ESP32S31_SPI_MISO_DLEN_OFFS = 40;
|
|
190
|
+
export declare const ESP32S31_SPI_W0_OFFS = 88;
|
|
191
|
+
export declare const ESP32S31_UART_DATE_REG_ADDR: number;
|
|
192
|
+
export declare const ESP32S31_BOOTLOADER_FLASH_OFFSET = 8192;
|
|
159
193
|
export interface SpiFlashAddresses {
|
|
160
194
|
regBase: number;
|
|
161
195
|
baseFuse: number;
|
|
@@ -181,8 +215,11 @@ export declare const CHIP_FAMILY_ESP32C5 = 12997;
|
|
|
181
215
|
export declare const CHIP_FAMILY_ESP32C6 = 12998;
|
|
182
216
|
export declare const CHIP_FAMILY_ESP32C61 = 207969;
|
|
183
217
|
export declare const CHIP_FAMILY_ESP32H2 = 12914;
|
|
218
|
+
export declare const CHIP_FAMILY_ESP32H4 = 12916;
|
|
219
|
+
export declare const CHIP_FAMILY_ESP32H21 = 12917;
|
|
184
220
|
export declare const CHIP_FAMILY_ESP32P4 = 12928;
|
|
185
|
-
export
|
|
221
|
+
export declare const CHIP_FAMILY_ESP32S31 = 12849;
|
|
222
|
+
export type ChipFamily = typeof CHIP_FAMILY_ESP8266 | typeof CHIP_FAMILY_ESP32 | typeof CHIP_FAMILY_ESP32S2 | typeof CHIP_FAMILY_ESP32S3 | typeof CHIP_FAMILY_ESP32C2 | typeof CHIP_FAMILY_ESP32C3 | typeof CHIP_FAMILY_ESP32C5 | typeof CHIP_FAMILY_ESP32C6 | typeof CHIP_FAMILY_ESP32C61 | typeof CHIP_FAMILY_ESP32H2 | typeof CHIP_FAMILY_ESP32H4 | typeof CHIP_FAMILY_ESP32H21 | typeof CHIP_FAMILY_ESP32P4 | typeof CHIP_FAMILY_ESP32S31;
|
|
186
223
|
interface ChipIdInfo {
|
|
187
224
|
name: string;
|
|
188
225
|
family: ChipFamily;
|
|
@@ -208,6 +245,7 @@ export declare const ESP_WRITE_REG = 9;
|
|
|
208
245
|
export declare const ESP_READ_REG = 10;
|
|
209
246
|
export declare const ESP_ERASE_FLASH = 208;
|
|
210
247
|
export declare const ESP_ERASE_REGION = 209;
|
|
248
|
+
export declare const ESP_READ_FLASH = 210;
|
|
211
249
|
export declare const ESP_SPI_SET_PARAMS = 11;
|
|
212
250
|
export declare const ESP_SPI_ATTACH = 13;
|
|
213
251
|
export declare const ESP_CHANGE_BAUDRATE = 15;
|
|
@@ -221,11 +259,12 @@ export declare const ROM_INVALID_RECV_MSG = 5;
|
|
|
221
259
|
export declare const USB_RAM_BLOCK = 2048;
|
|
222
260
|
export declare const ESP_RAM_BLOCK = 6144;
|
|
223
261
|
export declare const DEFAULT_TIMEOUT = 3000;
|
|
224
|
-
export declare const CHIP_ERASE_TIMEOUT =
|
|
262
|
+
export declare const CHIP_ERASE_TIMEOUT = 150000;
|
|
225
263
|
export declare const MAX_TIMEOUT: number;
|
|
226
264
|
export declare const SYNC_TIMEOUT = 100;
|
|
227
265
|
export declare const ERASE_REGION_TIMEOUT_PER_MB = 30000;
|
|
228
266
|
export declare const MEM_END_ROM_TIMEOUT = 500;
|
|
267
|
+
export declare const FLASH_READ_TIMEOUT = 100;
|
|
229
268
|
/**
|
|
230
269
|
* @name timeoutPerMb
|
|
231
270
|
* Scales timeouts which are size-specific
|