![]() |
CMSIS-Build
Version 0.9.0 (beta)
Tools, software frameworks, and work flows for productivity with CMSIS based projects
|
The cbuildgen is the core tool for the build process. It is called from the Bash command line with the following syntax:
Where:
cbuildgen
is the name of tool.
<command>
specifies the operation of cbuildgen
(see table below). Only one command is permitted per invocation.
<ProjectFile>
is the name of the project file. The file extension (.cprj) is mandatory.
[options
] are additional parameters that control the operation (see table below). Note: available options are specific for each command.
Commands
<command> | Description | Details |
---|---|---|
packlist | List missing packs | Check the current list of installed packs in the directory $CMSIS_PACK_ROOT . The URLs of missing packs are written to <ProjectFile>.cp_install file. |
make | Generate makefile(s) | Generates <ProjectFile>.mak for Make required to build the project. When used with option –merge it generates also <ProjectFile>_cfg.mak for Make to update configuration files. This command also generates a ASCII log file <ProjectFile>.clog recording location and version of the selected toolchain, packs, components and config files. The option –output specifies the destination folder of the generated files. The location of the <ProjectFile>.cprj is used if –output is not specified. |
extract | Extract layer from project | Creates a sub directory named ./Layer/<layername>/ for each layer described in <ProjectFile>.cprj. These folders contain a layer description file <layername>.clayer and the project and configuration files belonging to the layer. The option –layer=<layname> selects a specific layer by name. This option can be specified multiple times to select multiple layers. |
remove | Remove layer from project | Updates the <ProjectFile>.cprj removing the layer description as well as all associated files and components for the layers specified at the command line. The command deletes the associated files from the respecctive project directory. The option –layer=<layname> selects a specific layer by name and is mandatory. This option can be specified multiple times to remove multiple layers. |
compose | Create new project | Create new <ProjectFile>.cprj from layer files ([...]<layername>.clayer) as well as copying associated files. One or more clayer files are required. |
add | Add layer to project | Updates the <ProjectFile>.cprj adding the layer description as well as all associated files and components for the clayer files specified at the command line. The command copies the associated files from the layer directory into the project directory. One or more clayer files are required. |
Options
[option] | Description | Details |
---|---|---|
--merge | Update configuration files | When used with the command make , it generates also <ProjectFile>_cfg.mak for Make to update configuration files using ccmerge: Config File Updater (used by command: make). |
--toolchain=<compiler> | Specify toolchain | For projects that can be build with multiple toolchains, it defines the toolchain for the build (used by command: make). |
--output=<directory> | Specify output directory | Specifies the directory for the generated files *.mak files and the base directory for intermediate output from build. (used by command: make). |
--layer=<layername> | Specify layer name | Specifies the name of the layer (used by commands: remove and extract). |
<directory>/<layername>.clayer | Specify layer file | Specifies the directory and filename of the project layer (used by commands: add and compose). |
The cbuildgen: Build Process Manager uses information from the CMSIS project file *.cprj, software packs, and environment variables.
The <ProjectFile>.mak file includes two additional makefiles:
Note: cbuildgen does not update the *.cprj for commands packlist, make and extract. The merge tool updates the outdated configuration files with new merged data, keeping a copy of the original file.
$ cbuildgen packlist Simulation.cprj (cbuildgen): Build Process Manager 0.9.0 (C) 2020 ARM M654: URL 'http://www.keil.com/pack/ARM.CMSIS.5.6.0.pack' was added to the list of missing packages. M654: URL 'http://www.keil.com/pack/Keil.ARM_Compiler.1.6.1.pack' was added to the list of missing packages. M650: Command completed successfully. $ cbuildgen make Simulation.cprj (cbuildgen): Build Process Manager 0.9.0 (C) 2020 ARM M651: Generated makefile for merging config files: 'Simulation_cfg.mak' M652: Generated makefile for project build:'Simulation.mak'
Message Number | Type | Description | Action |
---|---|---|---|
M200 | ERROR | Invalid arguments! | At least one argument is wrong. See usage and correct the argument. |
M201 | ERROR | Too many arguments! | There is more arguments passed than allowed. See usage and correct the command line. |
M202 | ERROR | No CPRJ input file was specified | A *.cprj file is not provided as an argument. |
M203 | ERROR | Error reading file(s) ...! | The listed file could not be read. Check file content. |
M204 | ERROR | File not found: ...! | The listed file was not found. |
M205 | ERROR | $CMSIS_PACK_ROOT environment variable is not defined! | The tool requires the environment variable $CMSIS_PACK_ROOT to locate the CMSIS Packs. |
M206 | ERROR | No command was specified! | The tool requires a command. See usage information for available commands (e.g. config, make) |
M207 | ERROR | Multiple commands were specified! | More than one command was provided in arguments. A single command is required. |
M208 | ERROR | Error copying file ...! | The specified file could not be copied and will be missing during build. |
M500 | ERROR | RTE Model reports: MSG | Error while preparing data. See message for more details. |
M502 | ERROR | RTE Model reports: #error NUM: NAME : MSG | Additional software components required. |
M504 | ERROR | RTE Model reports: MISSING: – SPACE NAME | Add the missing component. |
M600 | ERROR | Package index was not found in 'PATH/.Web | Check the package repository. |
M601 | ERROR | Package 'VENDOR.NAME' was not found in package index! | Check the package repository. |
M602 | ERROR | Package 'VENDOR.NAME.VER' was not found! | Check the package repository. |
M603 | ERROR | No version of package 'VENDOR.NAME' was found! | Check the package repository. |
M604 | ERROR | Unresolved package component: 'CMP' | Check project description file. |
M605 | ERROR | Wrong CPRJ specification! | Check project description file. |
M606 | ERROR | Device 'DEV (VENDOR)' was not found! | Check project description file. |
M607 | ERROR | RTE Model construction failed! | The CMSIS-Pack engine reports an error message. |
M608 | ERROR | No toolchain configuration file for 'NAME' version 'VER" was found! | Check CMSIS_COMPILER_ROOT or add the required toolchain configuration file to the project directory. |
M609 | ERROR | Missing 'NAME' element in CPRJ file! | Check project description file. |
M610 | ERROR | Project supports multiple toolchains. Select one with the option –toolchain | See usage and correct the argument. |
M611 | ERROR | Selected toolchain is not supported by the project | Check project description file or command line arguments. |
M630 | WARNING | Device ... is substituted by device variant ... . | Instead of the device specified by the project a variant found for this device is used. |
M650 | INFO | Setup run successfully | For information only./td> |
M651 | INFO | Generated makefile for merging config files: ... | For information only. |
M652 | INFO | Generated makefile for project build:'NAME%.mak' | For information only. |
M653 | INFO | Local config file ... was not found. Copying default file from package. | Please validate whether the config file is intentionally missing. The default config file may be missing project specific settings. |
M654 | INFO | URL ... was added to the list of missing packages. | For information only. |
M655 | INFO | CMSIS_COMPILER_ROOT environment variable was not set! | For information only. |
M656 | INFO | Package 'VENDOR.NAME.VER' was found in local repository 'PATH'! | For information only. |