Nominate our 2022 Qt Champions!

Embedded ARM => Remote debugging

  • I have a QT application that runs on an ARM processor.

    And I want to debug remotely using gdbserver with the integrated tools in QtCreator (on X86 dev machine).
    This works partly. It's possible to start gdbserver on target with following command:

    gdbserver :5099 ./Application -qws

    And in QtCreator => *Debug *-> Start Debugging -> Attach to remote debug server...
    After filling in the correct parameters and press OK, its possible to step trough the application and set breakpoints ....

    But I need to start gdbserver myself every time.
    Is it possible to start server & debug with pressing F5? (Start debugging with one click if you will)
    There is something like server script under "Start&Debug remote application" , but I don't seem to understand this :)

    Any ideas?


  • Did you set up a remote linux device for the machine you want to connect to?

    You seem to have set up a kit for cross-compilation already, does that contain the the remote device?

    Once that is done, hitting F5 or the big debug button should be enough. That of course will only work if that kit is actually active;-)

  • A kit is a combination of toolchain and Qt version?
    Yes, already configured one for cross compiling, but maybe I made an error.

    And I added a Linux Device with correct ip/port to make a ssh connection with target.
    This works, because I can see the running processes.

    But the gdbserver will be started using ssh then? I need to have an ssh server running on target?

    Edit: How link the target device with the big button? :) I don't have deployment configured in run settings.

  • hi @QtDimi, I need to remote debug with mini2440 kit exactly as you. Can you please post here what you've done? If possible, please make it as detailed as possible because I'm a newbie. Thanks a lot.
    Ps: What did you fill in all the blank in "Start&Debug application" also? Thanks

  • Yes, you need a ssh server running on the device for remote linux support to work in Qt Creator.

  • Thank you @Tobias Hunger. I realized that I even couldn't do what @QtDimi can do. I did the same as @QtDimi , it's Ok when I didn't set breakpoints, the program runned properly. But when I set breakpoints, qtcreator gave me this error:
    " Cannot continue debugged process:
    Cannot insert breakpoint 1.
    Error accessing memory address 0x804d598: Input/output error."
    I've googled for hours and still can't figure out. Can you please explain me?
    Thanks a lot.

  • In short:

    I assume you have a working cross-compiler/debugger configured in Qt.

    1. run a ssh server on target device, I use dropbear.
    2. Start&Debug:

    Debugger: /path/to/debugger/for/target
    Local exe: /path/to/local/exe
    Host&Port: target IP and port
    Arch: target arch
    GNU target: target type
    sysroot: /path/to/copy/sysroot
    Location info: /path/to/local/exe

    1. configure a kit in Qt (Tools -> Options -> Linux devices)
    2. In Project -> Run settings, add deployment and run settings for remote device. This works via configured kit in step 3.
    3. Press debug button :) and it should work

    Make sure you are compiling with debug info (-g) enabled.
    And check debugger log for more info. (Window -> Views -> Debugger log)

  • Thank for your reply QtDimi.
    Let me check if it can help. Anyway, can I have your email? or skype? I appreciate that. Thanks:D

  • Contact me through Qt profile page if you want to send a mail.
    I do not post e-mail on public forum.

  • Hi,

    i properly installed dropbear and added my mini2440 as a embedded linux device in QtCreator. test successfully passed. but when i press run or debug this error occures:

    error: Unexpected output from remote process: 'Available'.

    any idea??

Log in to reply