-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflasher.html
More file actions
787 lines (746 loc) · 36.9 KB
/
Copy pathflasher.html
File metadata and controls
787 lines (746 loc) · 36.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#000000">
<title>GhostESP ESP32 Web Flasher for Firmware</title>
<meta name="description" content="Flash GhostESP firmware from your browser with an ESP32 Web Serial flasher. Supports chip detection, bootloader flashing, erase, logs, and GhostESP builds.">
<meta name="keywords" content="GhostESP flasher, ESP32 flash, web serial, GhostESP firmware, ESP32-S3, ESP32-C6">
<meta name="author" content="Jay Candel">
<meta name="robots" content="index, follow">
<meta property="og:type" content="website">
<meta property="og:title" content="GhostESP ESP32 Web Flasher for Firmware">
<meta property="og:description" content="Flash GhostESP firmware from your browser with an ESP32 Web Serial flasher.">
<meta property="og:url" content="https://ghostesp.net/flasher">
<meta property="og:site_name" content="GhostESP">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="GhostESP ESP32 Web Flasher for Firmware">
<meta name="twitter:description" content="Browser-based ESP32 Web Serial flasher for GhostESP firmware.">
<link rel="canonical" href="https://ghostesp.net/flasher">
<link rel="alternate" type="application/rss+xml" title="GhostESP Blog" href="https://ghostesp.net/feed.xml">
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Rajdhani:wght@600;700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/flasher.css">
<link rel="stylesheet" href="css/serial-mirror.css">
<script src="https://unpkg.com/[email protected]/dist/umd/lucide.min.js" defer></script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "GhostESP Web Flasher",
"url": "https://ghostesp.net/flasher",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "Web browser",
"description": "Browser-based Web Serial tool for flashing GhostESP firmware to ESP32 devices.",
"isAccessibleForFree": true,
"publisher": {
"@type": "Organization",
"name": "GhostESP",
"url": "https://ghostesp.net/"
}
}
</script>
</head>
<body>
<a href="#main-content" class="skip-link">Skip to content</a>
<canvas id="dotTerrain"></canvas>
<script src="js/dot-terrain.js"></script>
<nav id="nav"><noscript><a href="/">Home</a> <a href="boards.html">Boards</a> <a href="flasher.html">Flasher</a> <a href="serial.html">Serial Console</a> <a href="marketplace.html">Apps</a> <a href="asset-marketplace.html">Asset Packs</a> <a href="irdb.html">IRDB</a> <a href="blog.html">Blog</a> <a href="https://docs.ghostesp.net">Docs</a></noscript></nav>
<div id="main-content" class="flasher-page" style="position: relative; z-index: 1;">
<div class="container">
<div class="flasher-header">
<p>Flash GhostESP firmware directly from your browser</p>
</div>
<div class="flasher-card">
<!-- Stepper -->
<div class="flasher-stepper">
<div class="flasher-stepper-track">
<div class="flasher-stepper-item">
<div class="flasher-step-dot active" id="stepper1">1</div>
<span>Connect</span>
</div>
<div class="flasher-stepper-item">
<div class="flasher-step-dot" id="stepper2">2</div>
<span>Firmware</span>
</div>
<div class="flasher-stepper-item">
<div class="flasher-step-dot" id="stepper3">3</div>
<span>Flash</span>
</div>
</div>
</div>
<!-- Step 1: Connection Mode -->
<div class="flasher-step active" id="step1">
<h3>Choose Connection Mode</h3>
<p class="flusher-step-desc">Pick how your device is currently running. Connect & Detect only works when GhostESP is already installed and booted.</p>
<div class="flasher-mode-choice-grid" id="connectionModeChoice">
<button class="flasher-mode-choice-card" type="button" data-connection-mode="detect">
<div class="flasher-mode-choice-icon"><i class="bi bi-broadcast-pin"></i></div>
<div class="flasher-mode-choice-name">Already Running GhostESP</div>
<div class="flasher-mode-choice-desc">Use Connect & Detect to read chip info and auto-match the build.</div>
</button>
<button class="flasher-mode-choice-card" type="button" data-connection-mode="manual">
<div class="flasher-mode-choice-icon"><i class="bi bi-cpu"></i></div>
<div class="flasher-mode-choice-name">Flash From Bootloader</div>
<div class="flasher-mode-choice-desc">Choose your chip or board, put it in bootloader mode, then connect directly.</div>
</button>
</div>
<div class="flasher-connect-row d-none" id="connectionPanel">
<div class="flasher-connect-status">
<div id="chipInfo" class="flasher-status-bar">
<span class="flasher-status-dot disconnected"></span>
<span class="flasher-status-label">Disconnected</span>
<span class="flasher-chip-warning" id="chipMismatchWarning" style="display:none;">
<i class="bi bi-exclamation-triangle-fill"></i> Mismatch!
</span>
</div>
<div class="flasher-driver-hint">
<i class="bi bi-info-circle"></i>
<span>COM port not showing? Install the <a href="https://www.wch-ic.com/downloads/ch341ser_exe.html" target="_blank" rel="noopener">CH341 serial driver</a>.</span>
</div>
</div>
<div class="flasher-connect-actions">
<button id="connectBtn" class="flasher-btn flasher-btn-primary">
<i class="bi bi-usb-symbol"></i> Connect Device
</button>
<button id="disconnectBtn" class="flasher-btn flasher-btn-secondary" disabled>
<i class="bi bi-x-circle"></i> Disconnect
</button>
</div>
</div>
<div id="manualDeviceSelection" class="d-none">
<div class="flasher-manual-select-heading">
<span>Manual filter</span>
<small>Required for bootloader connection and firmware filtering</small>
</div>
<div class="flasher-toggle" id="deviceMethodToggle" style="max-width: 280px;">
<button class="flasher-toggle-btn active" id="choiceByChip" data-method="chip">
By Chip
</button>
<button class="flasher-toggle-btn" id="choiceByBrand" data-method="brand">
By Brand
</button>
</div>
<!-- By Chip Model -->
<div id="chipSelectionContainer">
<div class="flasher-device-grid">
<div class="flasher-device-card" data-device="ESP32">
<div class="flasher-device-name">ESP32</div>
<div class="flasher-device-meta">
<span>Dual Core</span>
<span>240MHz</span>
</div>
</div>
<div class="flasher-device-card" data-device="ESP32-S2">
<div class="flasher-device-name">ESP32-S2</div>
<div class="flasher-device-meta">
<span>Single Core</span>
<span>240MHz</span>
</div>
</div>
<div class="flasher-device-card" data-device="ESP32-S3">
<div class="flasher-device-name">ESP32-S3</div>
<div class="flasher-device-meta">
<span>Dual Core</span>
<span>240MHz</span>
</div>
</div>
<div class="flasher-device-card" data-device="ESP32-C3">
<div class="flasher-device-name">ESP32-C3</div>
<div class="flasher-device-meta">
<span>RISC-V</span>
<span>160MHz</span>
</div>
</div>
<div class="flasher-device-card" data-device="ESP32-C5">
<div class="flasher-device-name">ESP32-C5</div>
<div class="flasher-device-meta">
<span>RISC-V</span>
<span>240MHz</span>
</div>
</div>
<div class="flasher-device-card" data-device="ESP32-C6">
<div class="flasher-device-name">ESP32-C6</div>
<div class="flasher-device-meta">
<span>RISC-V</span>
<span>160MHz</span>
</div>
</div>
</div>
</div>
<!-- By Board Brand -->
<div id="brandSelectionContainer" class="d-none">
<div class="brand-back-btn-wrapper" id="brandBackBtnWrapper" style="display:none; margin-bottom: 1rem;">
<button id="brandBackBtn" class="flasher-btn flasher-btn-secondary" style="font-size: 0.85rem; padding: 0.5rem 1rem;">
<i class="bi bi-arrow-left"></i> Back to Brands
</button>
</div>
<div class="flasher-device-grid" id="brandCardsGrid">
<div class="flasher-device-card brand-card" data-device="ESP32-C5" data-brand="TheWiredHatters">
<div class="flasher-device-name">The Wired Hatters</div>
<div class="flasher-device-meta">
<span>Previously FlipperHub</span>
<span>Banshee</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32" data-brand="RabbitLabs">
<div class="flasher-device-name">Rabbit Labs</div>
<div class="flasher-device-meta">
<span>Various</span>
<span>Premium</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32" data-brand="Generic">
<div class="flasher-device-name">Generic</div>
<div class="flasher-device-meta">
<span>ESP32 family</span>
<span>Defaults only</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32-S3" data-brand="M5Stack">
<div class="flasher-device-name">M5Stack</div>
<div class="flasher-device-meta">
<span>ESP32-S3</span>
<span>Popular</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32" data-brand="CYD">
<div class="flasher-device-name">CYD Displays</div>
<div class="flasher-device-meta">
<span>ESP32</span>
<span>2.4" LCD</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32-S3" data-brand="LilyGo">
<div class="flasher-device-name">LilyGo</div>
<div class="flasher-device-meta">
<span>ESP32-S3</span>
<span>Variety</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32" data-brand="Awok">
<div class="flasher-device-name">Awok</div>
<div class="flasher-device-meta">
<span>ESP32/S2</span>
<span>Compact</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32-S3" data-brand="Heltec">
<div class="flasher-device-name">Heltec</div>
<div class="flasher-device-meta">
<span>ESP32-S3</span>
<span>LoRa</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32-S3" data-brand="Waveshare">
<div class="flasher-device-name">Waveshare</div>
<div class="flasher-device-meta">
<span>ESP32-S3</span>
<span>Large LCD</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32" data-brand="JCMK">
<div class="flasher-device-name">JCMK</div>
<div class="flasher-device-meta">
<span>ESP32</span>
<span>Dev Board</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32-S3" data-brand="Seeed">
<div class="flasher-device-name">Seeed Studio</div>
<div class="flasher-device-meta">
<span>ESP32-S3/C5</span>
<span>Compact</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32-S3" data-brand="Displays">
<div class="flasher-device-name">Display Boards</div>
<div class="flasher-device-meta">
<span>ESP32-S3</span>
<span>Large LCD</span>
</div>
</div>
<div class="flasher-device-card brand-card" data-device="ESP32" data-brand="Additional">
<div class="flasher-device-name">Additional Boards</div>
<div class="flasher-device-meta">
<span>ESP32 family</span>
<span>Specialized</span>
</div>
</div>
</div>
<!-- Device detail grid (hidden by default, shown via JS) -->
<div class="flasher-device-grid brand-device-grid d-none" id="brandDeviceGrid"></div>
</div>
</div>
<div class="flasher-nav">
<button class="flasher-btn flasher-btn-help" data-step="1" data-bs-toggle="modal" data-bs-target="#stuckModalStep1">
<i class="bi bi-question-circle"></i> Help
</button>
<div class="flasher-nav-right">
<button id="continueToStep2" class="flasher-btn flasher-btn-primary" disabled>
Continue <i class="bi bi-arrow-right"></i>
</button>
</div>
</div>
</div>
<!-- Step 2: Firmware -->
<div class="flasher-step" id="step2">
<h3>Select Firmware <span id="selectedDeviceName"></span></h3>
<p class="flusher-step-desc">Choose the firmware build and flash settings</p>
<div id="deviceInsights" class="flasher-device-insights">
<div id="screenDisplay" class="flasher-screen-display">
<div class="flasher-mirror-wrapper" id="mirrorRoot"></div>
<div class="flasher-screen-meta" id="screenMeta"></div>
</div>
<div id="chipInfoPanel" class="flasher-chip-info">
<div class="flasher-chip-stats" id="chipStats"></div>
</div>
</div>
<div class="flasher-firmware-section">
<div class="flasher-section-label">Firmware Source</div>
<div class="flasher-toggle" id="firmwareMethodToggle">
<button class="flasher-toggle-btn active" id="choiceDownload" data-source="download">
<i class="bi bi-cloud-download"></i> Download
</button>
<button class="flasher-toggle-btn" id="choiceManual" data-source="manual">
<i class="bi bi-folder2-open"></i> Local Files
</button>
</div>
<!-- Download Options -->
<div id="downloadOptionsContainer" class="flasher-option-row">
<div class="flasher-form-row">
<div class="flasher-form-field" style="min-width: 260px;">
<label class="flasher-form-label">Channel</label>
<div class="flasher-toggle flasher-toggle-sm" id="releaseToggle">
<button class="flasher-toggle-btn active" data-release="stable">
<i class="bi bi-shield-check"></i> Stable
</button>
<button class="flasher-toggle-btn" data-release="prerelease">
<i class="bi bi-lightning-charge"></i> Pre-release
</button>
</div>
</div>
<div class="flasher-form-field">
<label class="flasher-form-label" for="ghostEspVariantSelect">Build</label>
<select id="ghostEspVariantSelect" class="flasher-form-select" disabled>
<option value="">Select a build...</option>
</select>
</div>
</div>
<div id="ghostEspStatus" class="flasher-status-text" style="margin-top: 0.4rem;"></div>
</div>
<!-- Manual Upload -->
<div id="manualUploadContainer" class="d-none">
<div class="flasher-binary-toggle" id="binaryTypeToggle">
<button class="flasher-binary-btn active" data-binary="app">
<i class="bi bi-file-earmark-binary"></i> Application
</button>
<button class="flasher-binary-btn" data-binary="bootloader">
<i class="bi bi-hdd-network"></i> Bootloader
</button>
<button class="flasher-binary-btn" data-binary="partition">
<i class="bi bi-table"></i> Partition
</button>
</div>
<div id="appFirmware">
<div class="flasher-upload-row">
<div class="flasher-address-input">
<label class="flasher-form-label" for="appAddress">Address</label>
<input type="text" class="flasher-form-input" id="appAddress" value="0x10000">
</div>
<div class="flasher-file-zone">
<div class="flasher-file-drop">
<span><i class="bi bi-upload"></i> Select .bin file</span>
</div>
<input type="file" id="appFile" accept=".bin" style="display:none">
<p id="appFileInfo" class="flasher-file-info">No file selected</p>
</div>
</div>
</div>
<div id="bootloaderFirmware" class="d-none">
<div class="flasher-upload-row">
<div class="flasher-address-input">
<label class="flasher-form-label" for="bootloaderAddress">Address</label>
<input type="text" class="flasher-form-input" id="bootloaderAddress" value="0x1000">
</div>
<div class="flasher-file-zone">
<div class="flasher-file-drop">
<span><i class="bi bi-upload"></i> Select .bin file</span>
</div>
<input type="file" id="bootloaderFile" accept=".bin" style="display:none">
<p id="bootloaderFileInfo" class="flasher-file-info">No file selected</p>
</div>
</div>
</div>
<div id="partitionFirmware" class="d-none">
<div class="flasher-upload-row">
<div class="flasher-address-input">
<label class="flasher-form-label" for="partitionAddress">Address</label>
<input type="text" class="flasher-form-input" id="partitionAddress" value="0x8000">
</div>
<div class="flasher-file-zone">
<div class="flasher-file-drop">
<span><i class="bi bi-upload"></i> Select .bin file</span>
</div>
<input type="file" id="partitionFile" accept=".bin" style="display:none">
<p id="partitionFileInfo" class="flasher-file-info">No file selected</p>
</div>
</div>
</div>
</div>
</div>
<!-- Flash Options -->
<div class="flasher-settings">
<div class="flasher-settings-header">
<h4>Flash Options</h4>
<button class="flasher-btn flasher-btn-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#flashOptionsCollapse">
<i class="bi bi-gear"></i> Show
</button>
</div>
<div class="collapse" id="flashOptionsCollapse">
<div class="flasher-settings-grid">
<div class="flasher-form-group">
<label class="flasher-form-label" for="flashMode">Flash Mode</label>
<select id="flashMode" class="flasher-form-select">
<option value="qio">QIO</option>
<option value="dio" selected>DIO</option>
<option value="dout">DOUT</option>
<option value="qout">QOUT</option>
</select>
</div>
<div class="flasher-form-group">
<label class="flasher-form-label" for="flashFreq">Flash Freq</label>
<select id="flashFreq" class="flasher-form-select">
<option value="20m">20 MHz</option>
<option value="40m" selected>40 MHz</option>
<option value="80m">80 MHz</option>
</select>
</div>
<div class="flasher-form-group">
<label class="flasher-form-label" for="flashSize">Flash Size</label>
<select id="flashSize" class="flasher-form-select">
<option value="1MB">1 MB</option>
<option value="2MB">2 MB</option>
<option value="4MB" selected>4 MB</option>
<option value="8MB">8 MB</option>
<option value="16MB">16 MB</option>
</select>
</div>
<div class="flasher-form-group">
<label class="flasher-form-label" for="baudrate">Baud Rate</label>
<select id="baudrate" class="flasher-form-select">
<option value="115200" selected>115200 (Default)</option>
<option value="921600">921600 (Fast)</option>
<option value="460800">460800</option>
<option value="230400">230400</option>
<option value="57600">57600</option>
<option value="38400">38400</option>
<option value="19200">19200</option>
<option value="9600">9600</option>
</select>
</div>
<div class="flasher-form-group">
<label class="flasher-form-label" for="resetMethod">Reset Method</label>
<select id="resetMethod" class="flasher-form-select">
<option value="normal" selected>Normal (RTS/DTR)</option>
<option value="hardware">Hardware (RTS&DTR)</option>
<option value="none">None (Power Cycle)</option>
</select>
</div>
</div>
<div class="flasher-checkbox">
<input type="checkbox" id="eraseAll" checked>
<label for="eraseAll">Erase all flash before programming</label>
</div>
</div>
</div>
<div class="flasher-nav">
<button id="backToStep1" class="flasher-btn flasher-btn-secondary">
<i class="bi bi-arrow-left"></i> Back
</button>
<div class="flasher-nav-right">
<button class="flasher-btn flasher-btn-help" data-step="2" data-bs-toggle="modal" data-bs-target="#stuckModalStep2">
<i class="bi bi-question-circle"></i> Help
</button>
<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="Please connect your device on Step 1 first">
<button id="continueToStep3" class="flasher-btn flasher-btn-primary" disabled>
Continue <i class="bi bi-arrow-right"></i>
</button>
</span>
</div>
</div>
</div>
<!-- Step 3: Flash -->
<div class="flasher-step" id="step3">
<h3>Flash Your Device</h3>
<p class="flusher-step-desc">Review the summary and flash your device</p>
<div class="flasher-flash-layout">
<div class="flasher-flash-summary-col">
<div class="flasher-summary" id="flashSummary"></div>
</div>
<div class="flasher-flash-actions-col">
<button id="flashBtn" class="flasher-btn flasher-btn-primary flasher-btn-flash">
<i class="bi bi-lightning-charge"></i> Flash Firmware
</button>
<div class="flasher-flash-progress-area">
<div class="flasher-progress">
<div class="flasher-progress-bar" id="flashProgress"></div>
</div>
<div class="flasher-eta" id="flashETA"></div>
</div>
<div class="flasher-secondary-actions">
<button id="eraseBtn" class="flasher-btn flasher-btn-danger flasher-btn-sm">
<i class="bi bi-trash"></i> Erase Flash
</button>
<button id="resetBtn" class="flasher-btn flasher-btn-secondary flasher-btn-sm">
<i class="bi bi-arrow-repeat"></i> Reset
</button>
</div>
</div>
</div>
<div id="globalStatus" class="flasher-global-status"></div>
<!-- Flash Options (also on step 3) -->
<div class="flasher-settings">
<div class="flasher-settings-header">
<h4>Flash Options</h4>
<button class="flasher-btn flasher-btn-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#flashOptionsCollapse3">
<i class="bi bi-gear"></i> Show
</button>
</div>
<div class="collapse" id="flashOptionsCollapse3">
<div class="flasher-settings-grid">
<div class="flasher-form-group">
<label class="flasher-form-label" for="flashMode3">Flash Mode</label>
<select id="flashMode3" class="flasher-form-select">
<option value="qio">QIO</option>
<option value="dio" selected>DIO</option>
<option value="dout">DOUT</option>
<option value="qout">QOUT</option>
</select>
</div>
<div class="flasher-form-group">
<label class="flasher-form-label" for="flashFreq3">Flash Freq</label>
<select id="flashFreq3" class="flasher-form-select">
<option value="20m">20 MHz</option>
<option value="40m" selected>40 MHz</option>
<option value="80m">80 MHz</option>
</select>
</div>
<div class="flasher-form-group">
<label class="flasher-form-label" for="flashSize3">Flash Size</label>
<select id="flashSize3" class="flasher-form-select">
<option value="1MB">1 MB</option>
<option value="2MB">2 MB</option>
<option value="4MB" selected>4 MB</option>
<option value="8MB">8 MB</option>
<option value="16MB">16 MB</option>
</select>
</div>
<div class="flasher-form-group">
<label class="flasher-form-label" for="baudrate3">Baud Rate</label>
<select id="baudrate3" class="flasher-form-select">
<option value="115200" selected>115200 (Default)</option>
<option value="921600">921600 (Fast)</option>
<option value="460800">460800</option>
<option value="230400">230400</option>
<option value="57600">57600</option>
<option value="38400">38400</option>
<option value="19200">19200</option>
<option value="9600">9600</option>
</select>
</div>
<div class="flasher-form-group">
<label class="flasher-form-label" for="resetMethod3">Reset Method</label>
<select id="resetMethod3" class="flasher-form-select">
<option value="normal" selected>Normal (RTS/DTR)</option>
<option value="hardware">Hardware (RTS&DTR)</option>
<option value="none">None (Power Cycle)</option>
</select>
</div>
</div>
<div class="flasher-checkbox">
<input type="checkbox" id="eraseAll3" checked>
<label for="eraseAll3">Erase all flash before programming</label>
</div>
</div>
</div>
<div class="flasher-nav">
<button id="backToStep2" class="flasher-btn flasher-btn-secondary">
<i class="bi bi-arrow-left"></i> Back
</button>
<div class="flasher-nav-right">
<button class="flasher-btn flasher-btn-help" data-step="3" data-bs-toggle="modal" data-bs-target="#stuckModalStep3">
<i class="bi bi-question-circle"></i> Help
</button>
<button id="startOver" class="flasher-btn flasher-btn-secondary">
<i class="bi bi-arrow-repeat"></i> Start Over
</button>
</div>
</div>
</div>
<!-- Terminal -->
<button class="flasher-terminal-toggle" id="terminalToggle">
<i class="bi bi-terminal"></i> Output Log <i class="bi bi-chevron-down" style="margin-left: 0.5rem;"></i>
</button>
<pre class="flasher-terminal" id="terminal"></pre>
</div> <!-- end flasher-card -->
</div>
</div>
<!-- Help Modals -->
<div class="modal fade" id="stuckModalStep1" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Help: Selecting Device</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Choose the ESP32 chip type for your board.</p>
<ul>
<li>Check the chip name printed on your board (e.g. ESP32-S3)</li>
<li>Click the matching card</li>
<li>Click Continue to proceed</li>
</ul>
<div class="flasher-help-diagram">
<div class="flasher-help-step"><i class="bi bi-cpu"></i><p>Identify Chip</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-card-heading"></i><p>Click Card</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-check-circle"></i><p>Continue</p></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="flasher-btn flasher-btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="stuckModalStep2" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Help: Connecting & Configuring</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Connect your ESP32 board and select GhostESP firmware.</p>
<ul>
<li>Connect via a <strong>USB data cable</strong> (not charge-only)</li>
<li>Put the board in <strong>bootloader mode</strong>: hold BOOT, press RESET, release BOOT</li>
<li>Click <strong>Connect Device</strong> and select the serial port</li>
<li>Select your preferred GhostESP build from the dropdown</li>
<li>Firmware will download and extract automatically</li>
</ul>
<div class="flasher-help-diagram">
<div class="flasher-help-step"><i class="bi bi-usb-plug"></i><p>Connect USB</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-download"></i><p>Boot Mode</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-box-arrow-up-right"></i><p>Connect</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-cloud-download"></i><p>Select Build</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-check-circle"></i><p>Continue</p></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="flasher-btn flasher-btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="stuckModalStep3" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Help: Flashing</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Write GhostESP firmware to your device.</p>
<ul>
<li>Review the <strong>Flash Summary</strong></li>
<li>Click <strong>Flash Firmware</strong></li>
<li>Wait for the progress bar to complete — <strong>do not disconnect!</strong></li>
<li>The tool will attempt to reset the device when finished</li>
</ul>
<div class="flasher-help-diagram">
<div class="flasher-help-step"><i class="bi bi-card-checklist"></i><p>Review</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-lightning-charge"></i><p>Flash</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-hourglass-split"></i><p>Wait</p></div>
<i class="bi bi-arrow-right flasher-help-arrow"></i>
<div class="flasher-help-step"><i class="bi bi-check-circle"></i><p>Complete!</p></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="flasher-btn flasher-btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Browser Not Supported Modal -->
<div class="modal fade" id="webSerialModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Browser Not Supported</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p style="color: var(--flasher-danger);">WebSerial is not supported in this browser.</p>
<p>Please use a supported browser:</p>
<ul>
<li>Chrome (v89+)</li>
<li>Edge (v89+)</li>
<li>Opera (v76+)</li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="flasher-btn flasher-btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="footer-links">
<a href="https://discord.gg/5cyNmUMgwh" target="_blank" rel="noopener" class="icon-link" title="Discord">
<i class="bi bi-discord"></i>
</a>
<a href="https://github.com/GhostESP-Revival/GhostESP" target="_blank" rel="noopener" class="icon-link" title="GitHub">
<i class="bi bi-github"></i>
</a>
<a href="https://instagram.com/ghostesprevival" target="_blank" rel="noopener" class="icon-link" title="Instagram">
<i class="bi bi-instagram"></i>
</a>
<button class="cookie-settings-link" onclick="CookieConsent.showSettings()">Cookie Settings</button>
<a href="privacy.html" class="cookie-settings-link">Privacy Policy</a>
</div>
</footer>
<!-- Scripts -->
<script type="module">
import * as esptoolJS from 'https://cdn.jsdelivr.net/npm/[email protected]/bundle.js';
window.esptoolJS = esptoolJS;
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jszip.min.js"></script>
<script src="js/components.js" defer></script>
<script src="js/social-proof.js" defer></script>
<script src="js/main.js" defer></script>
<script src="js/serial-mirror.js"></script>
<script src="js/flasher.js"></script>
<script src="js/cookie-consent.js" defer></script>
</body>
</html>