Building with dbuild¶
- Building with dbuild
This page serves as the documentation for the dbuild build script.dbuild looks for firmware elements (libraries & applications) within:
- the SDK root
- the current directory, unless it's the SDK root
Depending on the arguments provided, dbuild will then either build every application it finds, or only a specific one.
The build process¶
When building an application, dbuild first recursively builds its dependency tree (not re-building whatever has already been built).
Many libraries are dependencies to multiple applications (or even other libraries). If we're building everything, it would be a waste of time to build many times the same library for different applications. Luckily dbuild is clever enough to handle this.
It is to be noted however that . These platforms are combinations of and .
Therefore dbuild will actually store intermediate artifacts with unique names per target within the out/obj directory.
Libraries are placed in folders named after each target within the out/lib directory.
It is highly recommended to create a to dbuild somewhere in your environment's PATH, as described here. This will allow you to run dbuild from anywhere with ease.Wherever dbuild is run, it will look through all sub-directories for firmware element definitions (dfe.conf files). This means you can run it at different levels of a source tree to build it at different depths.
dbuild will create an out folder in the directory where it is run. This folder will contain all output:
- compiled objects in out/obj
- packaged libraries in out/lib
- application binaries in out/bin
Keep this in mind when running the script from multiple locations, as you might end up with a variety of out folders in different places.
Default (no arguments)¶
Running dbuild without any arguments will simply compile every application it finds.
Help can be obtained via the -h argument.
$ ./dbuild -h Usage: ./build [-h] [-v] [-a APP_NAME] * -h Display this * -v Increase verbose level by one (default: 0, max: 2) * -a APP_NAME Only build APP_NAME (default: build everything)
Building a single application¶
If you wish to build only a single application, it can be specified using the -a APP_NAME argument, where
APP_NAME should be replaced with the name of the desired application
$ ./dbuild -a hello_world
The -v argument can be used to increase the verbosity level.
Specifying it multiple times increases it further.
|Default - No output|
$ ./dbuild -v
|Minimal output - only build targets are listed|
$ ./dbuild -v -v
|Normal output - build targets and compilation units are displayed|
$ ./dbuild -v -v -v
|Full output - everything is displayed including commands|