2. Building the Application
Note
As mentioned in fox.py it is recommended to use one of the shell
scripts to interact with the repository, as these activate the correct build
environment and prepare the PATH
variable before starting the build
process.
If these shell scripts are not used to call the build tool the following
steps are required:
activating the correct environment
make all tools available in
PATH
the current working directory must be the repository root
instead of
.\fox.ps1 waf <some-command>
usepython3 tools/waf <some-command>
Open a terminal and change into a checkout of the foxbms repository
Configuration of the project
.\fox.ps1 waf configure
fox.bat waf configure
./fox.ps1 waf configure
./fox.ps1 waf configure
Now all build variants are available, e.g., to build the binaries (
build_app_embedded
) and the documentation (build_docs
):.\fox.ps1 waf build_app_embedded build_docs
fox.bat waf build_app_embedded build_docs
./fox.ps1 waf build_app_embedded build_docs
./fox.ps1 waf build_app_embedded build_docs
Waf commands can be concatenated and are executed in the order of their appearance.
Important available commands are listed in Table 2.6.
Command/Option |
Description |
---|---|
|
Shortcut to run all available build commands |
|
Builds the application binary |
|
Builds the doxygen documentation of the application |
|
Builds the doxygen documentation of the application’s unit tests |
|
Builds and runs all unit tests of the application |
|
Builds the static program analysis build of the application |
|
Builds the bootloader binary |
|
Builds the doxygen documentation of the bootloader |
|
Builds the doxygen documentation of the bootloader’s unit tests |
|
Builds and runs all unit tests of the bootloader |
|
Builds the static program analysis build of the bootloader |
|
Builds the general, high-level documentation |
|
Builds the doxygen documentation for the tests |
|
Shortcut to run all available clean commands |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cleans the rendered documentation |
There are additional commands that are not typically needed when developing. This and other help on the build system is obtained by running
.\fox.ps1 waf build_app_embedded -h
fox.bat waf build_app_embedded -h
./fox.ps1 waf build_app_embedded -h
./fox.ps1 waf build_app_embedded -h