C
Generating projects for Zephyr
Zephyr projects are special CMake projects for the reference Zephyr platforms ports only. When you export and build such a project, the resulting binary contains Zephyr OS running the Qt Quick Ultralite application.
Note: This generator is intended for internal testing and is only supported for the examples and demos provided with Qt Quick Ultralite.
Export a Zephyr project
Call qmlprojectexporter
with the following arguments to export a project:
Option | Description |
---|---|
${QUL_DIR}/bin/qmlprojectexporter | Tool to be called. |
path/to/some.qmlproject | QML project file to be exported. |
--platform <platform_name> | Platform name that is to be exported. |
--project-type zephyr | Use Zephyr CMake project format. |
--toolchain <compiler_id> | This provides information about which compiler type the generated options should be compatible with. The only option compatible with Zephyr is gnu .Note: For all GCC-compatible compilers, use "gnu". |
--cxx-standard <C++ standard> | Optionally specify the C++ standard to use when processing the interface files listed in the InterfaceFiles block of the QML project file. |
--outdir <path> | The path the project will be exported to. |
--generate-entrypoint | Use this option if the Qt Quick Ultralite application does not already contain a main function. |
--boarddefaults=<qul_dir>/platform/boards/<platform>/cmake/BoardDefaults_32bpp_default.qmlprojectconfig | The board defaults need to be provided per board to provide information about color depth and asset formats. |
--platform-metadata <qul_dir>/platform/boards/<platform>/<platform>-<color_depth>_<OS>_<compiler>-metadata.json | Specify the metadata file to be used to export the platform. The reference Zephyr platform ports use a custom metadata file that is needed to export the platform properly. The metadata file is located in the reference port's directory. |
--selector a[,b...] | In case your QML project uses selectors to find QML files and resources, provide these as a comma-separated list. |
--include-metadata-extra-target <example_name> | Specify the name of the example/demo to export the C++ files from it. |
Build the exported CMake project
After exporting a project with the command described above, a CMake package is created in the output folder. This can be used in west
to build the Zephyr binary:
west build -b <target_platform> <project_output_directory>
Available under certain Qt licenses.
Find out more.