Developing with Qt Commercial for INTEGRITY on Windows : A Step-by-Step Guide To Configure and Compile Qt Commercial on INTEGRITY
With the release of Qt Commmercial 4.8.0, we announced official support for INTEGRITY 10.02, but at that time only Linux host was supported for development. Now we eased the work of developers who are more familiar with using Windows host as a development environment by announcing official Windows host support for INTEGRITY 10.02 on Qt Commercial 4.8.2. I will go through what you need to do for cross-compiling Qt Commercial applications for INTEGRITY using a Windows development host.
INTEGRITY support is distributed only as a source release, but it's easy to configure and compile Qt Commercial for INTEGRITY with a few simple steps. All Qt applications built for INTEGRITY are statically linked so the only thing that needs to be copied to the actual INTEGRITY target besides the Qt application itself are the fonts that the application is using.
Qt Commercial for INTEGRITY also contains a screen driver based on the gh_FB FrameBuffer API and a connection-based mouse and keyboard input drivers. Depending on INTEGRITY BSP you might already have a suitable FrameBuffer driver for your hardware. If a suitable FrameBuffer driver doesn't exist for your, HW you can still test Qt Commercial on your HW by utilizing the default VNC screen driver. For testing purposes also virtual embedded x86 target can be used. For more information about these drivers, please refer to Green Hills Software standard support.
Steps to configure and compile Qt Commercial for INTEGRITY on your Windows host:
1. In the directory where you extracted the Qt source run the configure.exe:
configure -embedded -xplatform qws/integrity-x86-cx86 -hostprefix %CD% -prefix / -qt-sql-sqlite -nomake examples -nomake demos
2. Once configure is completed edit the generated projects.gpj -file
Change following line to point to your INTEGRITY install directory:
Change following line to indicate the bsp you are using
3. open projects.gpj in Multi and compile the project
* Qt is now build for INTEGRITY 10.02
Preparing your INTEGRITY target:
The only thing you need to do is to copy the fonts from your QtDirectory/lib/fonts to the INTEGRITY target /lib/fonts -directory. After this your target is ready to run Qt applications. You probably won't need all the fonts but for testing purposes it's easier to copy them all to the target and when your application is ready you can just delete the ones you don't need.
Developing and compiling your Qt application for INTEGRITY:
Develop your application using e.g. Qt Commercial Creator and after you are ready to deploy the application to the INTEGRITY target cross compile it with MULTI.
While developing the application on the host machine, please keep the limitations of the Qt Commercial on INTEGRITY port in mind. A detailed list of limitations can be found from in the Qt Commercial documentation for INTEGRITY documentation found in the download packages.
In this case we can make cool “Hello Windows!” application with the text editor as follows:
Source code LISTING for the application (main.cpp):
int main(int argc, char *argv)
QApplication app(argc, argv);
QPushButton hello("Hello Windows!");
Steps to compile your Qt application for INTEGRITY:
1. Create the needed Qt project file by running qmake in project file generation mode in the application directory
2. Create the needed MULTI project file (.gpj) by running qmake in the application directory
3. Add the generated hello.gpj as a part of your Qt-project in MULTI
Right click the Qt top project file and select Modify Project -> Add Item…
From the new window select MULTI Project File and click Next
In the file selection dialog go to your application directory and choose the main .gpj file, in this case hello.gpj, and click Add.
Now you can see your application as a part of the Qt-project
4. Compile the application in MULTI
Right-click your application and select Build Dynamic Download.
Once the building process is completed your application is ready to be launched on the INTEGRITY target.
Running Qt applications on INTEGRITY target
Basically, you have two ways to test your applications on INTEGRITY target. You can either copy the application to the target via FTP and run it from there or you can use MULTI Debugger to run the application.
Running the application via FTP method:
- Copy your application binary to the target via FTP
- Connect to the target via telnet using port 8081
- Run you application with run command
Running the application via MULTI Debugger:
Choose connect from MULTI top menu.
Select Custom from Connection Chooser.
Type in rtserv2 followed by targets IP-address or hostname and click Connect.
Now you can see new Debugger window, which shows all kinds of information of your INTEGRITY target.
Once you are connected to the target you can upload you application by right clicking your application project and selecting Load Module.
While your application is being loaded to the target you can see the loading process in the MULTI debugger window
By default, Qt applications are set to run automatically, so after loading is completed you should see your application running on the target.
In any way you choose to load and launch it, you should see your cool application running on INTEGRITY target.
“Hello Windows!” running on INTEGRITY target.
That's it. Happy coding! :)
Subscribe to our newsletter
Try Qt 6.1 Now!
Download the latest release here: www.qt.io/download.
Qt 6 was created to be the productivity platform for the future, with next-gen 2D & 3D UX and limitless scalability.
Explore Qt World
Check our Qt demos and case studies in the virtual Qt World
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.
Want to build something for tomorrow, join #QtPeople today! We have loads of cool jobs you don’t want to miss! http://qt.io/careers #builtwithQt #software #developers #coding #framework #tool #tooling #C++ #QML #engineers #sales #tech #technology #UI #UX #CX #Qt #Qtdev #global #openpositions #careers #job
Henkilön Qt (@theqtcompany) jakama julkaisu