C

Generating projects for Espressif IoT Development Framework (ESP-IDF)

Qmlprojectexporter can export a Qt Quick Ultralite application as an ESP-IDF project, which can then be configured and built using Espressif IoT Development Framework (ESP-IDF).

Export an ESP-IDF project

Call qmlprojectexporter with the following arguments to export a project:

OptionDescription
${QUL_DIR}/bin/qmlprojectexporterTool to be called.
path/to/some.qmlprojectQML project file to be exported.
--platform <platform_name>Platform name that is to be exported.
--project-type esp-idfUse ESP-IDF project format.
--toolchain <compiler_id>This provides information about which compiler type the generated options should be compatible with. The only option compatible with ESP-IDF is gnu.
--cxx-standard <C++ standard>Optionally, specify the C++ standard to use when processing the interface files listed in the InterfaceFiles section of the QML project file.
--outdir <path>The path the project will be exported to.
--generate-entrypointUse 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.qmlprojectconfigThe 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.jsonSpecify the metadata file to be used to export the platform. The reference Espressif 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.

Note: This should only be used when exporting Qt Quick Ultralite demos and examples.

Build the exported ESP-IDF project

Exporting a project with the command described above generates an ESP-IDF project into the output folder. The generated project can be built with the ESP-IDF tools in the output folder:

idf.py build

Available under certain Qt licenses.
Find out more.