How to install pyavrutils
- Download and install ActivePython
- Open Command Prompt
- Type
pypm install pyavrutils
Lastest release
pyavrutils is a Python library that can build AVR and arduino code at runtime.
- Links:
- home: https://github.com/ponty/pyavrutils
- documentation: http://ponty.github.com/pyavrutils
- Features:
- python wrapper for avr-gcc, avr-size, arscons
- build files or strings (strings are saved as temp files)
- MCU list
- get code size using avr-size
- avr-gcc default is optimized for size
- supported python versions: 2.6, 2.7
- Known problems:
- temp files are not removed
- arscons does not perfectly matches the Arduino build process
- Possible usage:
Basic usage
>>> from pyavrutils import AvrGcc >>> cc = AvrGcc() >>> cc.build('int main(){}') >>> cc.size().program_bytes 66>>> from pyavrutils import Arduino >>> cc = Arduino() >>> cc.mcu = 'atmega8' >>> cc.build('void setup(){};void loop(){}') >>> cc.size().program_bytes 1612
Installation
Ubuntu
sudo apt-get install python-pip sudo apt-get install binutils-avr sudo apt-get install gcc-avr sudo apt-get install scons sudo apt-get install arduino sudo pip install pyavrutils # optional for examples: sudo pip install entrypoint2