Skip to main content

riotgen: generator for RIOT source code

Project description

CI status codecov riotgen version

riotgen is a command line interface helper tool that is used to bootstrap RIOT source files for standalone applications, board supports, driver modules, system modules, packages and example/test applications.

riotgen is Python 3.7+ compatible.

Installation

Install riotgen using pip:

pip install riotgen

Installing from source

Clone this repository:

git clone git://github.com/aabadie/riot-generator.git

Install using pip from the source directory:

cd riot-generator
pip install .

Usage

riotgen uses subcommands for generating the code for applications, tests, packages and board support:

riotgen --help
Usage: riotgen [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  application  Bootstrap a RIOT application
  board        Bootstrap a RIOT board support
  driver       Bootstrap a RIOT driver module
  example      Bootstrap a RIOT example application
  module       Bootstrap a RIOT system module
  pkg          Bootstrap a RIOT external package
  test         Bootstrap a RIOT test application

Examples

Generate an application in the current directory that build against the RIOT source located in /opt/RIOT and using the interactive wizzard:

riotgen application -i -r /opt/RIOT

or:

RIOTBASE=/opt/RIOT riotgen application -i

The command line wizard will ask for questions about the new application: target board, RIOT base directory, author name, etc.

Generate an application using a configuration file (see the samples provided in the source code):

riotgen application --riotbase /opt/RIOT --config path/to/config/file.cfg

In both cases, once complete, the new application can be built using:

make

example, driver, module, pkg, test and board subcommands generate the skeleton code directly in the RIOT base directory:

riotgen example --riotbase /opt/RIOT -i
riotgen driver --riotbase /opt/RIOT -i
riotgen module --riotbase /opt/RIOT -i
riotgen pkg --riotbase /opt/RIOT -i
riotgen board --riotbase /opt/RIOT -i
riotgen test --riotbase /opt/RIOT -i

Testing

Testing is performed using the Tox automation tool. You can install Tox using pip:

pip install tox

To run the whole tests and checks, use:

tox

To only run the tests, use:

tox -e tests

To only run the static checks (flake8, black, twine --check), use:

tox -e check

To reformat your code following the black tool, use:

tox -e format

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

riotgen-0.9.1.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

riotgen-0.9.1-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file riotgen-0.9.1.tar.gz.

File metadata

  • Download URL: riotgen-0.9.1.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for riotgen-0.9.1.tar.gz
Algorithm Hash digest
SHA256 dc967ed70443c23d9e6107fca5e6a16b4d8bd626a8a961dab5627f9b68d21110
MD5 3232f1bf3506594cf301435549e58c7a
BLAKE2b-256 d3f9662bf706c391d05212dfd09feed6aa0f0d75e20a15e10612ef30798b006d

See more details on using hashes here.

File details

Details for the file riotgen-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: riotgen-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for riotgen-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de86344ea6602f422eb93ebd728c702f36056bc17ca8adf9a953498c5347f7c3
MD5 d20ef8c2f1d46336853993ef3e7ce47c
BLAKE2b-256 49cb96ec0ab9f9c44375c74292c30fc9485561a63c2998d0f155caa4f218c796

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