Overview
This document describes the command line tools that make it possible to manage the components of the Core system.
Environment variables
Core tools may require that some environment variable are set in order to offer full functionalities.
These variables are set by setup.sh
that can be found in the Core distribution, and that is generated during the bootstrap process.
NOVA_WORKSPACE_ROOT
is set by setup.sh
that can be found in the workspace, and that is generated by the CoreWorkspace init
command.
Name | Meaning |
---|---|
|
path to the Core distribution (where |
|
path to the GCC compiler (default: |
|
path to ChibiOS (default: |
|
path to Nova CMake files (default: |
|
path to Nova CMake modules (default: |
|
path to the workspace (where |
References
Core
Core.py
is a command line tools that permits to:
-
list the content of a Core distribution
Synopsis
- ls
-
Core [options] ls
Core [options] ls <path-to-core>
Options
- --verbose
-
Verbose output
Subcommands
ls
The ls
command lists the content of a Core distribution.
It can be used:
-
inside a Core distribution directory, without any path (e.g.:
$ Core.py ls
) or specifying.
as the path (e.g.:$ Core.py ls .
) -
specifying the path to a directory (e.g.:
$ Core.py ls <path-to-core-distribution>
) -
anywhere, provided that the
NOVA_CORE_ROOT
environment variable is set with the path to the Core distribution.
CorePackage
CorePackage.py
is a command line tools that permits to:
-
list the content of a package
-
generate the code of a package
It is possible to use TAB to invoke sub-command and/or package name completion. |
Synopsis
- ls
-
CorePackage [options] ls
CorePackage [options] ls <package-name>
CorePackage [options] ls <path-to-package>
- generate
-
CorePackage [options] generate <package-name> <path-to-destination>
CorePackage [options] generate <path-to-package> <path-to-destination>
CorePackage [options] generate <path-to-destination>
- initialize
-
CorePackage [options] init <path-to-destination>
Options
- --verbose
-
Verbose output
- --no-workspace
-
Do not look for package in workspace
Subcommands
ls
The ls
command lists the content of a package.
It can be used:
-
inside a package directory without any path or package name (e.g.:
$ CorePackage.py ls
) -
specifying the path to a package directory (e.g.:
$ CorePackage.py ls <path-to-package>
)
For system packages it is also possible to specify the name of the package (e.g.: $ CorePackage.py ls led
).
For this last feature to work a NOVA_CORE_ROOT
environment variable must be set with the path to the Core distribution.
CorePackage ls
$ CorePackage.py ls led
$ CorePackage.py ls
inside led
package directory
$ CorePackage.py ls <path-to-led-package>
produces:
╒══════════════════════════════════════════════════════════════════════════════╕ │ PACKAGE │ ╘══════════════════════════════════════════════════════════════════════════════╛ Name: led Description: LED Nodes Root: packages/led === CONFIGURATIONS ============================================================= NS: led Name: PublisherConfiguration Description: LED Publisher node configuration Source: configurations/PublisherConfiguration.json NS: led Name: SubscriberConfiguration Description: LED Subscriber node configuration Source: configurations/SubscriberConfiguration.json
generate
The generate
command generates the package code.
initialize
to be implemented |
CoreModule
CoreModule.py
is a command line tools that permits to:
-
list the content of a module
-
generate the code of a module
It is possible to use TAB to invoke sub-command and/or module name completion. |
Synopsis
- ls
-
CoreModule [options] ls
CoreModule [options] ls <module-name>
CoreModule [options] ls <path-to-module>
- generate
-
CoreModule [options] generate <path-to-destination>
CoreModule [options] generate <module-name> <path-to-destination>
CoreModule [options] generate <path-to-module> <path-to-destination>
- init
-
CoreModule [options] init <path-to-destination>
Options
- --verbose
-
Verbose output
- --no-workspace
-
Do not look for module in workspace
Subcommands
ls
The ls
command lists the content of a module.
It can be used:
-
inside a module directory without any path or module name (e.g.:
$ CoreModule.py ls
) -
specifying the path to a module directory (e.g.:
$ CoreModule.py ls <path-to-module>
)
For system modules it is also possible to specify the name of the module (e.g.: $ CoreModule.py ls led
).
For this last feature to work a NOVA_CORE_ROOT
environment variable must be set with the path to the Core distribution.
generate
The generate
command generates the module code.
init
to be implemented |
CoreWorkspace
CoreWorkspace.py
is a command line tools that permits to:
-
list the content of a workspace
-
generate the code of a workspace
-
initialize a workspace
It is possible to use TAB to invoke sub-command completion. |
Synopsis
- ls
-
CoreWorkspace [options] ls
- add a target
-
CoreWorkspace [options] target add [module_name] [target_name]
- generate
-
CoreWorkspace [options] generate [build_type] [--force]
- initialize
-
CoreWorkspace [options] initialize [--force]
Options
- --verbose
-
Verbose output
Subcommands
ls
The ls
command lists the content of a workspace.
It can be used:
-
inside a workspace directory without any path or workspace name (e.g.:
$ CoreWorkspace.py ls
)
target add
The target add
command:
-
creates a new target, using the standard template
It can be used:
-
inside a workspace directory without any path or workspace name (e.g.:
$ CoreWorkspace.py target add usb usb_gateway
)
Options
- module_name
-
Name of the target module name
- target_name
-
Name of the target
generate
The generate
command:
-
generates the package code
-
generates the module code
-
generates the CMake files for the targets
-
generates, using CMake, the Makefiles and Eclipse projects for the targets
It can be used:
-
inside a workspace directory without any path or workspace name (e.g.:
$ CoreWorkspace.py generate
)
Options
- build_type
-
You can choose between a
debug
orrelease
build - --force
-
Force the generation even in presence of errors (such as unmet dependencies)
initialize
The initialize
command initializes an empty workspace in the current directory.
It creates:
-
WORKSPACE.json
file -
setup.sh
file -
a conforming directory structure
If a workspace is already initialized, it does nothing.
It is possible to re-generate setup.sh
by using the --force
option. This is useful if the workspace has been moved.
Options
- --force
-
Force the re-initialization of an existing workspace. No source files are modified or deleted.