You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. CLI parses args → BuildRequest JSON
2. HTTP POST /api/operations/build → daemon
3. Daemon acquires project lock
4. BuildRequestProcessor:
a. Parse platformio.ini → PlatformIOConfig
b. Detect platform → select orchestrator
c. Resolve toolchain package → download if needed
d. Resolve library packages → download if needed
e. Scan sources → compute dependency graph
f. Parallel compile (--jobs N) → object files
g. Link → ELF binary
h. objcopy → HEX/BIN firmware
i. Size report → SizeInfo
5. Daemon releases lock, returns BuildResult
6. CLI displays result + size info
Deploy Request
1. CLI parses args → DeployRequest JSON
2. HTTP POST /api/operations/deploy → daemon
3. DeployRequestProcessor:
a. Optional: build firmware (skip if skip_build=true)
b. Notify serial monitors: preemption starting
c. Force-close serial sessions on target port
d. Invoke deployer (esptool/avrdude/picotool)
e. Wait for flash + device reset
f. Clear preemption notification
g. Optional: start monitor (if monitor_after=true)
- 2s USB-CDC re-enumeration delay
- Open serial port (30 retries on Windows)
- Attach as monitor reader
4. CLI displays result
Test-Emu Request
1. CLI parses args → TestEmuRequest JSON
2. HTTP POST /api/test-emu → daemon
3. Daemon selects emulator runner (avr8js, simavr, or QEMU)
based on platform, MCU, and optional --emulator flag.
Unsupported boards fail fast before building.
4. Daemon acquires project lock, builds firmware,
releases lock before emulator phase.
5. EmulatorRunner::run():
a. Validate artifact bundle (hex/elf/bin)
b. Launch emulator process (Node.js, simavr, or QEMU)
c. Monitor stdout/stderr with halt-on-error/success/expect
d. On timeout: kill process, report TimedOut
e. On halt pattern: kill process, report Passed/Failed
f. On process exit: classify outcome (Passed/Failed/Crashed)
6. Daemon returns EmulatorRunResult with outcome,
stdout, stderr, and real process exit code.
7. CLI prints output and exits with the emulator exit code.