Export MCU QDS project to C++ code
What is the benefit? Why is this valuable?
Enable designers or developers to easily export a Qt Design Studio project to C++ Qt for MCUs code, without having to manually call a command-line tool.
Enable simple workflows between GUI teams and hardware integration teams.
What are common use cases?
In a team setup where the development team in charge of the hardware integration is using third-party IDEs such as GHS MULTI, IAR IDE, NXP IDE, etc., the GUI development/design team must be able to provide code that can be integrated by the other team.
Qt for MCUs now have a qmlprojectexporter tool, which can generate C++ code from a .qmlproject without the need for CMake or a compiler. Integrating it into QDS can greatly simplify the process by making it a matter of a few clicks, rather than figuring out how to call a CLI tool with the right arguments.
A designer would not want to, or be able to, call a CLI tool anyway.
There is also a platformexporter tool that can export all necessary source files for a given platform port, which could also be integrated from QDS when exporting a qmlproject.
The integration can be made as a new wizard, letting the user pick the desired settings for the export such as:
- Export directory
- Target platform (optional)
- Target compiler
- Enable/disable generation of C++ from QML project
- If target platform is set, enable/disable export of platform port source code, based on the selected target platform (platformexporter tool)
- Enable/disable export of hardware configuration code
Generated code should have the following folder structure:
- <export_root> (folder selected by user)
- generated (contains output of qmlprojectexporter)
- platform (contains export from platformexporter)
Information generated by qmlprojectexporter about needed linked libraries and compiler flags should be integrated in the wizard at the very end. Instructions should be given on what the user must do in the third-party IDE/build system, in a generic way, based on information generated by the MCU tools.
qmlprojectexporter needs a full installation of Qt for MCUs to generate code. QDS must therefore be told where to find it.
Optionally, the user must be able to set a custom QUL target build directory (when the user rebuilds QUL core or platform), in addition to where the standard Qt for MCUs installation is.
qmlprojectexporter needs to have an option to return a list of supported compiler for QDS to populate the option list in the wizard. One of them should be a "Generic" option, in case the target compiler is not supported.
platformexporter needs to have an option to return a list of available targets for QDS to populate the target platform list in the wizard.
Documentation is required to explain how to initialize QUL UI using C++ APIs in the IDE-provided main.cpp.
The feature should be only available for MCU projects in QDS.