Skip to main content

python based build system.

Project description

py_buildsysten

py_buildsystem is a python based buildsystem. It is configured using yaml files.

Instalation

The py_buildsytem can be installed using pip, or it can be installed from the source code.

from pip

pip install py_buildsystem

from source code

git clone https://github.com/ProrokWielki/py_buildsystem.git
cd py_buildsystem
python setup.py install

Usage

To run the package use this command:

usage: py_buildsystem [-h] [-v] -pcc PROJECT_COMPILER_CONFIG -pc PROJECT_CONFIG [compiler path]
py_buildsystem [-h] [-v] -pcc -pc [compiler path]

Options:

positional arguments:
  compiler path         Path to compiler

optional arguments:
  -h, --help            show this help message and exit
  -pcc PROJECT_COMPILER_CONFIG, --project_compiler_config PROJECT_COMPILER_CONFIG
                        Project specific toolchain configuration file
  -pc PROJECT_CONFIG, --project_config PROJECT_CONFIG
                        Project configuration file
  -v, --verbose         verbose mode

To use this buildsystem you have to provide two yaml files:

  • project configuration,
  • project specific toolchain configuration.

If your toolchain is not in the PATH you have to provide its path to the buildystem.

Project configuration

This file contains definitions of the steps to be peformed, compiler definitions and includes.

Available steps:

  • compile,
  • link.

Project configuration file example:

defines:
  - STM32L452xx

includes:
  - ../../LIB/CMSIS/Device/ST/STM32L4xx/Include
  - ../../LIB/CMSIS/Include

steps:
  - compile MCU:
    source_directories: 
      - ../../MCU

    output_direcotry: ../../Output/Obj/MCU

    types:
      - .c
      - .s

  - link Everything:
    source_directories:
      -  ../../Output/Obj

    output_file: ../../Output/file.elf

    types:
      - .o

Step compile

Options available:

  • source directories -- list of directiories in which the files to compile are located,
  • output directory -- directory to which the output files will be writen,
  • types -- file types to be compiled,
  • search_subdirectories -- defines if the sub directories are searched (optional -- default = False).

Step link

Options available:

  • source_directories -- list of directories where object files are located,
  • output_file -- executable file which will be created after linking,
  • types -- file types to be linked.

Project specific toolchain configuration

This file defines three thinks:

  • toolchain to be used,
  • compilator flags,
  • linker flags.

Project specific toolchain configuration file example:

compiler: GCC_ARM

compiler_flags:
  - -mcpu=cortex-m4

linker_flags:
  - --specs=nosys.specs
  - -T ../../MCU/STM32L452RETx_FLASH.ld

Toolchain configuration

Every toolchain has to have its configuration file. The file contains basic inforamtion about the toolchain, executables names and defines basic flags used by the toolchain.

Currently supported toolchains:

  • arm-none-eabi -- GCC_ARM,
  • gcc -- GCC.

If the toolchain you wish to use is not supported you can add the configuration file to the project.

Toolchain configuration file example:

compiler: arm-none-eabi-gcc
linker:   arm-none-eabi-gcc

define_flag:  -D
output_flag:  -o
compile_flag: -c
include_flag: -I
comand_line_file: "-Wl,@"
version_flag: --version

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

py_buildsystem-0.4.4.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

py_buildsystem-0.4.4-py3.7.egg (41.7 kB view details)

Uploaded Egg

File details

Details for the file py_buildsystem-0.4.4.tar.gz.

File metadata

  • Download URL: py_buildsystem-0.4.4.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0

File hashes

Hashes for py_buildsystem-0.4.4.tar.gz
Algorithm Hash digest
SHA256 bc20d0886d8ae61dbd778c3227dc58efa36932aa82b92c127359b39b407b69b1
MD5 cbd9f07fb3d0fe16faf4eafe568cbbd5
BLAKE2b-256 399507de09014738b0a8f17236b085c07a2be5c188791928fa4f51a2ab201a7e

See more details on using hashes here.

File details

Details for the file py_buildsystem-0.4.4-py3.7.egg.

File metadata

  • Download URL: py_buildsystem-0.4.4-py3.7.egg
  • Upload date:
  • Size: 41.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0

File hashes

Hashes for py_buildsystem-0.4.4-py3.7.egg
Algorithm Hash digest
SHA256 6e5c19f9ab99d5479f43ca5ab02a6d6062b6822cf1ac031184d404cddf065719
MD5 fe71acf4be7fc0153a42d22357b15156
BLAKE2b-256 3fb73af1c0a7a86b8f63d315df4d93b06692c789b9e4973b81bfedeec3b3fe52

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