Project

General

Profile

4 - Building with dbuild » History » Version 3

eresse, 05/11/2017 08:17 PM

1 1 eresse
h1. Building with dbuild
2 1 eresse
3 2 eresse
{{>toc}}
4 2 eresse
5 3 eresse
h2. Introduction
6 3 eresse
7 3 eresse
This page serves as the documentation for the *dbuild* build script.
8 3 eresse
9 3 eresse
*dbuild* looks for *firmware elements* (libraries & applications) within:
10 3 eresse
* the SDK root
11 3 eresse
* the current directory, unless it's the SDK root
12 3 eresse
13 3 eresse
Depending on the arguments provided, dbuild will then either build every application it finds, or only a specific one.
14 3 eresse
15 3 eresse
h2. The build process
16 3 eresse
17 3 eresse
When building an application, dbuild first recursively builds its dependency tree (not re-building whatever has already been built).
18 3 eresse
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.
19 3 eresse
20 3 eresse
It is to be noted however that +applications are targeted to specific platforms+. These platforms are combinations of +architecture+ and +operating frequency+.
21 3 eresse
Therefore dbuild will actually store intermediate artifacts with unique names per target within the *out/obj* directory.
22 3 eresse
Libraries are placed in folders named after each target within the *out/lib* directory.
23 3 eresse
24 3 eresse
h2. Usage
25 3 eresse
26 3 eresse
Running dbuild without any arguments will simply compile every application it finds.
27 3 eresse
28 3 eresse
<pre>
29 3 eresse
~ $ ./dbuild -h
30 3 eresse
Usage: ./build [-h] [-v] [-a APP_NAME]
31 3 eresse
    * -h              Display this
32 3 eresse
    * -v              Increase verbose level by one (default: 0, max: 2)
33 3 eresse
    * -a APP_NAME     Only build APP_NAME (default: build everything)
34 3 eresse
</pre>
35 3 eresse
36 1 eresse
<pre>
37 1 eresse
# ToDo: Document dbuild usage
38 1 eresse
</pre>