simavr-emscripten - an emscripten port of simavr
simavr is a new AVR simulator for linux, or any platform that uses avr-gcc. It uses avr-gcc's own register definition to simplify creating new targets for supported AVR devices. The core was made to be small and compact, and hackable so allow quick prototyping of an AVR project. The AVR core is now stable for use with parts with <= 128KB flash, and with preliminary support for the bigger parts. The simulator loads ELF files directly, and there is even a way to specify simulation parameters directly in the emulated code using an .elf section. You can also load multipart HEX files.
- Install the emscripten SDK [http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html]
- Run build.sh
- Resulting files are simavr.js and simavr.js.mem
- IO ports (including pin interrupts)
- Timers, 8 &16 (Normal, CTC and Fast PWM, the overflow interrupt too)
- The UART, including tx & rx interrupts (there is a loopback/local echo test mode too)
- SPI, master/slave including the interrupt
- i2c Master & Slave
- External Interrupts, INT0 and so on.
- Self-programming (ie bootloaders!)
Emulated Cores (very easy to add new ones!)
- AT90USB162 (with USB!)
Patches are always welcome! Please submit your changes via Github pull requests.
The original version of simavr can be found at [https://github.com/buserror/simavr].
- Removed libelf dependency for emscripten build