MADDE command reference
MADDE can be used and configured by using mad and mad-admin commands with different parameters.
Note: In the MADDE terminal user guide, MADROOT refers to the <MADDE install path>.
mad-admin commands
The mad-admin sets up and configures the development environment.
create
The create
command creates cross-compilation targets and runtimes.
Usage: mad-admin create [-q] TARGET [-s] [-r] [-f] [-tc TOOLCHAIN -sr SYSROOT -rt RUNTIME -qt QTTOOLS] mad-admin create [-q] RUNTIME [-a ADDRESS ] Options: -q quiet operation -s set as default (target only) -r create matching runtime (target only) -f attempt to fetch missing toolchain/sysroot/runtime -a ADDRESS IP address or hostname of the device used as a remote target This option is mandatory if the runtime is a device
If you give the toolchain and sysroot details, you must begin the target name with 'my'.
Creating a target
Creates a cross compilation target. A target defines used toolchain and sysroot and compiler wrappers. The target is created into the MADROOT/targets directory. For more information on targets, see section Configuring runtimes in MADDE.
Creating a runtime
Creates a runtime environment used to run the cross-compiled software. There are two types of runtime environments - devices and QEMU runtimes. For more information on runtimes, see section Configuring MADDE development targets.
set
The set
command specifies the used default target created with the create
command.
The mad
tool uses the default target if you do not overwrite it with the -t
option. The default target is stored into the MADROOT/targets/default
file. The mad remote
command uses the default runtime if the user does not overwrite it with the -r
option.
Usage: mad-admin set TARGET
list
The list
command shows components in the MADDE environment. The command is able to show installed targets, runtimes, sysroots and toolchains, default target and runtime, and targets and runtimes available for installation (installable). It also shows the dependencies of targets.
mad list - list various components of the MADDE Usage: mad list [OPTIONS] [COMMAND] Without COMMAND installed targets are shown Options: -v show more detailed information -a show also hidden information Commands: all list all targets, sysroots, toolchains and runtimes targets list targets toolchains list toolchains sysroots list sysroots runtimes list runtimes default show default target and runtime
remove
The remove
command removes targets, runtimes, sysroots, toolchains and tools. The component is removed only if no other component depends on it. The rule can be overwritten with the -f
option.
Usage: mad-admin remove [-n] [-f] target/sysroot/toolchain/runtime/tool Options: -n: do not remove anything, just show what would be done -f: force removal
fetch
The fetch
command downloads sysroots and toolchains and other files into the MADROOT/cache
folder for further use. It supports HTTP, HTTPS, and FTP protocols and retrieval through HTTP/HTTPS proxies, also retrieving local files. For convenience, URL aliases can be used instead of complete URLs. The names of aliases are specified in the MADROOT/cache/fetch_aliases
file in the following format:
alias_name1 http://url/to/required/file1 alias_name2 ftp://url/to/required/file2
When calling the fetch
command without arguments, the usage is printed as illustrated in the following printout:
Usage: mad-admin fetch [-x proxyhost[:port]] URL|URL_ALIAS 'mad-admin fetch' downloads a file from the location specified with URL or URL_ALIAS name. It supports HTTP, HTTPS and FTP protocols, retrieval through HTTP proxies and fetching local files. URL_ALIAS names with matching URLs are specified in file '/cache/fetch_aliases'. Options: -x Use specified HTTP/HTTPS proxy Examples: mad-admin fetch http://httpserver/path/sysroot.tgz -x \ http://proxy.madde.com:8080 mad-admin fetch ftp://ftpserver/path/sysroot.tgz mad-admin fetch current_sysroot
clone
The clone
command makes a copy of a run-time image.
Usage: mad-admin clone [-r RUNTIME] NAME mad-admin clone clones runtime for new name. If -r option is not given the default runtime is cloned Options: -r RUNTIME runtime to be cloned
mad commands
The mad command cross-compiles and fetches general information.
The mad
command is the frontend to MADDE execution environment. It offers several built-in commands and also runs user-given commands in the MADDE environment. The mad
command sets the environment variable MA_SESSION_DIR
to point to a target directory. The target is read from the MADROOT/targets/default
file or from the command line if the -t
option is given. The command also adds .../target/bin
to PATH
so that compiler wrappers are called during compilation.
Usage: mad [-t TARGET] COMMAND [args] Command may be one of the internals listed below or system command (such as 'make') query query variables list list components in cross-compilation environment set set default target or runtime pscreate create project skeleton remote command set to handle runtime info print madde configuration in xml format
For more information on list and set commands, see sections list and set.
pscreate
The pscreate
command creates a project skeleton. For more information, see MADDE templates.
Usage: mad pscreate -l | -t TEMPLATE NAME -v mad pscreate creates a project skeleton named NAME according to specified TEMPLATE into the current directory. The project skeleton is a directory tree named NAME that contains sample source files and rules for debian packaging system. Options: -l list available templates -t template to be used -v show more detailed information Examples: $ mad pscreate -t simple hello
remote
The remote
command provides an interface to a created runtime (either QEMU or device).
Usage: mad remote [-r RUNTIME] poweron | poweroff | send FILE | remove FILE | run [-t] PROGRAM | stop PROGRAM | debug PROGRAM (-c|-s) [ARGS] | mount LOCALDIR | install DEBIAN_PACKAGE | uninstall DEBIAN_PACKAGE | ping
mad remote
can be used for starting and stopping the QEMU runtime, copying files to the runtime, and running commands in the runtime.
poweron start QEMU runtime poweroff stop QEMU runtime send send FILE to runtime remove remove FILE from runtime shell run login shell on runtime run run PROGRAM on runtime. -t gives pseudo tty stop stop PROGRAM on runtime debug debug PROGRAM on runtime install install DEBIAN_PACKAGE on runtime uninstall uninstall DEBIAN_PACKAGE on runtime ping check if runtime is up and connectable
info
The info
command prints MADDE configuration to stdout
. The output is in .xml format based on the schema documented in madinfo.xsd
.