Cross Compile Locally, Remote Execution

Answered

I am working with a NVIDIA Jetson Nano with L4T and my local environment is ubuntu 20.04.

CLion is 2022.1.3.

I want to build locally but deploy and run remotely on the nano from within the IDE (press the green "Run" arrow and it all just happens and I see my stdout in the CLion Console).

I have succeeded with the following:

- Cross Compilation is working (using -DCMAKE_TOOLCHAIN_FILE=)
- Remote debug with gdbserver is working OK (but doesn't allow me to just run the executable without gdbserver)
- Full remote development allows me to run on the remote the way I want, but then I also have to build on the remote.

I will occasionally want to run under gdbserver, so that is a great option to have, but mostly I just want to build-local->deploy->run-remote from within the IDE. 

Given that both the Remote GDB Server and full Remote Development each do part of what I want, I'm surprised that I can't seem to figure out how to do exactly what I want. What I want also feels like a common use-case workflow? I'm new to CLion and Cmake so maybe I'm missing something?

Thanks

David

 

6 comments
Comment actions Permalink

Can someone from JB answer or comment this question?

I evaluate clion for usage in future projects and I like this IDE very much, but without this feature it makes no sense for me to change (coming from VSC). In my case I compile on my development host ( no problem with cmake toolchainfile) and want to execute / debug on a remote target (via ssh). Actually everything simillar as with the PyCharm remote interpeter feature :)

0
Comment actions Permalink

No but to fix it you to follow guide anif it toesnt have the model you need then i have to say your out of luck and you hàve to waite until next model agàin

0
Comment actions Permalink

Hi BS!

>In my case I compile on my development host ( no problem with cmake toolchainfile) and want to execute / debug on a remote target (via ssh)

As mentioned in the original post, there is the Remote GDB Server which configuration builds your target locally, uploads the binary to the remote machine, launches it under gdbserver, and connects the CLion debugger - https://www.jetbrains.com/help/clion/remote-gdb-server.html. Isn't it suitable for you?

0
Comment actions Permalink

Hi Anna,

thx for your quick answer. Yes that works, but same problem as mentioned above: Execution is only possible with the gdbserver. I could live with that, but what about code coverage an profiling?

0
Comment actions Permalink

Code Coverage and Profiling are supported only for the full remote mode scenario (when coverage/profiling and compilation happens on the same remote machine).

0
Comment actions Permalink

Okay, full remote is not possible for me (can't compile remote) :(.
This would be a really helpfull feature for a future release

Thank you!

0

Please sign in to leave a comment.