- ...
- SDK
- Yocto
- ...
- ...
- your first application
- tools
- ...
- Qt: register
- Qt: create project
Using Qt with a Makefile#
Using the qmake file, building a SimpleSwitch™ package can be done by sourcing
the SDK environment and running the simpleswitch-generate-package
script
$ . /opt/sc/0.1.0/sm2s-imx8plus/environment-setup-cortexa53-crypto-simplecoredistro-linux
$ cd helloworld
$ mkdir build
$ qmake -o build helloworld
$ simpleswitch-generate-package --name helloworld --work-dir simpleswitch --makefile-dir build \
--template qt6commercial --startup-command /opt/helloworld/bin/helloworld
$ . /opt/sc/0.1.0/sm2s-imx8plus/environment-setup-cortexa53-crypto-simplecoredistro-linux
$ cd helloworld
$ mkdir build
$ qmake -o build helloworld
$ simpleswitch-generate-package --name helloworld --work-dir simpleswitch --makefile-dir build \
--template qt6 --startup-command /opt/helloworld/bin/helloworld
Flash and debug on device a Qt application#
If you want to debug the application using GDB
just replace the previous
qmake
and simpleswitch-generate-package
instructions by the following
ones
$ qmake -o build helloworld CONFIG+=debug CONFIG+=qml_debug CONFIG-=separate_debug_info
$ simpleswitch-generate-package --name helloworld --work-dir simpleswitch --makefile-dir build \
--template qt6commercial --startup-command "gdbserver :2159 /opt/helloworld/bin/helloworld"
$ qmake -o build helloworld CONFIG+=debug CONFIG+=qml_debug CONFIG-=separate_debug_info
$ simpleswitch-generate-package --name helloworld --work-dir simpleswitch --makefile-dir build \
--template qt6 --startup-command "gdbserver :2159 /opt/helloworld/bin/helloworld"
Deploy to the target#
Now it is time to deploy the generated SimpleSwitch™ container to the device. For this please see Deploy a SimpleSwitch™ package
Next Steps