Skip to main content

pyavrutils can build AVR and arduino code from python

Project description

pyavrutils can build AVR and arduino code from python

Links:
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

Known problems:
  • Python 3 is not supported

  • temp files are not removed

  • arscons has some problems:
    • it builds bigger programs

    • compile error in some cases

Possible usage:
  • experimenting with flags

  • building from paver

  • unit tests

  • building arduino code without GUI

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

General

if you have setuptools installed:

# as root
pip install pyavrutils

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

Uninstall

using pip:

# as root
pip uninstall pyavrutils

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyavrutils-0.1.0.tar.gz (17.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page