ponty / pysimavr

python wrapper for simavr which is AVR and arduino simulator
GNU General Public License v3.0
49 stars 14 forks source link

How do I compile the project from source? #7

Closed chippography closed 8 years ago

chippography commented 8 years ago

I clone the project and submodule:

git clone --recursive https://github.com/ponty/pysimavr.git

Install the libc headers

apt-get install avr-libc cp $AVR_LIBC_INCLUDE/avr/* $PYSIMAVR/pysimavr/swig/include/avr

Generate the sim_core_decl.h (because it is missing)

cd pysimavr/swig/sim/simavr/ make sim_core_decl.h

Install it

pip install .

Then in python

    from pysimavr.avr import Avr
  File "/usr/local/lib/python2.7/dist-packages/pysimavr/avr.py", line 3, in <module>
    from pysimavr.logger import init_simavr_logger, terminate_simavr_logger
  File "/usr/local/lib/python2.7/dist-packages/pysimavr/logger.py", line 1, in <module>
    from pysimavr.swig.simavr import use_mem_logger, mem_logger_read_line
ImportError: No module named swig.simavr

Running in Ubuntu 14.10, also installed:

apt-get -y update apt-get -y install python apt-get -y install python-pip apt-get -y install swig apt-get -y install python-dev apt-get -y install gcc apt-get -y install libelf-dev

Thanks, any help appreciated!!!

ponty commented 8 years ago

I made a lot of updates, please try the latest version.