Understand the AVR8js architecture and usage model
mainAVR8js implements the AVR 8-bit CPU core. It is not a full hardware simulator out of the box; it only simulates the processor itself. To build a complete simulator (like an Arduino simulator), you must provide the following components:
- Pre-compiled machine code: The binary instructions for the AVR chip.
- Glue code: Logic that connects the AVR8js CPU to your functional simulations.
- Functional hardware simulation: Code that simulates the behavior of external components (e.g., LEDs, buttons, sensors).
- Simulation state display: A UI to show the user the current state of the simulated hardware.
Conceptual Workflow:
Pre-Compiled machine code $\rightarrow$ AVR8js $\leftrightarrow$ Glue code $\leftrightarrow$ external hardware functional simulation $\leftrightarrow$ simulation state display for the user
For visual representations of hardware, you can use the wokwi-elements collection of web-components, but note that these are visual-only and require you to implement the functional simulation and glue code yourself.