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.
- The remote system must be registered as a known host in your host PC.
- Try to connect to the system before debugging for the first time:
$ ssh root@REMOTE_IP The authenticity of host '192.168.0.208 (192.168.0.208)' can't be established. ECDSA key fingerprint is e0:20:a4:60:63:33:b8:4f:c2:9c:1a:1c:52:d2:4d:f7. Are you sure you want to continue connecting (yes/no)? $ yes Warning: Permanently added '192.168.0.208' (ECDSA) to the list of known hosts.
- If the system is already registered and you reflash the rootfs, you must reset the known hosts, then reconnect:
$ ssh-keygen -f "~/.ssh/known_hosts" -R REMOTE_IP Original contents retained as ~/.ssh/known_hosts.old