Skip to content

Commit 4a12faa

Browse files
committed
flash fix #2
1 parent e984f37 commit 4a12faa

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

docs/janos_flash.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,7 @@ <h2>Control</h2>
312312
<option value="development">Development</option>
313313
</select>
314314
<select id="baudSelect" aria-label="Baud rate">
315-
<option value="460800">460800 baud</option>
316-
<option value="921600">921600 baud</option>
317-
<option value="115200">115200 baud</option>
315+
<option value="115200" selected>115200 baud (stable)</option>
318316
</select>
319317
</div>
320318
<div class="status-line">
@@ -326,7 +324,7 @@ <h2>Control</h2>
326324
<strong>Erase</strong> does a full flash erase <span class="mono">(esptool erase-flash)</span> before writing the images.
327325
Only enable it when you have OTA partitions / old firmware and you see bootloops or slot errors.
328326
This web flasher seeds both OTA slots by default by writing the app to <span class="mono">0x20000</span> and <span class="mono">0x410000</span>.
329-
If the log shows <span class="mono">Flash ID: 0</span> or an MD5 mismatch, reconnect in ROM mode and retry at <span class="mono">115200</span>.
327+
Web flashing is fixed to <span class="mono">115200</span> for reliability. Higher baud changes are currently unstable in <span class="mono">esptool-js</span> over WebSerial on some ESP32-C5 boards.
330328
Note: it wipes anything stored in flash (including NVS settings like Wi-Fi creds/config).
331329
</div>
332330
<div class="progress" aria-label="Flash progress">
@@ -389,11 +387,11 @@ <h2>Browser support</h2>
389387
</div>
390388
<footer>
391389
Product of <a href="https://github.com/C5Lab/projectZero/">C5Lab/projectZero</a> -
392-
<span id="pageVersion" class="mono">Web flasher v1.0.5</span>.
390+
<span id="pageVersion" class="mono">Web flasher v1.0.6</span>.
393391
</footer>
394392

395393
<script type="module">
396-
import { ESPLoader, Transport } from "https://unpkg.com/esptool-js/bundle.js";
394+
import { ESPLoader, Transport } from "https://unpkg.com/esptool-js@0.6.0/bundle.js";
397395

398396
const ui = {
399397
status: document.getElementById("statusText"),
@@ -439,7 +437,8 @@ <h2>Browser support</h2>
439437
monitorConnected: false,
440438
};
441439

442-
const PAGE_VERSION = "1.0.5";
440+
const PAGE_VERSION = "1.0.6";
441+
const FLASH_BAUD = 115200;
443442
const monitorEncoder = new TextEncoder();
444443

445444
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
@@ -686,7 +685,7 @@ <h2>Browser support</h2>
686685
try {
687686
state.port.addEventListener("disconnect", state.onDisconnect);
688687
} catch {}
689-
const baud = parseInt(ui.baud.value, 10);
688+
const baud = FLASH_BAUD;
690689
state.transport = new Transport(state.port, true);
691690
const loaderOptions = {
692691
transport: state.transport,
@@ -698,6 +697,9 @@ <h2>Browser support</h2>
698697
},
699698
debugLogging: false,
700699
};
700+
if ((parseInt(ui.baud.value, 10) || FLASH_BAUD) !== FLASH_BAUD) {
701+
log(`Selected baud overridden to stable ${FLASH_BAUD} for WebSerial flashing.`);
702+
}
701703
setStatus(`Syncing with chip (hold BOOT + RESET). Timeout ${Math.round(CONNECT_TIMEOUT_MS/1000)}s`);
702704
log("Syncing with chip");
703705

0 commit comments

Comments
 (0)