Skip to main content

pyavrutils can build AVR and arduino code from python

Project description

pyavrutils is a Python library that can build AVR and arduino code at runtime.

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

  • 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:
  • 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
# optional for examples:
sudo pip install entrypoint2

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.2.tar.gz (18.9 kB view details)

Uploaded Source

File details

Details for the file pyavrutils-0.1.2.tar.gz.

File metadata

  • Download URL: pyavrutils-0.1.2.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyavrutils-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a5569441402510b7a6aa697996e80abfce6b0084eacc2831af1ccf56f189a4e1
MD5 78f2d588f6493bfa10880b9522d2e6be
BLAKE2b-256 a48b77b06cf603461a782dbd3798930c63a949a624eb0bfab95eafad763200e8

See more details on using hashes here.

Supported by

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