Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

python wrapper for simavr which is AVR and arduino simulator

branch: master

convert filename to str

latest commit 640f75f92d
ponty authored January 09, 2014
Octocat-spinner-32 docs doc February 23, 2013
Octocat-spinner-32 pysimavr convert filename to str January 09, 2014
Octocat-spinner-32 tests fixing logger March 14, 2013
Octocat-spinner-32 .gitignore new setup+tox March 11, 2012
Octocat-spinner-32 .gitmodules simavr is a git submodule February 23, 2013
Octocat-spinner-32 LICENSE rename license July 25, 2011
Octocat-spinner-32 MANIFEST.in fix MANIFEST February 07, 2013
Octocat-spinner-32 README.rst remove requirement: entrypoint2 February 16, 2013
Octocat-spinner-32 TODO doc July 25, 2011
Octocat-spinner-32 pavement.py simplify pavement March 14, 2013
Octocat-spinner-32 requirements.txt remove requirement: entrypoint2 February 16, 2013
Octocat-spinner-32 setup.py pep8 February 23, 2013
Octocat-spinner-32 tox.ini tox February 16, 2013
README.rst

pysimavr is a python wrapper for simavr which is AVR and arduino simulator

Links:
Features:
  • python wrapper using swig
  • simavr source code is included for easier installation
  • object oriented interface on top of the generated interface
  • maximum speed can be real-time
  • serial communication
  • check simavr documentation
Known problems:
  • included simavr source code is not up to date
  • Python 3 is not supported
  • tested only on linux
  • more tests needed
  • PWM simulation is not real-time
  • missing PWM modes
  • a lot of messages on stdout
  • LCD simulator is not fully implemented
Possible usage:
  • unit test
  • simulator
Similar projects:

Basic usage

>>> from pysimavr.avr import Avr
>>> avr=Avr(mcu='atmega48',f_cpu=8000000)
>>> firmware = Firmware('lcd.elf')
>>> avr.load_firmware(firmware)
>>> from pysimavr.sim import ArduinoSim
>>> print ArduinoSim(snippet='Serial.print("hello!");').get_serial()
hello!

Installation

check simavr doc: http://gitorious.org/simavr/pages/GetStarted

ignore these in simavr doc:
  • OpenGl (freeglut)
  • gcc-avr
  • avr-libc
  • make

General

  • install python

  • install pip

  • install swig (for source build only)

  • install header files and a static library for Python (for source build only)

  • install a compiler (for source build only)

  • install elf library

  • install the program:

    # as root
    pip install pysimavr
    

Ubuntu

sudo apt-get install python-pip
sudo apt-get install swig
sudo apt-get install python-dev
sudo apt-get install gcc
sudo apt-get install libelf-dev
sudo pip install pysimavr
# optional for examples:
sudo pip install entrypoint2

Uninstall

# as root
pip uninstall pysimavr
Something went wrong with that request. Please try again.