C

MCU.Config.binaryAssetOptions

Defines how to include the binary asset data for the image resources.

Description

This QmlProject property controls how binary asset data for the image resources are included into the application binary.

This variable is set in BoardDefaults.qmlprojectconfig.

The available options are:

  • COMPILE - qulrcc emits the binary asset data as arrays of uint64_t values in the generated C++ file (qulrcc_assets.cpp). This option may result in longer compile time, and the compiler may run out of memory if the C++ file gets too big.
  • SYMBOLS - Uses custom linker options to provide the required symbols for each storage section, directly from the generated asset data binary files. This option is supported for the IAR and GreenHills compiler toolchains only. Additionally, some changes to the linker script are needed when using the GreenHills compiler toolchain.
  • INCBIN - qulrcc generates an assembly source file (qulrcc_assets_s.S) and use the incbin directive to load the asset binary files. This option is supported with GCC compiler toolchain only.

Using the variable with GreenHills

The SYMBOLS option is be used with the rawimport linker option to include the asset binary file. Additionally, the linker script must place the asset binary data in the corresponding section, and provide the corresponding symbol.

Here's an example for the default "QulResourceData" resource storage section:

QulResourceData ALIGN(128) :{qul_resources_QulResourceData.bin(.raw)} >.
qul_resources_QulResourceData_instance = addr(QulResourceData);

The linker scripts for the reference platforms that support the Greenhills toolchain, includes the necessary changes.

Usage

MCU.Config {
    binaryAssetOptions: "symbols"
}

Since

This property was introduced in QmlProject API 1.3.

See also ImageFiles.MCU.resourceStorageSection and QUL_BINARY_ASSET_OPTIONS.

Available under certain Qt licenses.
Find out more.