Trident IoT Z-Wave SDK
Loading...
Searching...
No Matches
Build System Customization

The following configuration parameters can be used to change the behavior of the Z-Wave Build System.

The configuration parameters can be passed to cmake on command line or set in the project's CMakeLists.txt file.

Note
When setting the parameters in the CMakeLists.txt, it must be set before the call to add_subdirectory(tridentiot-sdk/z-wave).

ZWSDK_CONFIG_REGION

Compile for one or more specific regions.

See zpal_radio_region_t for a list of valid regions.

Default behavior if not set is to generate targets for all regions.

Multiple regions can be specified by separating them with commas.

Example of use on command line for a single region:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_REGION=REGION_US
@ REGION_US
Radio is located in Region US. 2 Channel region.
Definition zpal_radio.h:332

Example of use on command line for multiple regions:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_REGION=REGION_EU,REGION_EU_LR
@ REGION_EU_LR
Radio is located in Region EU. 2 Channel LR region.
Definition zpal_radio.h:343
@ REGION_EU
Radio is located in Region EU. 2 Channel region.
Definition zpal_radio.h:331

Example of use in CMakeLists.txt for a single region:

set(ZWSDK_CONFIG_REGION REGION_US)

Example of use in CMakeLists.txt for multiple regions:

set(ZWSDK_CONFIG_REGION "REGION_EU,REGION_EU_LR")

ZWSDK_CONFIG_USE_TR_CLI

Add Remote or Local CLI to applications.

Example of setting the use of local CLI In the root CMakeLists.txt add the following line:

set(ZWSDK_CONFIG_USE_TR_CLI "LOCAL")

Example of setting the use of Remote CLI In the root CMakeLists.txt add the following line:

set(ZWSDK_CONFIG_USE_TR_CLI "REMOTE")

In the app/CMakeLists.txt add the following line to the ZW_LIBS section:

CC_RemoteCLI

If ZWSDK_CONFIG_USE_TR_CLI is not set no CLI will be added to the application

The default behavior is that the local CLI is added to applications in Debug build and no CLI in Release build.

ZWSDK_BUILD_SAMPLE_APPLICATIONS

If set to ON, all sample applications are compiled.

Example of use:

cmake --preset T32CZ20.Debug -DZWSDK_BUILD_SAMPLE_APPLICATIONS=ON

This configuration parameter only applies if the SDK is used as a subproject by invoking add_subdirectory(<SDK path>) from a parent CMake project. This is default structure for a project generated by elcap.

If included as a subproject, the default behavior is to skip compiling sample applications (OFF).

ZWSDK_CONFIG_PRIVATE_ROOT_SIGNING_KEY_PATH

Set the path to a custom private root key used for signing the public bootloader signing key.

The path must be absolute.

The private root key format must be PEM.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_PRIVATE_ROOT_SIGNING_KEY_PATH="absolute/path/to/private_root_signing_key.pem"

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_PRIVATE_ROOT_SIGNING_KEY_PATH "absolute/path/to/private_root_signing_key.pem")

CMake has a built-in variable that can be used to create the absolute path. If a key is located in the project directory under keys/, ${CMAKE_SOURCE_DIR} can be used.

Example:

set(ZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH "${CMAKE_SOURCE_DIR}/keys/my_private_root_signing_key.pem")
Note
If custom keys are provided, all custom keys must be set (signing and encryption).

ZWSDK_CONFIG_PUBLIC_ROOT_SIGNING_KEY_PATH

Set the path to a custom public root key used for verifying the signature of the public bootloader signing key.

The path must be absolute.

The public root key format must be DER.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_PUBLIC_ROOT_SIGNING_KEY_PATH="absolute/path/to/public_root_signing_key.der"

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_PUBLIC_ROOT_SIGNING_KEY_PATH "absolute/path/to/public_root_signing_key.der")
Note
If custom keys are provided, all custom keys must be set (signing and encryption).

ZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH

Set the path to a custom private key used for signing the bootloader and the application.

The path must be absolute.

The private key format must be PEM.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH="absolute/path/to/private_signing_key.pem"

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH "absolute/path/to/private_signing_key.pem")

CMake has a built-in variable that can be used to create the absolute path. If a key is located in the project directory under keys/, ${CMAKE_SOURCE_DIR} can be used.

Example:

set(ZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH "${CMAKE_SOURCE_DIR}/keys/my_private_signing_key.pem")
Note
If custom keys are provided, all custom keys must be set (signing and encryption).

ZWSDK_CONFIG_PUBLIC_SIGNING_KEY_PATH

Set the path to a custom public key used for verifying the signature of the bootloader and the application.

The path must be absolute.

The public key format must be DER.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_PUBLIC_SIGNING_KEY_PATH="absolute/path/to/public_signing_key.der"

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_PUBLIC_SIGNING_KEY_PATH "absolute/path/to/public_signing_key.der")
Note
If custom keys are provided, all custom keys must be set (signing and encryption).

ZWSDK_CONFIG_ENCRYPTION_KEY_PATH

Set the path to a custom encryption key used for encrypting binaries.

The path must be absolute.

The encryption key file format must be ASCII.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_ENCRYPTION_KEY_PATH="absolute/path/to/encryption_key.hex"

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_ENCRYPTION_KEY_PATH "absolute/path/to/encryption_key.hex")
Note
If custom keys are provided, all custom keys must be set (signing and encryption).

ZWSDK_CONFIG_USE_SOURCES

Instructs the build system to compile all sources instead of linking pre-built libraries.

Valid values:

  • ON
  • OFF (default)

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_USE_SOURCES=ON

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_USE_SOURCES "ON")

ZWSDK_TEST_FIXED_LR_TX_POWER

Instructs the build system to compile the Z-Wave stack library with disabled dynamic Tx power for LR and always use max Tx power.

The max LR Tx power will follow the Max LR Tx power configured for the application. If the max LR Tx power is set to 14dBm all LR frames will be sent with 14dBm. If the max LR Tx power is set to 20dBm all LR frames will be sent with 20dBm.

NOTE: This configuration requires the ZWSDK_CONFIG_USE_SOURCES to be set to ON.

WARNING: This option is for test ONLY. Using this in a product will violate the Z-Wave LR specification and will fail Z-Wave certification.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_TEST_FIXED_LR_TX_POWER -DZWSDK_CONFIG_USE_SOURCES=ON

Example of use in CMakeLists.txt:

set(ZWSDK_TEST_FIXED_LR_TX_POWER 1)
set(ZWSDK_CONFIG_USE_SOURCES "ON")

ZWSDK_CONFIG_BOOTLOADER_PATH

Instructs the build system to use a different bootloader than the default.

The default bootloader is the pre-compiled bootloader in the release.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_BOOTLOADER_PATH=/home/user/my_bootloader/my_bootloader.bin

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_BOOTLOADER_PATH "${CMAKE_SOURCE_DIR}/my_bootloader/my_bootloader.bin")