I have an application that I run on an Embedded Linux device.
In Eclipse, I can run remote debugging using the eclipse-cdt-launch-remote
plugin where I point a binary to run, and where to put it on the device with some environment variables to be exported before running the application.
The application is a C++
application with a custom Makefile for building the application as an ELF
file.
The application is deployed on the device via SSH
, using login with user and password. And then, I can debug from Eclipse using stepping and so on.
(I am also using the MentorGraphics crosscompiler for arm-none-linux-gnueabi-2014.05)
My question is: How do I mimic the same functionality in Qt Creator since I like coding with Qt Creator more than coding with Eclipse? I know that an easy fix would be to code in Qt Creator, and then debug using Eclipse, but I really want to debug using Qt Creator.
- Edit: Solved it by hours of testing and reading up on the Qt Creator
IDE.
- Imported my project that was an Makefile project.
- Then I went in to Options under Tools and added my Device that used SSH.
- After that I added a debugger, I used gdb-multiarch since the one provided in the prebuilt toolchain binary did not support python.
- Then I added my custom toolchain pointing the compiler path to the toolchains binary g++. And set the ABI to arm-linux-generic-elf-32bit. Although I dont actually see the compiler settings being used during debug.
- I created a new kit using my Device, Debugger, and Compiler. And set device type to Generic Linux Device. Pointing to my sysroot that I extracted when using buildroot for the filesystem. These were the only options I set in the kit.
- Closed the options menu, and went into Projects where I added my new kit
- Changed the build settings and set the build directory and build steps for the application.
- Changed the run settings to use some custom commands, like moving the newly built .elf application to target. And then I set where the local executable was and where the remote executable was. The remote executable is the one I moved to the target using custom command from host.
- Voila! I could now run remote debugging on my target from Qt Creator.