Commit Graph

277 Commits (4e3d5090e2309c09e7a9eb05e8b4590bed1d7fe4)

Author SHA1 Message Date
David Montero Crespo 6a55f58e46 feat: Implement generic sensor registration for ESP32 and RP2040
- Added board-agnostic sensor registration methods in RP2040Simulator.
- Enhanced ComplexParts to handle LEDC PWM duty updates for ESP32.
- Updated ProtocolParts to check if the simulator handles sensor protocols natively, delegating to backend if applicable.
- Introduced pre-registration of sensors in useSimulatorStore for ESP32 to prevent race conditions.
- Added tests for ESP32 DHT22 sensor registration flow, ensuring proper delegation and fallback mechanisms.
- Created tests for ESP32 Servo and Potentiometer interactions, verifying PWM subscriptions and ADC handling.
2026-03-22 18:03:17 -03:00
David Montero Crespo f5257009cd feat: implement DHT22 sensor support with attach, update, and detach functionality in ESP32 simulation 2026-03-22 15:17:44 -03:00
David Montero Crespo 84370e6f8d feat: enhance simulator interfaces and add ESP32 bridge shim for improved component interaction 2026-03-22 02:25:58 -03:00
David Montero Crespo ee7281383c feat: remove unnecessary logging and streamline potentiometer and servo simulations 2026-03-21 17:20:48 -03:00
David Montero Crespo aac3465d49 feat: update component metadata timestamp and enhance RP2040 simulator for accurate PIO stepping and servo calibration 2026-03-21 17:12:06 -03:00
David Montero Crespo 43f13e1bc2 feat: implement synchronous PIO stepping and enhance servo pulse width measurement 2026-03-21 16:41:20 -03:00
David Montero Crespo b900f960ad feat: update pin mappings and descriptions for Raspberry Pi Pico examples 2026-03-21 14:02:46 -03:00
David Montero Crespo dc5dfb8635 feat: enhance simulation accuracy and component interactions across various modules 2026-03-20 17:11:12 -03:00
David Montero Crespo f6fdae6b0e feat: enhance DHT22 and HC-SR04 simulations with cycle-accurate pin changes 2026-03-19 08:22:36 -03:00
David Montero Crespo 8ba11800e1 feat: add SensorControlPanel for interactive sensor controls
- Implemented SensorControlPanel component to allow real-time adjustments of sensor values during simulation.
- Introduced SensorUpdateRegistry for communication between UI and simulation.
- Added configuration for various sensors including sliders and buttons for user interaction.
- Enhanced existing sensor parts to support updates from SensorControlPanel.
- Created CSS styles for the SensorControlPanel layout and controls.
2026-03-19 01:52:46 -03:00
David Montero Crespo d170b4f7ea Add generate_examples.py script and update subproject commits
- Introduced a new script `generate_examples.py` to catalog board and sensor combinations, generating TypeScript example stubs for the frontend.
- Updated subproject commit references for `qemu-lcgamboa`, `rp2040js`, and `wokwi-elements` to indicate they are in a dirty state.
2026-03-19 01:12:29 -03:00
David Montero Crespo 765a3ff711 feat: remove RiscVBoard references and related code from various components 2026-03-18 23:33:20 -03:00
David Montero Crespo 7053b6f2c8 feat: update ESP32-C3 simulator and add emulation tests
- Updated components-metadata.json with new generated timestamp.
- Refactored Esp32C3Simulator.ts to remove unnecessary debug variables and logging, and added support for additional ROM functions.
- Modified useSimulatorStore.ts to clarify bridge usage for ESP32 boards.
- Updated submodules for QEMU and other libraries to indicate dirty state.
- Added test_esp32c3_emulation.py for end-to-end testing of ESP32-C3 emulation, including compilation, flash image merging, and GPIO event checking.
2026-03-18 23:30:45 -03:00
David Montero Crespo 372e0f1d00 feat: update ESP32-C3 wiring and enhance ROM function emulation with detailed logging 2026-03-17 23:06:36 -03:00
David Montero Crespo 0e7ef38104 chore: clean up empty code change sections in the changes log 2026-03-17 22:12:01 -03:00
David Montero Crespo dcea546e45 feat: add SPI flash and EXTMEM controller stubs, implement echo-back for peripheral register writes 2026-03-17 22:11:52 -03:00
David Montero Crespo 507fa0671c feat: enhance ESP32-C3 simulator with ROM stubs, timer group handling, and diagnostic logging 2026-03-17 16:46:44 -03:00
David Montero Crespo 220346f220 feat: enhance ESP32 emulation with SYSTIMER and interrupt handling, update GPIO pin mapping for power/GND 2026-03-17 10:08:06 -03:00
David Montero Crespo fdbc37b69b feat: enhance WebSocket error handling and cleanup logic in simulation and ESP32 libraries 2026-03-17 02:28:08 -03:00
David Montero Crespo f5323aa557 feat: enhance AVRSimulator for ATmega2560 support with updated interrupt configurations 2026-03-16 23:08:51 -03:00
David Montero Crespo c19a6cb848 feat: update PWM handling in SimulatorCanvas and enhance I2C Scanner example with SSD1306 OLED integration 2026-03-16 22:15:52 -03:00
David Montero Crespo d35ad2d2f7 Refactor code structure for improved readability and maintainability 2026-03-16 18:31:46 -03:00
David Montero Crespo 16164372cf feat: replace code snippets with CodeBlock component for improved formatting in documentation 2026-03-16 14:44:06 -03:00
David Montero Crespo e8006594d3 feat: import CodeBlock component in DocsPage for enhanced documentation 2026-03-16 14:39:54 -03:00
David Montero Crespo 975d004821 feat: add CodeBlock component with syntax highlighting and update dependencies 2026-03-16 14:39:49 -03:00
David Montero Crespo e24ab79ffe feat: add board gallery and supported boards sections to documentation 2026-03-16 14:39:18 -03:00
David Montero Crespo eb4b691f2d feat: add RP2040 and Raspberry Pi 3 emulation sections to documentation 2026-03-16 14:37:08 -03:00
David Montero Crespo 8c1c0e105d Refactor code structure for improved readability and maintainability 2026-03-16 14:28:16 -03:00
David Montero Crespo 2b19181c2b Refactor code structure for improved readability and maintainability 2026-03-16 14:22:23 -03:00
David Montero Crespo a40471fa38 feat: update RISCV_EMULATION documentation with English translations and improvements 2026-03-16 14:22:18 -03:00
David Montero Crespo 8e38bd2fa1 Implement feature X to enhance user experience and fix bug Y in module Z 2026-03-16 13:23:31 -03:00
David Montero Crespo 20ccd87d1b feat: enhance ESP32 emulation with GPIO mapping and ADC support 2026-03-16 13:11:59 -03:00
David Montero Crespo bc31ee76c1 feat: enhance oscilloscope and simulator functionality
- Added `onPinStateChange` method to `ChipParts` for handling pin state changes in 7-segment displays.
- Updated `useOscilloscopeStore` to allow independent monitoring of multiple boards by adding `boardId` to channels and modifying `addChannel` method.
- Modified `getOscilloscopeCallback` in `useSimulatorStore` to filter channels based on `boardId` and pin number.
- Adjusted component and board position calculations in `useSimulatorStore` to account for wrapper offsets.
- Updated submodule references for `qemu-lcgamboa`, `rp2040js`, and `wokwi-elements` to indicate dirty states.
2026-03-16 10:31:02 -03:00
David Montero Crespo 5e6c5d451b feat: enhance oscilloscope dropdown and multi-board picker styles 2026-03-16 10:30:51 -03:00
David Montero Crespo b98bf715f0 Add UserProfilePage styles for layout and design 2026-03-16 00:12:33 -03:00
David Montero Crespo 5311a01103 Refactor code structure for improved readability and maintainability 2026-03-15 23:15:38 -03:00
David Montero Crespo 5439dcf65f feat: add RISC-V emulation documentation and update ESP32 emulation section 2026-03-15 23:15:31 -03:00
David Montero Crespo 74e7ec58c1 Add bare-metal ESP32-C3 blink example with simulator support
- Implemented a simple LED blink program in C for the ESP32-C3, targeting RV32IMC architecture.
- Created a linker script to define memory layout for the ESP32-C3.
- Added build script to compile the blink program using the riscv32-esp-elf-gcc toolchain.
- Developed Esp32C3Simulator to emulate ESP32-C3 behavior in the browser, including GPIO and UART functionality.
- Implemented utility functions to parse ESP32 flash images and handle loading of binary data.
- Included disassembly output for debugging purposes.
- Added necessary test fixtures for the blink example.
2026-03-15 18:40:08 -03:00
David Montero Crespo 7ab0f132a3 feat: add visual components for ATtiny85, Raspberry Pi Pico W, and RISC-V Board
- Implemented ATtiny85 visual component with DIP-8 layout and built-in LED.
- Added Raspberry Pi Pico W web component using official SVG and pin mapping.
- Created RISC-V Board visual component with SOP-20 style and built-in LED.
- Introduced RiscVCore class for minimal RV32I ISA interpreter with memory model.
- Developed RiscVSimulator class for CH32V003-compatible simulator with UART and GPIO support.
- Updated subproject commits for qemu-lcgamboa, rp2040js, and wokwi-elements to dirty state.
2026-03-15 15:39:26 -03:00
David Montero Crespo c69094e7d7 feat: Implement Virtual File System for Raspberry Pi 3 with context menu and upload functionality
- Add VirtualFileSystem component for managing files and directories.
- Integrate useVfsStore for state management of the virtual file system.
- Implement context menu for file operations: New File, New Folder, Rename, Delete.
- Add upload functionality to send files to Raspberry Pi.
- Create default file structure for new Raspberry Pi boards.
- Enhance editor with board-aware features and compile/run orchestration.
- Introduce CompileAllProgress component for tracking compilation status across boards.
- Redesign SerialMonitor to support multiple boards with tabbed interface.
- Establish Raspberry Pi specific workspace with terminal and file system integration.
2026-03-15 14:04:01 -03:00
David Montero Crespo de60d339c9 feat: increase zIndex for WireLayer to improve overlay visibility 2026-03-14 23:13:52 -03:00
David Montero Crespo 00b0893186 feat: update zIndex for PinOverlay and mark subproject commits as dirty 2026-03-14 23:09:36 -03:00
David Montero Crespo fe89d06787 feat: implement segment dragging functionality in simulator canvas 2026-03-14 23:09:32 -03:00
David Montero Crespo 405ff1f017 Refactor wire management and rendering logic
- Updated wire structure to replace control points with waypoints for better handling of wire paths.
- Introduced new utility functions for wire hit detection and rendering segments.
- Enhanced wire creation process to support dynamic waypoints and color assignment.
- Implemented a new ESP32 worker for improved simulation handling.
- Added utility functions for generating orthogonal paths and auto-coloring wires based on pin names.
- Improved compatibility with existing projects by ensuring backward compatibility with wire data structures.
2026-03-14 22:55:13 -03:00
David Montero Crespo b0b3a8763d V1 feat: Enhance ESP32 emulation support and logging
- Added detailed logging for GPIO changes, system events, and errors in simulation websocket.
- Improved ESP32 firmware handling by merging individual binaries into a single 4MB flash image.
- Updated ESP32 bridge to handle serial output and GPIO changes with appropriate logging.
- Introduced integration test for ESP32 emulation, covering compilation, WebSocket connection, and event handling.
- Enhanced examples to include ESP32 projects and updated the examples gallery to reflect new board types.
- Refactored simulator store to manage ESP32 bridge and simulator instances more effectively.
- Updated requirements to include esptool for ESP32 firmware management.
2026-03-14 16:57:22 -03:00
David Montero Crespo a99a9d512f feat: enhance ESP32 emulation with QEMU integration and update documentation 2026-03-14 14:35:59 -03:00
David Montero Crespo d2e7dc2f34 chore: remove test_dll_minimal.py (superseded by test_esp32_lib_bridge.py)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:34:26 -03:00
David Montero Crespo 67256e7b18 chore: remove one-off build troubleshooting scripts
Keep only build_qemu_step4.sh (the DLL relink step used in production).
Deleted: build_qemu_dll.sh, build_qemu_step3.sh, check_tools.sh,
fix_distlib.sh, fix_distlib2.sh, install_git.sh, install_meson.sh
(all were used once during initial DLL compilation setup)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:34:07 -03:00
David Montero Crespo d1492c48cb docs: rewrite ESP32_EMULATION.md with complete installation guide
Add step-by-step setup section (section 1) covering:
- MSYS2 installation and required packages
- arduino-cli + esp32:esp32@2.0.17 core install
- esptool installation
- Building libqemu-xtensa.dll from qemu-lcgamboa submodule
- Obtaining ESP32 ROM binaries
- Python venv + backend dependencies
- Verifying with test suite (28 + 13 tests)
- Running backend with ESP32 emulation active
- Compiling custom sketches for QEMU

