Commit Graph

37 Commits (ff12b83e343f5079d9e1ca510544aeb599a61f68)

Author SHA1 Message Date
David Montero Crespo ff12b83e34 feat: add ESP-IDF compilation service for QEMU-compatible firmware generation 2026-04-02 02:54:02 -03:00
David Montero Crespo d77a68e896 feat: add ESP-IDF compilation service for QEMU-compatible firmware generation 2026-04-02 00:12:38 -03:00
David Montero Crespo f495a2ce3a feat: implement ESP32 QEMU backend manager and frontend simulation interface 2026-04-01 22:41:52 -03:00
David Montero Crespo 54f8f2782b feat: add ESP32 WiFi/BLE emulation with ESP-IDF compilation pipeline
Replace arduino-cli with ESP-IDF 4.4.7 for ESP32 compilation — Arduino-compiled
firmware crashes in QEMU (9-28 reboots) while ESP-IDF boots cleanly (0 reboots).
The new espidf_compiler translates Arduino WiFi/WebServer sketches to native
ESP-IDF C code, compiles with cmake+ninja, and merges into 4MB flash images.

Key changes:
- ESP-IDF compiler: translates WiFi.begin/WebServer to esp_wifi/esp_http_server
- ESP-IDF project template with QEMU-optimized sdkconfig (DIO, 40MHz, no WDT)
- WiFi status parser for ESP-IDF serial logs (wifi_status, ble_status events)
- IoT Gateway HTTP reverse proxy for ESP32 web servers
- WiFi/BLE auto-detection from sketch content + visual status icons
- Static IP 192.168.4.15 matching slirp DHCP first-client range
- Docker: new espidf-builder stage with ESP-IDF 4.4.7 toolchain
- 157 tests covering WiFi/BLE for both ESP32 (Xtensa) and ESP32-C3 (RISC-V)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 20:53:56 -03:00
David Montero Crespo 0290b24a47 feat: remove unnecessary logging and diagnostic dumps in ESP32 worker; update WS2812 event handling in simulator store 2026-03-24 14:38:08 -03:00
David Montero Crespo 01f75cf313 feat: implement eager scan for LEDC GPIO mapping and add tests for race condition fix 2026-03-24 13:54:44 -03:00
David Montero Crespo d14a9359c9 feat: Fix LEDC channel extraction and enhance GPIO mapping for ESP32 simulation 2026-03-23 11:23:37 -03:00
David Montero Crespo aa6522fd60 feat: Enhance DHT22 sync handling, improve ADC support for ESP32, and update component metadata 2026-03-23 10:37:06 -03:00
David Montero Crespo a473cbe74f feat: Implement synchronous DHT22 response handling and add diagnostic tests 2026-03-23 01:03:01 -03:00
David Montero Crespo 0414a04999 feat: Enhance DHT22 response handling and add logging for GPIO direction changes 2026-03-22 22:17:51 -03:00
David Montero Crespo 5c05d506bb feat: Improve DHT22 response handling in ESP32 simulation and update submodule references 2026-03-22 18:53:32 -03:00
David Montero Crespo 083d8d69a8 feat: Add HC-SR04 sensor support and enhance DHT22 response timing in simulation 2026-03-22 18:39:09 -03:00
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 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 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 20ccd87d1b feat: enhance ESP32 emulation with GPIO mapping and ADC support 2026-03-16 13:11:59 -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 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 4a7c9e2e55 feat: enhance ESP32 emulation with GPIO pinmap and improved QEMU initialization handling 2026-03-14 12:05:35 -03:00
David Montero Crespo c957190061 feat: implement ESP32 emulation support via libqemu-xtensa.dll and enhance simulation API 2026-03-14 02:32:48 -03:00
David Montero Crespo dc03c28fff feat: Enhance ESP32 support in simulator and QEMU management 2026-03-13 22:55:37 -03:00
David Montero Crespo c3df484b4f feat: Implement ESP32 emulation via QEMU and multi-board support for Raspberry Pi and Arduino
- Added ESP32 emulation plan and architecture documentation.
- Created `esp_qemu_manager.py` for managing ESP32 QEMU instances.
- Modified backend API routes to support ESP32 firmware loading and GPIO handling.
- Introduced `Esp32Bridge.ts` for frontend communication with ESP32 instances.
- Refactored simulator store to support multiple boards, including Raspberry Pi and Arduino.
- Created `RaspberryPi3Bridge.ts` for WebSocket communication between frontend and backend for Raspberry Pi.
- Updated QEMU manager to handle multiple serial ports for Raspberry Pi GPIO communication.
- Enhanced SimulatorCanvas to render multiple boards and manage wire routing between them.
- Implemented board picker modal for selecting and adding boards to the canvas.
- Updated editor to support multiple file groups per board.
- Added migration logic for loading old project formats into the new multi-board structure.
- Ensured backward compatibility with existing components and functionality.
2026-03-13 20:35:48 -03:00
David Montero Crespo 17b1a0f058 feat: add board types and mappings for Raspberry Pi 3B
- Introduced new BoardKind types for Raspberry Pi 3B and updated BoardInstance interface.
- Added BOARD_KIND_LABELS and BOARD_KIND_FQBN mappings for new board types.
- Implemented physical to BCM GPIO mapping for Raspberry Pi 3B in boardPinMapping utility.
- Updated BOARD_COMPONENT_IDS to include Raspberry Pi 3B.
- Enhanced isBoardComponent function to support new board type.
- Modified boardPinToNumber function to handle pin mapping for Raspberry Pi 3B.
2026-03-12 23:39:04 -03:00
David Montero Crespo 13997ff491 feat: add documentation page and Arduino serial integration test
- Created a new DocsPage component for project documentation with links to GitHub and Discord.
- Added Arduino sketch for serial communication test between Raspberry Pi and Arduino.
- Implemented avr_runner.js to emulate ATmega328P and bridge serial communication over TCP.
- Developed a Python test script to validate the serial integration between the emulated Raspberry Pi and Arduino.
2026-03-12 08:17:29 -03:00
David Montero Crespo 3fe71b57af feat: enhance library installation to support Wokwi-hosted libraries and update tests accordingly 2026-03-10 01:25:49 -03:00
David Montero Crespo 7260c8d092 feat: /project/:id URL, per-project file volumes, and public/private access control
Backend:
- project_files.py: read/write sketch files to /app/data/projects/{id}/
- GET /api/projects/{id}: load project by ID (public = anyone, private = owner only)
- create/update write files to disk volume; delete removes them
- ProjectResponse includes files[] list loaded from disk

