Skip to content

Commands

Martin Kojtal edited this page Dec 3, 2019 · 4 revisions
### Commands

There are 5 main commands, many of them have subcommands available:

  • init - to create a project record from a directory
  • generate - to generate a project
  • clean - to clean generated projects
  • list - to list targets, tools or projects
  • build - to build a project

It's advised if you are having problems with any commands, turn on the debug messages to see what is going on, that helps also for reporting bugs (use -v to enable verbose mode).

generate

Export defined projects.

Arguments:

  • -f - projects.yaml file path
  • -p - The name of the project you want to generate. If not specified, all projects within projects in the projects.yaml are exported
  • -t - The tool name (uvision, iar and so on). If not specified, tools are checked in records (tool_supported).
  • -b - Build the exported project. Not every tool supportes building a project
  • -c - Copy all files defined for a project to exported directory

build

This command currently exports first a project, then builds it. Not all tools supports building.

Arguments:

  • -f - Projects.yaml file path
  • -p - The name of the project you want to build. If not specified, all projects within projects in the projects.yaml are built
  • -c - copy sources to the exporter directory (as it exports first, this is used for exporing prior building). This option is good for providing completely exporter project (tarball for instance)

list

List targets, tools or projects.

Arguments:

  • targets - list all targets progen currently supports
  • tools - list all tools progen currently supports
  • projects - list all projects the repository supports (requires -f argument specified)
  • -f - project file (projects.yaml). It's used to check projects. Not required for commands like list targets or tools (there are defined in progen)

init

If you want progen support for a project, this is the command to use. Init scan the repository for files and creates 2 yaml files. The main project file (projects.yaml) and a project yaml file. In the project yaml file , there are all sources/includes and other project related settings which progen finds in the repository. This creates valid progen project file if a folder contains one valid project. In case there are many, this command can serve at least as a guidance, the edit yaml file accrodingly to a folder structure to split projects.

Arguments:

  • -p - The project name
  • -tar - The target name for the project
  • -dir - The directory selection for scanning (defualt is None, scan all within a directory progen is executed)
  • -o - directory for generated files

clean

This command removes progen related files and folders. If progen generates data to various folders (for example per project a directory somewhere), this command will remove those folders.

Arguments:

  • -f - the main project yaml file
  • -p - the project name which should be cleaned (removed)
  • -t - the tool name (if not specified, tools are taken from tools_supported)