How wanchenrui/powerscope works
PowerScope is a desktop tool for live MCU and power-electronics firmware debugging. Its main workflow is to load a device profile, connect over serial, load firmware ELF symbols, then monitor variables and plot or record samples. The graph also preserves documented tuning, safety, AI, and project-adaptation capabilities. Evidence is limited to the README and indexed excerpts; links for unsampled subsystems are included only where README documentation supports them.
Main entry points: power_main_window.py Desktop UI · session_controller.py Session Controller · main.py PowerScope App · variable_inspector_view.py Variable Monitor
Components 23
Desktop and Profiles
- PowerScope App
power_scope/main.py - Device Profile
power_scope/config/device_profile.py - Desktop UI
power_scope/ui/power_main_window.py - ELF / DWARF Parser
power_scope/debug/elf_parser.py - Variable Monitor
power_scope/ui/variable_inspector_view.py - Live Plots
power_scope/ui/scope_view.py - Wave Recording
power_scope/core/session_recorder.py
Session and Transport
- Session Controller
power_scope/session/session_controller.py - Serial Transport
power_scope/transport/serial_transport.py - Mock Transport
power_scope/transport/mock_transport.py
Protocol and Firmware
- Protocol Engine
power_scope/core/protocol_engine.py - Event Bus
power_scope/core/event_bus.py - Native C Core
power_core/src/debug_protocol.c - MCU Debug Stub
mcu_debug_stub/debug_monitor.c
Analysis and Tuning
- Safety Controller
power_scope/core/safety_controller.py - PID Tuning Engine
power_scope/core/tuning_engine.py - Power Simulator
power_scope/core/power_simulator.py
AI and Project Tools
- AI Assistant
power_scope/llm/llm_engine.py - MSG Commands
power_scope/core/msg_service.py - Serial Upgrade
power_scope/ui/serial_upgrade_view.py - Power Dashboard
power_scope/ui/power_dashboard_view.py
Other components
- Engineer
- Firmware State
Connections 24
- Engineer → PowerScope App: launches
README.md - Device Profile → PowerScope App: configures
power_scope/main.py - PowerScope App → Desktop UI: opens
power_scope/main.py - Engineer → ELF / DWARF Parser: loads firmware
README.md - ELF / DWARF Parser → Variable Monitor: supplies symbols
README.md - Device Profile → Variable Monitor: maps variables
README.md - Variable Monitor → Live Plots: selects samples
README.md - Live Plots → Wave Recording: records samples
README.md - Desktop UI → Session Controller: manages connection
README.md - Session Controller → Serial Transport: creates
power_scope/session/session_controller.py - Session Controller → Mock Transport: creates
power_scope/session/session_controller.py - Session Controller → Protocol Engine: parses received data
power_scope/session/session_controller.py - Protocol Engine → Event Bus: publishes frames
power_scope/core/protocol_engine.py - Session Controller → Event Bus: publishes state
power_scope/session/session_controller.py - Serial Transport → MCU Debug Stub: exchanges serial data
README.md - MCU Debug Stub → Firmware State: reads and writes
README.md - Native C Core → Protocol Engine: provides CRC and codec
power_scope/core/protocol_engine.py - Desktop UI → Safety Controller: uses guarded writes
README.md - Desktop UI → PID Tuning Engine: requests tuning
- Desktop UI → Power Simulator: runs simulation
- Desktop UI → AI Assistant: requests assistance
- Desktop UI → MSG Commands: provides commands
power_scope/ui/power_main_window.py - Desktop UI → Serial Upgrade: provides upgrade tools
power_scope/ui/power_main_window.py - Desktop UI → Power Dashboard: provides power view
power_scope/ui/power_main_window.py