This page will explain how to automatically install and configure Qt Creator for Armadeus boards. It will also describe the way to use GDB in Qt Creator for remote applications.
- Qt Creator is now fully integrated in Armadeus Buildroot. To install it, go in your project's BSP directory and use the command:
[armadeus]$ make menuconfig
[*] Host utilities ---> [*] host qtcreator ---> --- host qtcreator [ ] GDB for QtCreator --->
- If you want to use GDB in QtCreator for remote applications:
[*] Host utilities ---> [*] host qtcreator ---> --- host qtcreator [*] GDB for QtCreator ---> --- GDB for QtCreator (192.168.0.208) GDB server IP address (5600) GDB server port (/srv/developpements/armadeus_4-1/processManager/bin/processManager) Local executable (/usr/bin/processManager) Remote executable path on system (-qws) Remote executable arguments
The GDB server IP address, the GDB server port, the Local executable and the Remote executable path on system must be filled. The Remote executable arguments are facultatives.
- Then you can build Qt Creator:
- The QtCreator's configuration files are automatically generated in buildroot/output/host/etc/Nokia: QtCreator.ini and toolChains.xml.
- Qt Embedded and g++ toolchain for ARM are automatically entered in Qt Creator's configuration.
- GDB server script can be manually modified. Is is located in buildroot/output/host/etc/Nokia/gdb_server_script.
This script transfers the executable to debug to the remote system and launch the remote GDB server. The following variables can be changed according to the user needs: IP_ADDR, EXEC_ARGUMENTS, PRIVATE_KEY_PATH, LOCAL_EXEC_PATH, REMOTE_EXEC_PATH.
- QtCreator's binary is located in buildroot/output/host/usr/bin/qtcreator.
- Qt and toolchains can be respectively configured in the menu Tools --> Options --> Qt4 / Tool Chains.
When in Qt Creator, go in the menu Debug --> Start Debugging --> Start and Attach to Remote Application.
- You can manually configurate GDB by modifying values in configuration screen:
- The Debugger path is automatically entered by Buildroot. It must be a GDB compiled to debug on ARM platforms.
- The Local executable must be compiled against Qt Embedded for ARM and will be used by the host GDB and transfered to the remote system for GDB server.
- The Sysroot is the remote system root path in host. GDB needs it to have access to all system headers and libraries.
- When you click on OK, the GDB server and host start and you can debug the remote application.
SSH DSA keys
- SSH is used to transfer the file to debug to the remote system and to launch the remote GDB server.
- If you choose to use GDB with Qt Creator in Buildroot, DSA keys will be automatically generated for SSH on your host PC and installed in the remote system rootfs.
- The host public and private keys are installed in buildroot/output/host/etc/ssh/
- You can also generate your own keys and use them to debug the remote application but then you have to:
- Put the public key in the remote system rootfs' authorized-keys file: buildroot/output/target/root/.ssh/authorized_keys.
- Change the PRIVATE_KEY_PATH variable in gdb_server_script: buildroot/output/host/etc/Nokia/gdb_server_script.