esp32tool 1.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.
Files changed (115) hide show
  1. package/README.md +31 -0
  2. package/css/dark.css +156 -0
  3. package/css/light.css +156 -0
  4. package/css/style.css +870 -0
  5. package/dist/const.d.ts +277 -0
  6. package/dist/const.js +511 -0
  7. package/dist/esp_loader.d.ts +222 -0
  8. package/dist/esp_loader.js +1466 -0
  9. package/dist/index.d.ts +10 -0
  10. package/dist/index.js +15 -0
  11. package/dist/lib/spiffs/index.d.ts +15 -0
  12. package/dist/lib/spiffs/index.js +16 -0
  13. package/dist/lib/spiffs/spiffs.d.ts +26 -0
  14. package/dist/lib/spiffs/spiffs.js +132 -0
  15. package/dist/lib/spiffs/spiffsBlock.d.ts +36 -0
  16. package/dist/lib/spiffs/spiffsBlock.js +140 -0
  17. package/dist/lib/spiffs/spiffsConfig.d.ts +63 -0
  18. package/dist/lib/spiffs/spiffsConfig.js +79 -0
  19. package/dist/lib/spiffs/spiffsPage.d.ts +45 -0
  20. package/dist/lib/spiffs/spiffsPage.js +260 -0
  21. package/dist/lib/spiffs/spiffsReader.d.ts +19 -0
  22. package/dist/lib/spiffs/spiffsReader.js +192 -0
  23. package/dist/partition.d.ts +26 -0
  24. package/dist/partition.js +129 -0
  25. package/dist/struct.d.ts +2 -0
  26. package/dist/struct.js +91 -0
  27. package/dist/stubs/esp32.json +8 -0
  28. package/dist/stubs/esp32c2.json +8 -0
  29. package/dist/stubs/esp32c3.json +8 -0
  30. package/dist/stubs/esp32c5.json +8 -0
  31. package/dist/stubs/esp32c6.json +8 -0
  32. package/dist/stubs/esp32c61.json +8 -0
  33. package/dist/stubs/esp32h2.json +8 -0
  34. package/dist/stubs/esp32p4.json +8 -0
  35. package/dist/stubs/esp32p4r3.json +8 -0
  36. package/dist/stubs/esp32s2.json +8 -0
  37. package/dist/stubs/esp32s3.json +8 -0
  38. package/dist/stubs/esp8266.json +8 -0
  39. package/dist/stubs/index.d.ts +10 -0
  40. package/dist/stubs/index.js +56 -0
  41. package/dist/util.d.ts +14 -0
  42. package/dist/util.js +46 -0
  43. package/dist/wasm/filesystems.d.ts +33 -0
  44. package/dist/wasm/filesystems.js +114 -0
  45. package/dist/web/esp32-D955RjN9.js +16 -0
  46. package/dist/web/esp32c2-CJkxHDQi.js +16 -0
  47. package/dist/web/esp32c3-BhUHzH0o.js +16 -0
  48. package/dist/web/esp32c5-Chs0HtmA.js +16 -0
  49. package/dist/web/esp32c6-D6mPN6ut.js +16 -0
  50. package/dist/web/esp32c61-CQiYCWAs.js +16 -0
  51. package/dist/web/esp32h2-LsKJE9AS.js +16 -0
  52. package/dist/web/esp32p4-7nWC-HiD.js +16 -0
  53. package/dist/web/esp32p4r3-CwiPecZW.js +16 -0
  54. package/dist/web/esp32s2-CtqVheSJ.js +16 -0
  55. package/dist/web/esp32s3-CRbtB0QR.js +16 -0
  56. package/dist/web/esp8266-nEkNAo8K.js +16 -0
  57. package/dist/web/index.js +7265 -0
  58. package/electron/main.js +333 -0
  59. package/electron/preload.js +37 -0
  60. package/eslint.config.js +22 -0
  61. package/index.html +408 -0
  62. package/js/modules/esp32-D955RjN9.js +16 -0
  63. package/js/modules/esp32c2-CJkxHDQi.js +16 -0
  64. package/js/modules/esp32c3-BhUHzH0o.js +16 -0
  65. package/js/modules/esp32c5-Chs0HtmA.js +16 -0
  66. package/js/modules/esp32c6-D6mPN6ut.js +16 -0
  67. package/js/modules/esp32c61-CQiYCWAs.js +16 -0
  68. package/js/modules/esp32h2-LsKJE9AS.js +16 -0
  69. package/js/modules/esp32p4-7nWC-HiD.js +16 -0
  70. package/js/modules/esp32p4r3-CwiPecZW.js +16 -0
  71. package/js/modules/esp32s2-CtqVheSJ.js +16 -0
  72. package/js/modules/esp32s3-CRbtB0QR.js +16 -0
  73. package/js/modules/esp8266-nEkNAo8K.js +16 -0
  74. package/js/modules/esptool.js +7265 -0
  75. package/js/script.js +2237 -0
  76. package/js/utilities.js +182 -0
  77. package/license.md +11 -0
  78. package/package.json +61 -0
  79. package/script/build +12 -0
  80. package/script/develop +17 -0
  81. package/src/const.ts +599 -0
  82. package/src/esp_loader.ts +1907 -0
  83. package/src/index.ts +63 -0
  84. package/src/lib/spiffs/index.ts +22 -0
  85. package/src/lib/spiffs/spiffs.ts +175 -0
  86. package/src/lib/spiffs/spiffsBlock.ts +204 -0
  87. package/src/lib/spiffs/spiffsConfig.ts +140 -0
  88. package/src/lib/spiffs/spiffsPage.ts +357 -0
  89. package/src/lib/spiffs/spiffsReader.ts +280 -0
  90. package/src/partition.ts +155 -0
  91. package/src/struct.ts +108 -0
  92. package/src/stubs/README.md +3 -0
  93. package/src/stubs/esp32.json +8 -0
  94. package/src/stubs/esp32c2.json +8 -0
  95. package/src/stubs/esp32c3.json +8 -0
  96. package/src/stubs/esp32c5.json +8 -0
  97. package/src/stubs/esp32c6.json +8 -0
  98. package/src/stubs/esp32c61.json +8 -0
  99. package/src/stubs/esp32h2.json +8 -0
  100. package/src/stubs/esp32p4.json +8 -0
  101. package/src/stubs/esp32p4r3.json +8 -0
  102. package/src/stubs/esp32s2.json +8 -0
  103. package/src/stubs/esp32s3.json +8 -0
  104. package/src/stubs/esp8266.json +8 -0
  105. package/src/stubs/index.ts +86 -0
  106. package/src/util.ts +49 -0
  107. package/src/wasm/fatfs/fatfs.wasm +0 -0
  108. package/src/wasm/fatfs/index.d.ts +26 -0
  109. package/src/wasm/fatfs/index.js +343 -0
  110. package/src/wasm/filesystems.ts +156 -0
  111. package/src/wasm/littlefs/index.d.ts +83 -0
  112. package/src/wasm/littlefs/index.js +529 -0
  113. package/src/wasm/littlefs/littlefs.js +2 -0
  114. package/src/wasm/littlefs/littlefs.wasm +0 -0
  115. package/src/wasm/shared/types.ts +13 -0
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+
2
+ # ESP32Tool
3
+
4
+ **ESP32Tool** is a JavaScript tool that lets you read and write data on ESP devices at lightning speed directly in your browser using WebSerial.
5
+
6
+ **Features:**
7
+ - Supports all common filesystems
8
+ - Upload and download files easily – no complicated steps
9
+ - Custom, high-performance flash access (up to 10x faster than esptool.py)
10
+ - Automatic resume on read errors – no more broken flash operations
11
+
12
+ 👉 **Try ESP32Tool in your browser:** [jason2866.github.io/esp32tool](https://jason2866.github.io/esp32tool)
13
+
14
+ 👉 **Offline use:** Electron binaries are available in the [release section](https://github.com/Jason2866/esp32tool/releases).
15
+
16
+ ---
17
+
18
+ ## Local Development
19
+
20
+ 1. Clone this repository
21
+ 2. Install dependencies: `npm install`
22
+ 3. Start the development environment: `script/develop`
23
+ 4. Open in your browser: [http://localhost:5004/](http://localhost:5004/)
24
+
25
+ ---
26
+
27
+ ## Origin & Development
28
+
29
+ This project was originally created by [Melissa LeBlanc-Williams](https://github.com/makermelissa). [Nabu Casa](https://www.nabucasa.com) ported the code to TypeScript and took over maintenance from Adafruit in March 2022. In July 2022, Nabu Casa stopped maintaining the project in favor of Espressif's [esptool-js](https://github.com/espressif/esptool-js). Due to instability, Adafruit updated their fork with Nabu Casa's changes in November 2022 and resumed maintenance. In December 2024, the backend was switched to Espressif's esptool-js. Since esptool.js remained buggy, this independent version was created. In December 2025, support for new MCUs, chip variants (P4 revisions), and optimized flash reading was added.
30
+
31
+ **Copyright:** Adafruit, Nabu Casa, and Johann Obermeier
package/css/dark.css ADDED
@@ -0,0 +1,156 @@
1
+ .header {
2
+ background: #000;
3
+ color: #fff;
4
+ }
5
+
6
+ body {
7
+ background-color: #333;
8
+ color: #fff;
9
+ }
10
+
11
+ input,
12
+ select,
13
+ button {
14
+ background-color: #333;
15
+ color: #fff;
16
+ }
17
+
18
+ .footer button {
19
+ border-color: #fff;
20
+ background-color: #333;
21
+ color: #fff;
22
+ }
23
+
24
+ .footer button:hover {
25
+ background-color: #fff;
26
+ color: #333;
27
+ }
28
+
29
+ .remix button {
30
+ border-color: #fff;
31
+ color: #fff;
32
+ }
33
+
34
+ .remix button:hover {
35
+ background-color: #fff;
36
+ }
37
+
38
+ #commands button {
39
+ border-color: #fff;
40
+ background-color: #333;
41
+ color: #fff;
42
+ }
43
+
44
+ #commands button:hover {
45
+ background-color: #fff;
46
+ color: #333;
47
+ }
48
+
49
+ .notSupported,
50
+ .notSupported a {
51
+ background-color: red;
52
+ color: white;
53
+ }
54
+
55
+ .firmware {
56
+ border-color: #fff;
57
+ color: #fff;
58
+ }
59
+
60
+ .firmware:focus,
61
+ .firmware:hover {
62
+ background-color: #fff;
63
+ color: #333;
64
+ }
65
+
66
+ .firmware:disabled {
67
+ color: #ccc;
68
+ border-color: #ccc;
69
+ }
70
+
71
+ .firmware:disabled:hover {
72
+ background-color: #fff;
73
+ }
74
+
75
+ input {
76
+ background-color: #fff;
77
+ color: #333;
78
+ }
79
+
80
+ #commands .buttons button:disabled,
81
+ #commands .buttons button:disabled:hover {
82
+ border-color: #999;
83
+ background-color: #888;
84
+ color: #ccc;
85
+ }
86
+
87
+ #commands .buttons button:hover {
88
+ background-color: #fff;
89
+ }
90
+
91
+ .progress-bar {
92
+ border-color: #fff;
93
+ }
94
+
95
+ /* LittleFS Manager Dark Mode */
96
+ .littlefs-manager {
97
+ background-color: rgba(113, 174, 30, 0.1);
98
+ border-color: #71ae1e;
99
+ }
100
+
101
+ .littlefs-info {
102
+ background-color: rgba(255, 255, 255, 0.1);
103
+ }
104
+
105
+ .littlefs-breadcrumb {
106
+ background-color: rgba(255, 255, 255, 0.1);
107
+ }
108
+
109
+ .littlefs-breadcrumb span {
110
+ color: #fff;
111
+ }
112
+
113
+ .file-table {
114
+ background-color: #333;
115
+ color: #fff;
116
+ }
117
+
118
+ .file-table thead {
119
+ background-color: #222;
120
+ }
121
+
122
+ .file-table th {
123
+ border-bottom-color: #555;
124
+ }
125
+
126
+ .file-table td {
127
+ border-bottom-color: #444;
128
+ }
129
+
130
+ .file-table tbody tr:hover {
131
+ background-color: rgba(113, 174, 30, 0.2);
132
+ }
133
+
134
+ .littlefs-file-upload input[type="file"] {
135
+ background-color: #444;
136
+ color: #fff;
137
+ border-color: #666;
138
+ }
139
+
140
+ .partition-table-display th {
141
+ background-color: #222;
142
+ color: #fff;
143
+ }
144
+
145
+ .partition-table-display td {
146
+ border-color: #555;
147
+ }
148
+
149
+ .littlefs-fs-button {
150
+ background-color: #8ec641;
151
+ color: white;
152
+ }
153
+
154
+ .littlefs-fs-button:hover {
155
+ background-color: #71ae1e;
156
+ }
package/css/light.css ADDED
@@ -0,0 +1,156 @@
1
+ .header {
2
+ background: #000;
3
+ color: #fff;
4
+ }
5
+
6
+ body {
7
+ background-color: #fff;
8
+ color: #000;
9
+ }
10
+
11
+ input,
12
+ select,
13
+ button {
14
+ background-color: #fff;
15
+ color: #000;
16
+ }
17
+
18
+ .notSupported,
19
+ .notSupported a {
20
+ background-color: red;
21
+ color: white;
22
+ }
23
+
24
+ .footer button {
25
+ border-color: #63338f;
26
+ background-color: #fff;
27
+ color: #63338f;
28
+ }
29
+
30
+ .footer button:hover {
31
+ background-color: #63338f;
32
+ color: #fff;
33
+ }
34
+
35
+ .remix button {
36
+ border-color: #333;
37
+ color: #333;
38
+ }
39
+
40
+ .remix button:hover {
41
+ background-color: #333;
42
+ }
43
+
44
+ .firmware {
45
+ border-color: #63338f;
46
+ color: #63338f;
47
+ }
48
+
49
+ .firmware:focus,
50
+ .firmware:hover {
51
+ background-color: #63338f;
52
+ color: #fff;
53
+ }
54
+
55
+ .firmware:disabled {
56
+ background-color: #ddd;
57
+ color: #888;
58
+ }
59
+
60
+ .firmware:disabled:hover {
61
+ background-color: #ddd;
62
+ }
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
+
75
+ #commands .buttons button {
76
+ border-color: #333;
77
+ }
78
+
79
+ #commands .buttons button:disabled,
80
+ #commands .buttons button:disabled:hover {
81
+ border-color: #ccc;
82
+ background-color: #ddd;
83
+ color: #888;
84
+ }
85
+
86
+ #commands .buttons button:hover {
87
+ background-color: #333;
88
+ color: #fff;
89
+ }
90
+
91
+ .progress-bar {
92
+ border-color: #333;
93
+ }
94
+
95
+ /* LittleFS Manager Light Mode */
96
+ .littlefs-manager {
97
+ background-color: rgba(113, 174, 30, 0.05);
98
+ border-color: #71ae1e;
99
+ }
100
+
101
+ .littlefs-info {
102
+ background-color: rgba(0, 0, 0, 0.03);
103
+ }
104
+
105
+ .littlefs-breadcrumb {
106
+ background-color: rgba(0, 0, 0, 0.03);
107
+ }
108
+
109
+ .littlefs-breadcrumb span {
110
+ color: #333;
111
+ }
112
+
113
+ .file-table {
114
+ background-color: #fff;
115
+ color: #000;
116
+ }
117
+
118
+ .file-table thead {
119
+ background-color: #f5f5f5;
120
+ }
121
+
122
+ .file-table th {
123
+ border-bottom-color: #ccc;
124
+ }
125
+
126
+ .file-table td {
127
+ border-bottom-color: #e0e0e0;
128
+ }
129
+
130
+ .file-table tbody tr:hover {
131
+ background-color: rgba(113, 174, 30, 0.1);
132
+ }
133
+
134
+ .littlefs-file-upload input[type="file"] {
135
+ background-color: white;
136
+ color: #333;
137
+ border-color: #ccc;
138
+ }
139
+
140
+ .partition-table-display th {
141
+ background-color: #f0f0f0;
142
+ color: #000;
143
+ }
144
+
145
+ .partition-table-display td {
146
+ border-color: #ccc;
147
+ }
148
+
149
+ .littlefs-fs-button {
150
+ background-color: #8ec641;
151
+ color: white;
152
+ }
153
+
154
+ .littlefs-fs-button:hover {
155
+ background-color: #71ae1e;
156
+ }