Frontend:
- /project/:id canonical route -> ProjectByIdPage
- ProjectPage (legacy /:username/:slug) redirects to /project/:id after load
- SaveProjectModal sends files[] and navigates to /project/{id} after save
- DATA_DIR env var in both compose files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 20:38:06 -03:00
David Montero Crespo a5c6987aca feat: implement user authentication and project management features
- Add LoginPage and RegisterPage for user authentication.
- Create UserProfilePage to display user projects.
- Implement ProjectPage for viewing and editing individual projects.
- Introduce authService for handling user login, registration, and session management.
- Add projectService for managing project data retrieval and manipulation.
- Enhance EditorPage with file management capabilities and save prompts.
- Introduce Zustand stores for managing authentication, editor state, and project state.
- Add reserved usernames utility to prevent certain usernames during registration.
- Update compilation service to handle multiple files for Arduino sketches.
2026-03-06 10:14:50 -03:00
David Montero Crespo 9b8747349f feat: enhance RP2040 and AVR simulators with serial baud rate handling; update editor toolbar and library manager modal for improved state management and UI 2026-03-05 21:07:10 -03:00
David Montero Crespo 4ba2ccb877 Refactor simulator store to unify serial data handling and add board pin mapping utility
- Simplified serial data handling in `useSimulatorStore` for both AVR and RP2040 simulators.
- Introduced `boardPinMapping.ts` to map wokwi-element pin names to simulator GPIO/pin numbers for Arduino Uno and Nano RP2040.
- Added `compilationLogger.ts` to parse compile results into structured log entries for better console output.
2026-03-05 21:07:03 -03:00
David Montero Crespo 9925d8b31e refactor: optimize library search and installation methods for improved performance and error handling 2026-03-04 23:17:23 -03:00
David Montero Crespo 426c7ab35f feat: establish initial simulator and editor environment with component rendering, wiring, library management, and backend services. 2026-03-04 22:05:23 -03:00
David Montero Crespo 7944ce2de3 feat: add support for RP2040 board, including simulator and compilation enhancements 2026-03-04 19:28:33 -03:00
David Montero Crespo a8c4f143af feat: Implement Arduino Simulator with component management and simulation features
- Added SimulatorCanvas component for rendering the simulator interface.
- Integrated Wokwi components (Arduino, LED, Resistor, Pushbutton, Potentiometer) into the simulator.
- Created PinManager to handle pin state changes and notifications.
- Developed AVRSimulator class for emulating Arduino Uno functionality.
- Implemented hex file loading and compilation service.
- Added CSS styles for the simulator interface.
- Established Zustand stores for managing editor and simulator states.
- Created utility functions for parsing Intel HEX format.
- Set up Vite configuration for the frontend project.
- Added batch scripts for starting backend and frontend servers, and updating Wokwi libraries.
2026-03-03 00:20:49 -03:00