gen_avr8

AVR project skeleton generator

View the Project on GitHub vroncevic/gen_avr8

AVR project skeleton generator

☯️ gen_avr8 is tool for generation of AVR8 project skeleton for development of embedded applications.

Developed in 🐍 python code.

codecov circleci

The README is used to introduce the tool modules and provide instructions on how to install the tool modules, any machine dependencies it may have and any other information that should be provided before the modules are installed.

gen_avr8 python checker gen_avr8 package checker GitHub issues open GitHub contributors

Table of Contents

Installation

Used next development environment

debian linux os

gen_avr8 python2 build gen_avr8 python3 build

Currently there are three ways to install package

Install using pip

Python 📦 is located at pypi.org.

You can install by using pip

#python2
pip install gen-avr8
#python3
pip3 install gen-avr8
Install using build

Navigate to release page download and extract release archive 📦.

To install gen_avr8 📦 type the following

tar xvzf gen_avr8-x.y.z.tar.gz
cd gen_avr8-x.y.z/
# python2
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python2 get-pip.py 
python2 -m pip install --upgrade setuptools
python2 -m pip install --upgrade pip
python2 -m pip install --upgrade build
pip2 install -r requirements.txt
python2 -m build --no-isolation --wheel
pip2 install ./dist/gen_avr8-*-py2-none-any.whl
rm -f get-pip.py
chmod 755 /usr/local/lib/python2.7/dist-packages/usr/local/bin/gen_avr8_run.py
ln -s /usr/local/lib/python2.7/dist-packages/usr/local/bin/gen_avr8_run.py /usr/local/bin/gen_avr8_run.py
# python3
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py 
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
pip3 install -r requirements.txt
python3 -m build --no-isolation --wheel
pip3 install ./dist/gen_avr8-*-py3-none-any.whl
rm -f get-pip.py
chmod 755 /usr/local/lib/python3.9/dist-packages/usr/local/bin/gen_avr8_run.py
ln -s /usr/local/lib/python3.9/dist-packages/usr/local/bin/gen_avr8_run.py /usr/local/bin/gen_avr8_run.py
Install using py setup

Navigate to release page download and extract release archive 📦.

To install gen_avr8 📦 locate and run setup.py with arguments

tar xvzf gen_avr8-x.y.z.tar.gz
cd gen_avr8-x.y.z
# python2
pip2 install -r requirements.txt
python2 setup.py install_lib
python2 setup.py install_egg_info
# python3
pip3 install -r requirements.txt
python3 setup.py install_lib
python3 setup.py install_egg_info
Install using docker

You can use Dockerfile to create image/container 🚢.

gen_avr8 docker checker

Dependencies

gen_avr8 tool requires other modules/libraries

Usage

Short example of usage gen_avr8 tool

Create workspace directory Blink

mkdir Blink
cd Blink/

Crete AVR8 project files, by using parameters

python gen_avr8_run.py -g Blink -t app

Running build process

cd build/
make all

In case for missing subtool from toolchain, please install the following packages with your favorite package manager

Install directly from the shell as root user (debian)

apt-get install gcc-avr binutils-avr gdb-avr avr-libc avrdude

Supported MCUS

Current list of supported microcontrollers

attiny2313    atmega128      at90s2313
attiny24      atmega1280     at90s2333
attiny25      atmega1281     at90s4414
attiny26      atmega1284p    at90s4433
attiny261     atmega16       at90s4434
attiny44      atmega163      at90s8515
attiny45      atmega164p     at90s8535
attiny461     atmega165
attiny84      atmega165p
attiny85      atmega168
attiny861     atmega169
              atmega169p
              atmega2560
              atmega2561
              atmega32
              atmega324p
              atmega325
              atmega3250
              atmega329
              atmega3290
              atmega32u4
              atmega48
              atmega64
              atmega640
              atmega644
              atmega644p
              atmega645
              atmega6450
              atmega649
              atmega6490
              atmega8
              atmega8515
              atmega8535
              atmega88

Generation flow of project setup

Base flow of generation process

Generation flow

Tool structure

gen_avr8 is based on Template mechanism

Project modules

🧰 Generator structure

gen_avr8/
├── conf/
|   ├── gen_avr8.logo
│   ├── fosc.yaml
│   ├── gen_avr8.cfg
│   ├── gen_avr8_util.cfg
│   ├── mcu.yaml
│   ├── project_app.yaml
│   ├── project_lib.yaml
│   └── template/
│       ├── app/
│       │   ├── cflags.template
│       │   ├── csflags.template
│       │   ├── Makefile.template
│       │   ├── module.template
│       │   ├── objects.template
│       │   ├── ocflags.template
│       │   ├── odflags.template
│       │   ├── sources.template
│       │   ├── subdir.template
│       │   └── tools.template
│       └── lib/
│           ├── aflags.template
│           ├── avr_lib_c.template
│           ├── avr_lib_h.template
│           ├── cflags.template
│           ├── csflags.template
│           ├── Makefile.template
│           ├── objects.template
│           ├── ocflags.template
│           ├── odflags.template
│           ├── sources.template
│           ├── subdir.template
│           └── tools.template
├── __init__.py
├── log/
│   └── gen_avr8.log
├── pro/
│   ├── __init__.py
│   ├── mcu_selector.py
│   ├── module_type.py
│   ├── osc_selector.py
│   ├── read_template.py
│   ├── template_dir.py
│   ├── template_type.py
│   └── write_template.py
└── run/
    └── gen_avr8_run.py

Docs

Documentation Status

📗 More documentation and info at

Contributing

🌎 🌍 🌏 Contributing to gen_avr8

License: GPL v3 License

Copyright (C) 2018 by vroncevic.github.io/gen_avr8

gen_avr8 is free software; you can redistribute it and/or modify it under the same terms as Python itself, either Python version 2.x/3.x or, at your option, any later version of Python 3 you may have available.

Lets help and support PSF.

Python Software Foundation

Donate