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> use python3 tools/waf <some-command>

  1. Open a terminal and change into a checkout of the foxbms repository

  2. Configuration of the project

    .\fox.ps1 waf configure
    
  3. 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
    

    Waf commands can be concatenated and are executed in the order of their appearance.

Important available commands are listed in Table 2.6.

Table 2.6 Available build and clean commands

Command/Option

Description

build_all

Shortcut to run all available build commands

build_app_embedded

Builds the application binary

build_app_doxygen

Builds the doxygen documentation of the application

build_app_doxygen_unit_test

Builds the doxygen documentation of the application’s unit tests

build_app_host_unit_test

Builds and runs all unit tests of the application

build_app_spa

Builds the static program analysis build of the application

build_bootloader_embedded

Builds the bootloader binary

build_bootloader_doxygen

Builds the doxygen documentation of the bootloader

build_bootloader_doxygen_unit_test

Builds the doxygen documentation of the bootloader’s unit tests

build_bootloader_host_unit_test

Builds and runs all unit tests of the bootloader

build_bootloader_spa

Builds the static program analysis build of the bootloader

build_docs

Builds the general, high-level documentation

build_doxygen_tests

Builds the doxygen documentation for the tests

clean_all

Shortcut to run all available clean commands

clean_app_embedded Cleans the application build output

clean_app_doxygen Cleans the application’s rendered doxygen documentation

clean_app_doxygen_unit_test Cleans the application’s unit tests rendered doxygen documentation

clean_app_host_unit_test Cleans the application unit test build output

clean_app_spa Cleans the application’s static program analysis build output

clean_bootloader_embedded Cleans the bootloader build output

clean_bootloader_doxygen Cleans the bootloader’s rendered doxygen documentation

clean_bootloader_doxygen_unit_test Cleans the bootloader’s unit tests rendered doxygen documentation

clean_bootloader_host_unit_test Cleans the bootloader unit test build output

clean_bootloader_spa Cleans the bootloader’s static program analysis build output

clean_docs

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