MADDE/QtCreator integration for windows

danielwilms (Talk | contribs)
(QtCreator and MADDE on Windows)
Newer edit →

Revision as of 15:11, 26 February 2010

Contents

QtCreator and MADDE on Windows

This is a guide on how to enable MADDE in QtCreator. This is part of the technology preview. After following this guidance you are able to build your sources within QtCreator for your device, and deploy, run and debug your applications with few mouse clicks from your Windows installation.

Requires:

  • MADDE installed on your Windows machine


General advice

As this is a technology preview, remember that bugs can occur. If some of the components don't work as expected, please add your question to the talk-thread and follow up the discussion.



Install latest QtCreator on your PC

You cannot use the latest official QtCreator for this. The version has to be >= 1.3.80! For these instructions the version of the 2010-02-24 is used! Find the latest build of QtCreator for windows here:

http://qt.nokia.com/developer/qt-snapshots

Please install besides the basic installation at least the components called "MinGW" and "Post mortem debugging" of QtCreator to be able to follow all the steps of the instructions. You should be able to select those, during the installation process in a dialog like this:



Add Qt for Maemo5

You can change the configuration of the Qt-version in your QtCreator installation by clicking:

Tools -> Options... -> Qt4 -> Qt Versions

The screen you see then should look like the screenshot below. By default the Qt-versions are shown, which are installed on your system.


Tip: If you do not see any Qt version by default here, you most likely haven't installed the needed Qt libraries to compile your Qt application for your Windows environment.


In the next step you have to add the Qt version for Maemo5 to the configuration of QtCreator. It is needed to compile your sources for your Maemo device. Click on the "+" in the upper-right corner. The configuration form will ask you to enter a "Version name" and to locate "qmake". You can find it in your MADDE installation folder under:

<MADDE_folder>/targets/<target_name>/bin

For the standard installation it would be for example:

Version name: Maemo Qt4.5
qmake Location: c:\madde\0.6.14\targets\fremantle-qt-0951\bin\qmake.exe

Now you will see Qt for Maemo as a new Qt Version in Qt Creator. But first you will see the red cross next to the Qt Version in the column "Debugging Helper". The last step you have to do now is clicking on "Rebuild" and after a while (you can follow the status in the QtCreator main window) it should look like this:



Configure device run-time in Qt Creator

After setting up the connection between your Windows PC and your device, you will be able to compile, deploy, test and debug your application with a single mouse-click. The description is divided into two parts and shows:

  • what to install on device, and
  • how to set-up your windows environment



Device configuration

Install the client


Please keep in mind that this is a TECHNOLOGY PREVIEW. The following steps should only be taken if you want to test software in an early stage of development. To test the preview, you have to activate the extras-devel repository on device.


1. Open the Application Manager.

2. Add the extras-devel repository.

3. Go to: Download -> Development -> mad-developer

4. Install the client


The following instructions show how to connect your device with your PC by using the USB connection.


Configure the client for USB

Please start the client on your device. As you want to use Windows as your development environment, you have to change the driver, which is loaded to instantiate the connection. You have to follow these steps:

1. After starting the client click on "Manage Usb"

2. Then choose "Load g_ether"

File:02 client props.png

3. If Module in use is "g_ether" click "close"

4. Now you can set up the USB settings. Please click on "edit", which shows you the USB-configuration settings. Then click on "configure". After that your client is set up for the connection with your PC.


TIP: There might be problems if you have a GPRS connection running on the device. Please shut that down while testing


Setup debug environment - only needed for debugging on device!

To be able to debug your application on device you will need the gdbserver. Unfortunately it is not in one of the default repositories. So you have to add the SDK repository as shown below:

File:01 dev sdkrepo.png

After that, open the terminal on device, become root and type:

apt-get install gdb


Windows configuration

The easiest way to connect your device to the PC is to install PC-Connectivity. The install-file you find here:

PC Connectivity

Then follow the instruction and choose just the option USB-Networking, like in this screenshot:


Connect your device with the client configured as described before. If not already automatically happened, enter these configuration details:

Image:02_pccon_config.jpg


Now you should see in your network configuration, that the connection is established.

Tip: In some cases there might occur problems, if you have an active VPN connection.



QtCreator Configuration

After the connection between your PC and the device is set up, you can configure QtCreator to deploy and run the built applications on device. You can add your device in the configuration. You will find it in:

Tools -> Options... -> Qt4 -> Maemo Device Configurations


First get the password from the Mad Developer application. You get it by clicking on "Developer Password" in the main view. Be aware that each time you click on the button, a new password will be created and that the password is only valid for the time it is shown in the application.


Add the password and all the data you see in the screenshot below. Check the box, that you want to use the password as the authentication method. After that click on "test" and see if the connection can be set up.


Tip You can use your ssh key for the connection. Click on "Deploy Key ..." and select your key. If the other settings are correct the key will be automatically deployed on your device, so that you don't have to worry about the passwords anymore.


Use Maemo5 build settings

Now all the configuration is done and you can select Maemo as a build configuration. If you have a project, which you want to compile for Maemo, then click on the project button in the menu of the left side. Now you should seen a screen, like in the screen shot below. If you have the Qt libraries installed, then you will have the "Desktop" as the default option selected.

Image:04_qtcreator_init.jpg


Now press the plus in the widget, which shows, that "Desktop" is selected as default. This should open a new dialog, where you select "Maemo Device":


Image:05_qtcreator_maemodev.jpg


After that you will find a new build-configuration.

Image:06_qtcreator_build.jpg


Now click there on "Run" and select your device, which you have configured before. In the example it was called Maemo5 Device.

Image:07_qtcreator_selectdev.jpg


Finally you can now set in the down left corner, which build configuration you want to use:

Image:08_qtcreator_final.jpg

Now you can click on the run button, and your application will be automatically compiled for the Maemo device, delpoyed, and started.