Construction options. Defaults match idf.py monitor where a browser can.

interface IDFMonitorOptions {
    autoColor?: boolean;
    baudRate?: number;
    customHardResetSequence?: string;
    customResetSequence?: string;
    decodeAddresses?: boolean;
    decodeCoredumps?: "disable" | "info";
    decodePanic?: "disable" | "backtrace";
    elfFiles?: ElfFile[];
    encrypted?: boolean;
    eol?: EolMode;
    flushIntervalMs?: number;
    keys?: KeyLetters;
    noReset?: boolean;
    openPortAttempts?: number;
    port: MonitorPort;
    printFilter?: string;
    reconnectDelay?: number;
    romElf?: ArrayBuffer | Uint8Array;
    sleep?: ((ms) => Promise<void>);
    target?: string;
    terminal: MonitorTerminal;
    timestampFormat?: string;
    timestamps?: boolean;
}

Properties

autoColor?: boolean

Paint I / W / E log lines. Default true.

baudRate?: number

Baud rate used when this monitor opens the port. Default 115200. Fixed for the session.

customHardResetSequence?: string

Custom hard-reset sequence. Same grammar as IDFMonitorOptions.customResetSequence.

customResetSequence?: string

Custom bootloader sequence (D0|R1|W0.1|U0,1). Overrides classic and USB-JTAG.

decodeAddresses?: boolean

Resolve 0x addresses that fall in an executable ELF section. Default true.

decodeCoredumps?: "disable" | "info"

info captures a UART core dump. disable lets the bytes pass through. Default info.

decodePanic?: "disable" | "backtrace"

backtrace captures a panic register dump. Default disable.

elfFiles?: ElfFile[]

Application ELF, then extra ELFs such as the bootloader. First match wins.

encrypted?: boolean

Report flash requests as encrypted targets.

eol?: EolMode

Line ending written to the device. Default CR.

flushIntervalMs?: number

How long a partial line waits for a newline before it is shown. Default 100.

keys?: KeyLetters

Menu key letters.

noReset?: boolean

Skip the hard reset that normally runs on the first open.

openPortAttempts?: number

Cold-start open attempts. 1 fails immediately, 0 retries forever. Default 1.

Granted Web Serial port, or a WebUSB adapter with the same methods.

printFilter?: string

ESP log filter, for example wifi:I *:E. Empty shows every line.

reconnectDelay?: number

Seconds to wait before reopening a dropped port. Default 0.5. Reconnect does not reset.

romElf?: ArrayBuffer | Uint8Array

ROM ELF used when an address is not in any application image.

sleep?: ((ms) => Promise<void>)

Clock used by reset delays and IDFMonitor.sleep. Tests pass a fake.

Type declaration

    • (ms): Promise<void>
    • Parameters

      • ms: number

        Milliseconds to wait.

      Returns Promise<void>

Returns

Resolves when the wait is over.

target?: string

Chip name. ESP32 uses the longer bootloader delays. Default esp32.

terminal: MonitorTerminal

Terminal that displays output and supplies keystrokes.

timestampFormat?: string

Python strftime subset: %Y %m %d %H %M %S %f %%. Default %Y-%m-%d %H:%M:%S.

timestamps?: boolean

Prefix each chip line with a timestamp.