probe-web / @probe-web/ui / ProbeFlashPanel
Class: ProbeFlashPanel
Defined in: packages/ui/src/flash-panel.ts:44
<probe-flash-panel>: picks an image (a file, a watched file, or a preset FlashJob), shows the per-operation progress probe-rs reports (fill/erase/program/verify), and offers verify-only and erase-all.
With the File System Access API, Pick file & watch… keeps a handle to the file (remembered across reloads under ProbeFlashPanel.rememberAs) and re-flashes whenever it changes on disk.
Fires
flash-done: Flashing succeeded.detailis{ bootInfo, ms }: theWire.BootInfoto hand to<probe-rtt-terminal>/<probe-test-runner>, and the duration in milliseconds.flash-failed: Flashing threw.detailis the error.verify-done: A verify-only run finished.detailis theWire.VerifyResult('Ok'or'Mismatch').erase-done: An erase-all finished. Nodetail.artifact-changed: The watched file changed on disk.detailis theArtifactChangefrom@probe-web/artifacts(name,bytes,lastModified). Fired before the automatic re-flash starts.
Example
<probe-flash-panel id="flash" chip-erase></probe-flash-panel>const flash = document.querySelector('probe-flash-panel')!;
flash.session = session;
flash.addEventListener('flash-done', (e) => {
const { bootInfo, ms } = (e as CustomEvent<{ bootInfo: Wire.BootInfo; ms: number }>).detail;
rtt.bootInfo = bootInfo;
});Extends
LitElement
Constructors
Constructor
new ProbeFlashPanel(): ProbeFlashPanel;Defined in: node_modules/@lit/reactive-element/development/reactive-element.d.ts:527
Returns
ProbeFlashPanel
Inherited from
LitElement.constructorProperties
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
session | Session | null | null | The attached session to flash through; the buttons are disabled without one. | packages/ui/src/flash-panel.ts:84 |
job | FlashJob | null | null | Optional preset job (e.g. from a manifest). A chosen or watched file overrides its image; its format, base address, skip and options are kept. | packages/ui/src/flash-panel.ts:89 |
verify | boolean | true | Verify the flash contents after programming. | packages/ui/src/flash-panel.ts:91 |
chipErase | boolean | false | Erase the whole chip rather than only the sectors being written. | packages/ui/src/flash-panel.ts:93 |
keepUnwritten | boolean | false | Preserve the bytes of partially written sectors instead of leaving them erased. | packages/ui/src/flash-panel.ts:95 |
rememberAs | string | 'flash-panel' | Key under which the picked file handle is remembered (in IndexedDB) across reloads. Give each panel on a page its own key. | packages/ui/src/flash-panel.ts:107 |
Accessors
effectiveJob
Get Signature
get effectiveJob(): FlashJob | null;Defined in: packages/ui/src/flash-panel.ts:224
The job the Flash button would run: the chosen file, else the watched file, else ProbeFlashPanel.job's image, combined with the panel's format, address and option settings. null when there is no image.
Returns
FlashJob | null
Methods
resumeWatch()
resumeWatch(): Promise<void>;Defined in: packages/ui/src/flash-panel.ts:161
Resume watching the file remembered from a previous visit, asking the browser for read permission again. Needs a user gesture (the Resume watching button).
Returns
Promise<void>
forgetRemembered()
forgetRemembered(): Promise<void>;Defined in: packages/ui/src/flash-panel.ts:174
Drop the remembered file handle so it is not offered again.
Returns
Promise<void>
pickAndWatch()
pickAndWatch(): Promise<void>;Defined in: packages/ui/src/flash-panel.ts:183
Pick a file with the File System Access API, remember it, and watch it: each change fires artifact-changed and, while re-flash on change is ticked, flashes it.
Returns
Promise<void>
clearArtifact()
clearArtifact(): void;Defined in: packages/ui/src/flash-panel.ts:212
Stop watching and forget the picked file.
Returns
void
flash()
flash(): Promise<void>;Defined in: packages/ui/src/flash-panel.ts:278
Flash ProbeFlashPanel.effectiveJob; fires flash-done or flash-failed. No-op without a session or image.
Returns
Promise<void>
verifyOnly()
verifyOnly(): Promise<void>;Defined in: packages/ui/src/flash-panel.ts:309
Compare the flash with ProbeFlashPanel.effectiveJob's image without writing; fires verify-done.
Returns
Promise<void>
eraseAll()
eraseAll(): Promise<void>;Defined in: packages/ui/src/flash-panel.ts:325
Erase the whole flash; fires erase-done.
Returns
Promise<void>