Update section 11 (Frontend events): all events are now implemented
(gpio_change, ledc_update, ws2812_update, gpio_dir, i2c_event, spi_event,
system:crash/reboot) — removed "Pending" status, added  for each.

Update section 10 (Tests): document both test suites with per-test table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:33:17 -03:00
David Montero Crespo b166b8de37 feat: add ESP32 lcgamboa test suite, sketches and firmware binaries
- test/esp32/test_esp32_lib_bridge.py: 28-test suite for ESP32 emulation
  via libqemu-xtensa.dll (GPIO, UART, ADC, pinmap, DLL symbols, manager API)
- test/esp32/test_arduino_esp32_integration.py: 13-test integration suite
  simulating Arduino Uno ↔ ESP32 serial communication (LED_ON/OFF, PING/PONG,
  GPIO transitions, rapid burst, unknown command resilience)
- sketches/blink_lcgamboa/: IRAM/DRAM-safe blink firmware (5× GPIO2 toggle)
- sketches/serial_led/: ESP32 firmware responding to serial commands over UART0
- sketches/arduino_serial_controller/: Arduino Uno sketch for serial LED control
- sketches/blink_qemu.ino: reference blink sketch for stock QEMU
- binaries_lcgamboa/: pre-compiled 4 MB merged flash images for QEMU
  (blink_lcgamboa + serial_led, arduino-esp32 2.0.17 + FlashMode=dio)
- .gitignore: exclude DLL/ROM binaries (too large) and .elf/.map build artifacts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:28:40 -03:00